mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Only call XSetInputFocus if the window is visible
This commit is contained in:
parent
360d2bf452
commit
033d92aae5
|
@ -615,6 +615,7 @@ impl Window {
|
||||||
input_handler: Mutex::new(XInputEventHandler::new(display, window, ic, window_attrs))
|
input_handler: Mutex::new(XInputEventHandler::new(display, window, ic, window_attrs))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if window_attrs.visible {
|
||||||
unsafe {
|
unsafe {
|
||||||
let ref x_window: &XWindow = window.x.borrow();
|
let ref x_window: &XWindow = window.x.borrow();
|
||||||
|
|
||||||
|
@ -628,6 +629,7 @@ impl Window {
|
||||||
ffi::CurrentTime
|
ffi::CurrentTime
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// returning
|
// returning
|
||||||
Ok(window)
|
Ok(window)
|
||||||
|
|
Loading…
Reference in a new issue