mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-02 06:40:06 -04:00
Fix issue #509
Focusing the newly created window seems to grab the keyboard.
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user