mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 22:53:15 -04:00
Fix 968: Invisible windows steal focus from visible windows Win32 (#968)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
- Change `Event::Suspended(true / false)` to `Event::Suspended` and `Event::Resumed`.
|
||||
- On X11, fix sanity check which checks that a monitor's reported width and height (in millimeters) are non-zero when calculating the DPI factor.
|
||||
- On Windows, when a window is initially invisible, it won't take focus from the existing visible windows.
|
||||
|
||||
# 0.20.0 Alpha 1
|
||||
|
||||
|
||||
@@ -271,7 +271,8 @@ impl Window {
|
||||
winuser::SWP_ASYNCWINDOWPOS
|
||||
| winuser::SWP_NOZORDER
|
||||
| winuser::SWP_NOREPOSITION
|
||||
| winuser::SWP_NOMOVE,
|
||||
| winuser::SWP_NOMOVE
|
||||
| winuser::SWP_NOACTIVATE,
|
||||
);
|
||||
winuser::UpdateWindow(self.window.0);
|
||||
}
|
||||
|
||||
@@ -307,7 +307,9 @@ impl WindowFlags {
|
||||
y,
|
||||
w,
|
||||
h,
|
||||
winuser::SWP_NOZORDER | winuser::SWP_FRAMECHANGED,
|
||||
winuser::SWP_NOZORDER
|
||||
| winuser::SWP_FRAMECHANGED
|
||||
| winuser::SWP_NOACTIVATE,
|
||||
);
|
||||
}
|
||||
None => {
|
||||
@@ -322,7 +324,8 @@ impl WindowFlags {
|
||||
winuser::SWP_NOZORDER
|
||||
| winuser::SWP_NOMOVE
|
||||
| winuser::SWP_NOSIZE
|
||||
| winuser::SWP_FRAMECHANGED,
|
||||
| winuser::SWP_FRAMECHANGED
|
||||
| winuser::SWP_NOACTIVATE,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user