Unconditionally set input focus on activation
Wine windows had WM_HINTS.input set to False, and expected use of the WM_TAKE_FOCUS protocol, but Wayland input is much more absolute, so this protocol is useless to us. Always focusing windows seems to be fine, so just do that. Should fix #35.
This commit is contained in:
parent
891d056497
commit
03a0e1754d
3 changed files with 22 additions and 95 deletions
|
|
@ -255,6 +255,9 @@ impl SurfaceData {
|
|||
let activated = states.contains(&(u32::from(xdg_toplevel::State::Activated) as u8));
|
||||
|
||||
if activated {
|
||||
// Technically this is wrong - activated doesn't necessarily mean focused
|
||||
// - but it works and no one's complained yet.
|
||||
// TODO: base focus on keyboard enter instead.
|
||||
state.to_focus = Some(self.window.unwrap());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue