Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fullscreen issues on macOS (#547) #549

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [Unreleased]
### Fixed
- Black screen issues when closing fullscreen window on macOS

## [2.7.2] - 2024-09-15
### Fixed
- Opening download directory of a torrent with some file managers
Expand Down
7 changes: 7 additions & 0 deletions src/ui/screens/mainwindow/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1486,6 +1486,13 @@ namespace tremotesf {
}
}
debug().log("Hiding {}", *mWindow);
if constexpr (targetOs == TargetOs::UnixMacOS) {
// Hiding window when it's in fullscreen mode can have weird effects on macOS
if (mWindow->isFullScreen()) {
debug().log("Exiting fullscreen");
mWindow->setWindowState(mWindow->windowState().setFlag(Qt::WindowFullScreen, false));
}
}
mWindow->hide();
if constexpr (targetOs == TargetOs::UnixMacOS) {
// We need this so that system menu bar switches to previous app
Expand Down
Loading