mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 21:31:29 +11:00
Fix 968: Invisible windows steal focus from visible windows Win32 (#968)
This commit is contained in:
parent
29e2481597
commit
0e20973bdb
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
- Change `Event::Suspended(true / false)` to `Event::Suspended` and `Event::Resumed`.
|
- 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 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
|
# 0.20.0 Alpha 1
|
||||||
|
|
||||||
|
|
|
@ -271,7 +271,8 @@ impl Window {
|
||||||
winuser::SWP_ASYNCWINDOWPOS
|
winuser::SWP_ASYNCWINDOWPOS
|
||||||
| winuser::SWP_NOZORDER
|
| winuser::SWP_NOZORDER
|
||||||
| winuser::SWP_NOREPOSITION
|
| winuser::SWP_NOREPOSITION
|
||||||
| winuser::SWP_NOMOVE,
|
| winuser::SWP_NOMOVE
|
||||||
|
| winuser::SWP_NOACTIVATE,
|
||||||
);
|
);
|
||||||
winuser::UpdateWindow(self.window.0);
|
winuser::UpdateWindow(self.window.0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,7 +307,9 @@ impl WindowFlags {
|
||||||
y,
|
y,
|
||||||
w,
|
w,
|
||||||
h,
|
h,
|
||||||
winuser::SWP_NOZORDER | winuser::SWP_FRAMECHANGED,
|
winuser::SWP_NOZORDER
|
||||||
|
| winuser::SWP_FRAMECHANGED
|
||||||
|
| winuser::SWP_NOACTIVATE,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
|
@ -322,7 +324,8 @@ impl WindowFlags {
|
||||||
winuser::SWP_NOZORDER
|
winuser::SWP_NOZORDER
|
||||||
| winuser::SWP_NOMOVE
|
| winuser::SWP_NOMOVE
|
||||||
| winuser::SWP_NOSIZE
|
| winuser::SWP_NOSIZE
|
||||||
| winuser::SWP_FRAMECHANGED,
|
| winuser::SWP_FRAMECHANGED
|
||||||
|
| winuser::SWP_NOACTIVATE,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue