Skip to content

The floating window can not back to normal size after maximizing it. #642

@xiterator

Description

@xiterator

If we make a DockWidget in a floating and click the fullscreen button (from the demo CMainWindow::createTableWidget ), then
the fullscreen window will not come back to normal size even if we click the fullscreen button again or many times.
It can affect user's experience.

The bug is in the following code:
void CFloatingDockContainer::showNormal(bool fixGeometry)
{
/*
* WindowNoState = 0x00000000,
WindowMinimized = 0x00000001,
WindowMaximized = 0x00000002,
WindowFullScreen = 0x00000004,
WindowActive = 0x00000008
*/

// if (windowState() == Qt::WindowMaximized)   //the bug is here !!!
qDebug() << "CFloatingDockContainer: windowState(): " << windowState();  // it output WindowFullScreen
// Should be changed to the following condition checking, then everything is ok:
if ( (windowState() & Qt::WindowMaximized) != 0 ||
     (windowState() & Qt::WindowFullScreen) != 0)

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions