mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 22:01:31 +11:00
Call XSync before XSetInputFocus
This commit is contained in:
parent
f76aba3d37
commit
360d2bf452
|
@ -617,6 +617,10 @@ impl Window {
|
|||
|
||||
unsafe {
|
||||
let ref x_window: &XWindow = window.x.borrow();
|
||||
|
||||
// XSetInputFocus generates an error if the window is not visible,
|
||||
// therefore we call XSync before to make sure it's the case
|
||||
(display.xlib.XSync)(display.display, 0);
|
||||
(display.xlib.XSetInputFocus)(
|
||||
display.display,
|
||||
x_window.window,
|
||||
|
|
Loading…
Reference in a new issue