mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 22:00:04 -04:00
Call XSync before XSetInputFocus
This commit is contained in:
@@ -617,6 +617,10 @@ impl Window {
|
|||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let ref x_window: &XWindow = window.x.borrow();
|
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.xlib.XSetInputFocus)(
|
||||||
display.display,
|
display.display,
|
||||||
x_window.window,
|
x_window.window,
|
||||||
|
|||||||
Reference in New Issue
Block a user