mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-02 23:00:05 -04:00
Only call XSetInputFocus if the window is visible
This commit is contained in:
@@ -615,6 +615,7 @@ impl Window {
|
||||
input_handler: Mutex::new(XInputEventHandler::new(display, window, ic, window_attrs))
|
||||
};
|
||||
|
||||
if window_attrs.visible {
|
||||
unsafe {
|
||||
let ref x_window: &XWindow = window.x.borrow();
|
||||
|
||||
@@ -628,6 +629,7 @@ impl Window {
|
||||
ffi::CurrentTime
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// returning
|
||||
Ok(window)
|
||||
|
||||
Reference in New Issue
Block a user