Skip to content

Commit

Permalink
windows: fix: mess up full screen mode on config reload
Browse files Browse the repository at this point in the history
refs: #3439
  • Loading branch information
wez committed Apr 8, 2023
1 parent 5fb6db8 commit 69ae847
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ As features stabilize some brief notes about them will accumulate here.
* Wayland: window not repainting consistently when using the keyboard when
using `front_end="WebGpu"`. Thanks to @jokeyrhyme for working through
different iterations of this fix! #3126
* Windows: reloading the config could partially knock the window out of
full screen mode. #3439

### 20230326-111934-3666303c

Expand Down
10 changes: 10 additions & 0 deletions window/src/os/windows/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,16 @@ fn schedule_apply_decoration(hwnd: HWND, decorations: WindowDecorations) {
}

fn apply_decoration_immediate(hwnd: HWND, decorations: WindowDecorations) {
match rc_from_hwnd(hwnd) {
Some(inner) => {
if inner.borrow().saved_placement.is_some() {
// We are full screen; ignore it for now
return;
}
}
None => return,
};

unsafe {
let orig_style = GetWindowLongW(hwnd, GWL_STYLE);
let style = decorations_to_style(decorations);
Expand Down

0 comments on commit 69ae847

Please sign in to comment.