mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 13:51:30 +11:00
Fixed visibility/activation issues on Windows. (#2656)
This commit is contained in:
parent
422c6b1987
commit
42c395e49d
|
@ -16,11 +16,11 @@ use windows_sys::Win32::{
|
|||
HWND_NOTOPMOST, HWND_TOPMOST, MF_BYCOMMAND, MF_DISABLED, MF_ENABLED, SC_CLOSE,
|
||||
SWP_ASYNCWINDOWPOS, SWP_FRAMECHANGED, SWP_NOACTIVATE, SWP_NOMOVE, SWP_NOREPOSITION,
|
||||
SWP_NOSIZE, SWP_NOZORDER, SW_HIDE, SW_MAXIMIZE, SW_MINIMIZE, SW_RESTORE, SW_SHOW,
|
||||
WINDOWPLACEMENT, WINDOW_EX_STYLE, WINDOW_STYLE, WS_BORDER, WS_CAPTION, WS_CHILD,
|
||||
WS_CLIPCHILDREN, WS_CLIPSIBLINGS, WS_EX_ACCEPTFILES, WS_EX_APPWINDOW, WS_EX_LAYERED,
|
||||
WS_EX_NOREDIRECTIONBITMAP, WS_EX_TOPMOST, WS_EX_TRANSPARENT, WS_EX_WINDOWEDGE, WS_MAXIMIZE,
|
||||
WS_MAXIMIZEBOX, WS_MINIMIZE, WS_MINIMIZEBOX, WS_OVERLAPPEDWINDOW, WS_POPUP, WS_SIZEBOX,
|
||||
WS_SYSMENU, WS_VISIBLE,
|
||||
SW_SHOWNOACTIVATE, WINDOWPLACEMENT, WINDOW_EX_STYLE, WINDOW_STYLE, WS_BORDER, WS_CAPTION,
|
||||
WS_CHILD, WS_CLIPCHILDREN, WS_CLIPSIBLINGS, WS_EX_ACCEPTFILES, WS_EX_APPWINDOW,
|
||||
WS_EX_LAYERED, WS_EX_NOREDIRECTIONBITMAP, WS_EX_TOPMOST, WS_EX_TRANSPARENT,
|
||||
WS_EX_WINDOWEDGE, WS_MAXIMIZE, WS_MAXIMIZEBOX, WS_MINIMIZE, WS_MINIMIZEBOX,
|
||||
WS_OVERLAPPEDWINDOW, WS_POPUP, WS_SIZEBOX, WS_SYSMENU, WS_VISIBLE,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -116,7 +116,7 @@ bitflags! {
|
|||
/// Drop shadow for undecorated windows.
|
||||
const MARKER_UNDECORATED_SHADOW = 1 << 20;
|
||||
|
||||
const MARKER_ACTIVATE = 1 << 18;
|
||||
const MARKER_ACTIVATE = 1 << 21;
|
||||
|
||||
const EXCLUSIVE_FULLSCREEN_OR_MASK = WindowFlags::ALWAYS_ON_TOP.bits;
|
||||
}
|
||||
|
@ -308,9 +308,9 @@ impl WindowFlags {
|
|||
}
|
||||
|
||||
if new.contains(WindowFlags::VISIBLE) {
|
||||
let flag = !if self.contains(WindowFlags::MARKER_ACTIVATE) {
|
||||
let flag = if !self.contains(WindowFlags::MARKER_ACTIVATE) {
|
||||
self.set(WindowFlags::MARKER_ACTIVATE, true);
|
||||
SWP_NOACTIVATE
|
||||
SW_SHOWNOACTIVATE
|
||||
} else {
|
||||
SW_SHOW
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue