mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Fix issue #509
Focusing the newly created window seems to grab the keyboard.
This commit is contained in:
parent
918dc67992
commit
ed8dfa9a52
|
@ -565,6 +565,16 @@ impl Window {
|
||||||
input_handler: Mutex::new(XInputEventHandler::new(display, window, ic, window_attrs))
|
input_handler: Mutex::new(XInputEventHandler::new(display, window, ic, window_attrs))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
unsafe {
|
||||||
|
let ref x_window: &XWindow = window.x.borrow();
|
||||||
|
(display.xlib.XSetInputFocus)(
|
||||||
|
display.display,
|
||||||
|
x_window.window,
|
||||||
|
ffi::RevertToParent,
|
||||||
|
ffi::CurrentTime
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// returning
|
// returning
|
||||||
Ok(window)
|
Ok(window)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue