diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/api/x11/window.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/api/x11/window.rs b/src/api/x11/window.rs index 8ab87de..b6a9621 100644 --- a/src/api/x11/window.rs +++ b/src/api/x11/window.rs @@ -565,6 +565,16 @@ impl Window { 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 Ok(window) } |