1
0
Fork 0
forked from wry/wry

autocommit 2022-04-02 19:38:13 CEST

This commit is contained in:
Julian Orth 2022-04-02 19:38:13 +02:00
parent 6ad6d83b7e
commit 6de9fb8303
18 changed files with 112 additions and 51 deletions

View file

@ -1,7 +1,7 @@
use crate::client::{Client, ClientError};
use crate::cursor::KnownCursor;
use crate::fixed::Fixed;
use crate::ifs::wl_seat::{ NodeSeatState, WlSeatGlobal};
use crate::ifs::wl_seat::{NodeSeatState, WlSeatGlobal};
use crate::ifs::wl_surface::xdg_surface::{XdgSurface, XdgSurfaceError, XdgSurfaceExt};
use crate::ifs::xdg_positioner::{XdgPositioned, XdgPositioner, CA};
use crate::leaks::Tracker;

View file

@ -12,7 +12,7 @@ use crate::rect::Rect;
use crate::render::Renderer;
use crate::tree::toplevel::{ToplevelData, ToplevelNode};
use crate::tree::walker::NodeVisitor;
use crate::tree::{FindTreeResult};
use crate::tree::FindTreeResult;
use crate::tree::{FoundNode, Node, NodeId, ToplevelNodeId, WorkspaceNode};
use crate::utils::buffd::MsgParser;
use crate::utils::buffd::MsgParserError;

View file

@ -1,4 +1,4 @@
use crate::client::{Client};
use crate::client::Client;
use crate::cursor::KnownCursor;
use crate::fixed::Fixed;
use crate::ifs::wl_seat::{NodeSeatState, SeatId, WlSeatGlobal};
@ -20,7 +20,7 @@ use crate::xwayland::XWaylandEvent;
use bstr::BString;
use jay_config::Direction;
use std::cell::{Cell, RefCell};
use std::ops::Deref;
use std::ops::{Deref, Not};
use std::rc::Rc;
use thiserror::Error;
@ -41,7 +41,7 @@ impl Default for XInputModel {
#[derive(Default, Debug)]
pub struct IcccmHints {
pub flags: Cell<i32>,
pub input: Cell<u32>,
pub input: Cell<bool>,
pub initial_state: Cell<i32>,
pub icon_pixmap: Cell<u32>,
pub icon_window: Cell<u32>,
@ -402,11 +402,12 @@ impl Node for Xwindow {
}
fn change_extents(self: Rc<Self>, rect: &Rect) {
let nw = rect.width();
let nh = rect.height();
let de = self.data.info.extents.replace(*rect);
if de.width() != nw || de.height() != nh {
let old = self.data.info.extents.replace(*rect);
if old != *rect {
self.events.push(XWaylandEvent::Configure(self.clone()));
if old.position() != rect.position() {
self.surface.set_absolute_position(rect.x1(), rect.y1());
}
}
}
@ -442,7 +443,8 @@ impl ToplevelNode for Xwindow {
}
fn accepts_keyboard_focus(&self) -> bool {
self.data.info.icccm_hints.input.get() != 0
self.data.info.never_focus.get().not() &&
self.data.info.icccm_hints.input.get()
}
fn default_surface(&self) -> Rc<WlSurface> {

View file

@ -1,5 +1,5 @@
use crate::client::{Client, ClientError};
use crate::ifs::wl_seat::{NodeSeatState};
use crate::ifs::wl_seat::NodeSeatState;
use crate::ifs::wl_surface::{
CommitAction, CommitContext, SurfaceExt, SurfaceRole, WlSurface, WlSurfaceError,
};