Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.7.0, 5.12.0
-
None
-
KWin/X11
-
-
4f370d36ec5caa02f78545ceee5704d94edf0530(5.14) 283d9b01dc3ab6c95c688b0e5f5c98c41ca22d30(5.12)
Description
Window Manager Environment:
- KWin 5.15.5、KWin 5.8.6
- Enable Always hidden previews, or manually add configuration items:
[Compositing]
...
HiddenPreviews=6
...
After that, when WinWindow requests are minimized, KWin does not change the WM_STATE property.
Yes, KWin maybe is wrong. But I see X11 document from https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html:
_NET_WM_STATE_HIDDEN should be set by the Window Manager to indicate that a window would not be visible on the screen if its desktop/viewport were active and its coordinates were within the screen bounds. The canonical example is that minimized windows should be in the _NET_WM_STATE_HIDDEN state. Pagers and similar applications should use _NET_WM_STATE_HIDDEN instead of WM_STATE to decide whether to display a window in miniature representations of the windows on a desktop.
Implementation note: if an Application asks to toggle _NET_WM_STATE_HIDDEN the Window Manager should probably just ignore the request, since _NET_WM_STATE_HIDDEN is a function of some other aspect of the window such as minimization, rather than an independent state.
Whether the meaning of this paragraph can be understood as: when the _NET_WM_STATE attribute does not contain _NET_WM_STATE_HIDDEN, the window is not considered to be minimized?
KWin does not change the WM_STATE property of the window, but the _NET_WM_STATE property of the window is indeed changed. _NET_WM_STATE_HIDDEN is added when the window is minimized, otherwise it will be removed.
Please refer to the attached code, execute in KWin will get the following output:
begin show minimize QFlags<Qt::WindowState>(WindowMinimized) WM_STATE(WM_STATE): window state: Normal icon window: 0x0 _NET_WM_STATE(ATOM) = _NET_WM_STATE_HIDDEN end show minimize begin active window WM_STATE(WM_STATE): window state: Normal icon window: 0x0 _NET_WM_STATE(ATOM) = end active window QFlags<Qt::WindowState>(WindowMinimized)
Attachments
Issue Links
- relates to
-
QTBUG-68864 tst_QWidget_window::setWindowState autotest fails on Ubuntu 18.04
-
- Closed
-