1
0
Fork 0
forked from wry/wry

autocommit 2022-04-08 00:04:55 CEST

This commit is contained in:
Julian Orth 2022-04-08 00:04:55 +02:00
parent 26f8c1aeb6
commit 0bd9a70e69
10 changed files with 35 additions and 12 deletions

View file

@ -452,9 +452,8 @@ impl WlSeatGlobal {
impl WlSeatGlobal {
pub fn enter_toplevel(self: &Rc<Self>, n: Rc<dyn ToplevelNode>) {
if n.accepts_keyboard_focus() {
log::info!("does not accept input focus");
self.focus_toplevel(n);
}
self.focus_toplevel(n);
}
pub fn enter_popup(self: &Rc<Self>, _n: &Rc<XdgPopup>) {

View file

@ -253,7 +253,7 @@ impl WlSurface {
pub fn accepts_kb_focus(&self) -> bool {
match self.toplevel.get() {
Some(tl) => true,
Some(tl) => tl.accepts_keyboard_focus(),
_ => self.ext.get().accepts_kb_focus(),
}
}

View file

@ -1,3 +1,4 @@
use std::ops::Not;
use {
crate::{
client::Client,
@ -448,7 +449,7 @@ impl ToplevelNode for Xwindow {
}
fn accepts_keyboard_focus(&self) -> bool {
self.data.info.input_model.get() != XInputModel::None
self.data.info.never_focus.get().not() && self.data.info.input_model.get() != XInputModel::None
}
fn default_surface(&self) -> Rc<WlSurface> {