Skip to content

Commit

Permalink
Fullscreen hack for Windows 11 native resize
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-fedin committed Mar 6, 2023
1 parent 5991130 commit b7f967d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ void OverlayWidget::savePosition() {

void OverlayWidget::updateGeometry(bool inMove) {
initFullScreen();
if (_fullscreen) {
if (_fullscreen && (!Platform::IsWindows11OrGreater() || !isHidden())) {
updateGeometryToScreen(inMove);
} else if (_windowed && _normalGeometryInited) {
_window->setGeometry(_normalGeometry);
Expand Down Expand Up @@ -3125,6 +3125,9 @@ void OverlayWidget::showAndActivate() {
_wasWindowedMode = true;
} else if (_fullscreen) {
_window->showFullScreen();
if (Platform::IsWindows11OrGreater()) {
updateGeometry();
}
} else {
_window->showMaximized();
}
Expand Down

0 comments on commit b7f967d

Please sign in to comment.