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

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

Closed
xiterator opened this issue Jun 10, 2024 · 5 comments
Closed
Assignees

Comments

@xiterator
Copy link

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)
@githubuser0xFFFF
Copy link
Owner

Wich OS / Linux Distribution and which Qt version?

@xiterator
Copy link
Author

Ubuntu 22.04.3 LTS, QT 6.7.1

@githubuser0xFFFF
Copy link
Owner

Wayland or X11?

@xiterator
Copy link
Author

x11 by running echo $XDG_SESSION_TYPE

@githubuser0xFFFF
Copy link
Owner

Added your changes to master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants