Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.2.0, 5.2.1
-
None
-
Debian 7 64bit
KDE 4.11.3
Gnome 3.8+
Description
When i minimize fullscreen QWindow and then restore it from task bar or dock it's going to be fullscreen again under Windows. Same steps doesn't restore Fullscreen window on linux. It looks like default minimum size framed window under linux.
MainWindow is a QWindow derived class.
void MainWindow::showExpanded() { showFullScreen(); } // Custom minimize button calls that function. void MainWindow::minimize() { showMinimized(); } //WORKAROUND under linux void MainWindow::onWindowStateChanged(Qt::WindowState state) { //INFO: Somehow Qt5 doesn't restore fullscreen state when we minimize the application. //WORKAROUND: restore minimize the fullscreen on linux. #if defined(Q_OS_LINUX) static bool isMinimized = false; static Qt::WindowState previousState = state; if (previousState == Qt::WindowNoState && state == Qt::WindowMinimized) { isMinimized = true; } else if (isMinimized && state == Qt::WindowNoState) { isMinimized = false; this->showFullScreen(); } previousState = state; #endif }
Attachments
Issue Links
- relates to
-
QTBUG-62542 [Linux]: When minimizing a window from fullscreen and then restoring it, it will end up in the normalized state
-
- Closed
-