Replace lazy window message ids with a slimmer version (#2598)
This commit is contained in:
parent
69d6076310
commit
5ba6bdef49
3 changed files with 101 additions and 40 deletions
|
|
@ -391,7 +391,12 @@ impl WindowFlags {
|
|||
let (style, style_ex) = new.to_window_styles();
|
||||
|
||||
unsafe {
|
||||
SendMessageW(window, *event_loop::SET_RETAIN_STATE_ON_SIZE_MSG_ID, 1, 0);
|
||||
SendMessageW(
|
||||
window,
|
||||
event_loop::SET_RETAIN_STATE_ON_SIZE_MSG_ID.get(),
|
||||
1,
|
||||
0,
|
||||
);
|
||||
|
||||
// This condition is necessary to avoid having an unrestorable window
|
||||
if !new.contains(WindowFlags::MINIMIZED) {
|
||||
|
|
@ -412,7 +417,12 @@ impl WindowFlags {
|
|||
|
||||
// Refresh the window frame
|
||||
SetWindowPos(window, 0, 0, 0, 0, 0, flags);
|
||||
SendMessageW(window, *event_loop::SET_RETAIN_STATE_ON_SIZE_MSG_ID, 0, 0);
|
||||
SendMessageW(
|
||||
window,
|
||||
event_loop::SET_RETAIN_STATE_ON_SIZE_MSG_ID.get(),
|
||||
0,
|
||||
0,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue