autocommit 2022-04-02 19:38:13 CEST
This commit is contained in:
parent
6ad6d83b7e
commit
6de9fb8303
18 changed files with 112 additions and 51 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use crate::cli::CliLogLevel;
|
||||
use crate::client::{Client, ClientError};
|
||||
use crate::globals::{Global, GlobalName};
|
||||
use crate::ifs::jay_log_file::JayLogFile;
|
||||
|
|
@ -6,10 +7,9 @@ use crate::object::Object;
|
|||
use crate::utils::buffd::{MsgParser, MsgParserError};
|
||||
use crate::wire::jay_compositor::*;
|
||||
use crate::wire::JayCompositorId;
|
||||
use std::rc::Rc;
|
||||
use log::Level;
|
||||
use std::rc::Rc;
|
||||
use thiserror::Error;
|
||||
use crate::cli::CliLogLevel;
|
||||
|
||||
pub struct JayCompositorGlobal {
|
||||
name: GlobalName,
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ impl WlSeatGlobal {
|
|||
let is_container = new.is_container();
|
||||
for tl in self.toplevel_focus_history.rev_iter() {
|
||||
match tl.as_node().get_workspace() {
|
||||
Some(ws) if ws.id == workspace.id => { },
|
||||
Some(ws) if ws.id == workspace.id => {}
|
||||
_ => continue,
|
||||
};
|
||||
let parent_is_float = match tl.parent() {
|
||||
|
|
@ -412,7 +412,9 @@ impl WlSeatGlobal {
|
|||
// Enter callbacks
|
||||
impl WlSeatGlobal {
|
||||
pub fn enter_toplevel(self: &Rc<Self>, n: Rc<dyn ToplevelNode>) {
|
||||
self.focus_toplevel(n);
|
||||
if n.accepts_keyboard_focus() {
|
||||
self.focus_toplevel(n);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn enter_popup(self: &Rc<Self>, _n: &Rc<XdgPopup>) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use std::ops::Deref;
|
||||
use crate::ifs::wl_seat::WlSeatGlobal;
|
||||
use crate::tree::{Node, OutputNode};
|
||||
use crate::utils::clonecell::CloneCell;
|
||||
use std::ops::Deref;
|
||||
use std::rc::Rc;
|
||||
|
||||
pub struct KbOwnerHolder {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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> {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue