Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remember the previous window state when leaving fullscreen
Browse files Browse the repository at this point in the history
Tested on Linux (KWin/X11) only.

Closes longturn#1094.
lmoureaux committed Jul 9, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent fc1f9d5 commit 532bebc
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions client/menu.cpp
Original file line number Diff line number Diff line change
@@ -2488,15 +2488,12 @@ void enable_interface(bool enable)
*/
void mr_menu::slot_fullscreen()
{
if (!gui_options.gui_qt_fullscreen) {
king()->showFullScreen();
queen()->game_tab_widget->showFullScreen();
gui_options.gui_qt_fullscreen = !gui_options.gui_qt_fullscreen;
if (gui_options.gui_qt_fullscreen) {
king()->setWindowState(king()->windowState() | Qt::WindowFullScreen);
} else {
// FIXME Doesnt return properly, probably something with sidebar
king()->showNormal();
queen()->game_tab_widget->showNormal();
king()->setWindowState(king()->windowState() & ~Qt::WindowFullScreen);
}
gui_options.gui_qt_fullscreen = !gui_options.gui_qt_fullscreen;
}

/**

0 comments on commit 532bebc

Please sign in to comment.