Bug 356909 - Virtual desktop switcher shows minimized windows when setting "Keep window thumbnails" to "Always" in KWin X11
Summary: Virtual desktop switcher shows minimized windows when setting "Keep window th...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: frameworks-kwindowsystem
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Flöser
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-19 12:41 UTC by Erin Yuki Schlarb
Modified: 2021-03-09 19:21 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erin Yuki Schlarb 2015-12-19 12:41:01 UTC
See "Steps to Reproduce" and "Additional Information"…

Reproducible: Always

Steps to Reproduce:
1. Make sure the "Pager" is present on the plasma shell somewhere and that you are using "KWin" as window manager
2. Minimize some window (preferably on an otherwise empty virtual desktop) and observe it disappearing from the "Pager" display
3. Open the "System settings" (from KDE 5)
4. Navigate to "Display and Monitor" → "Compositor"
5. Change the setting "Keep window thumbnails" to "Always"
6. Click "Apply"

Actual Results:  
The minimized window is displayed in the "Pager" display as if it weren't minimized (but it's actually not visible when switching to that virtual desktop).

Expected Results:  
The minimized window should be display in the "Pager" preview area. Changing the "Keep window thumbnails" setting should not have any effect.

Using "xprop" and "diff" on the window in question, the following observations were made:

When disabling window thumbnails for minimized windows, the minimized window has its window state set to "Iconic"; when enabling window thumbnails for minimized windows it's window state is always "Normal" and does change (whether you minimize it or not).

Minimized windows always receive the additional "_NET_WM_STATE_HIDDEN" window manager state flag. This is behaviour is not influenced by the "keep window thumbnails" settings.

My (educated) guess therefor is that "Pager" only checks whether a window's state is "Iconic" or not to determine whether it should be displayed as part of the preview or not. It does not, however, also check for the "_NET_WM_STATE_HIDDEN" atom to determine whether a window really is visible or not.
Comment 1 David Edmundson 2015-12-20 20:58:11 UTC
thanks
Comment 2 Kai Uwe Broulik 2015-12-21 22:47:50 UTC
Re-assigning to KWindowSystem as the Pager does check for isMinimized() which should work even if the window is not "technically" minimized?
Otherwise we could just add an additional info.hasState(NET::Hidden) check.
Comment 3 Martin Flöser 2016-01-03 09:11:02 UTC
When selecting "Always" a message pops up telling you that this option interferes with the minimized state of the window. One of the results is that a window is considered to not be minimized.

There is nothing we can do about that in Pager and or taskbar.
Comment 4 Erin Yuki Schlarb 2016-01-03 13:34:39 UTC
> There is nothing we can do about that in Pager and or taskbar.
Yes, there *is* something you can do:
You can check for "_NET_WM_STATE_HIDDEN". That's why you set that atom, right?

> When selecting "Always" a message pops up telling you that this option interferes with the minimized state of the window. One of the results is that a window is considered to not be minimized.
Also "interferes with the minimized state of windows" tells me: The window might continue to draw/render/… while it's minimized, not that the pager will *incorrectly* report it as not being minimized.

Please, revise your decision, thanks.
Comment 5 Erin Yuki Schlarb 2016-01-22 11:59:19 UTC
Martin Gräßlin: Could you please explain to me why KWin sets the _NET_WM_STATE_HIDDEN atom, if even you yourself refuse to make use of it?
Comment 6 Erin Yuki Schlarb 2016-02-13 14:27:57 UTC
Martin Gräßlin:
Your argument "there is nothing we can do" is *definitely* not true, however (after thinking it through once more) your argument is probably that: "Since X doesn't believe the window to be minimized, we won't 'lie' to applications (that might expect `.isMinimized()` == Window state Iconic) by also checking for `_NET_WM_STATE_HIDDEN`". I don't know whether I'm on the right track here, of course, since you've been ignoring me, …
Was your actual message: "If an application *really* wants to know whether a window is visible (for the user) it has to check for `_NET_WM_STATE_HIDDEN` itself." ? Should the `info.hasState(NET::Hidden)` check proposed by Kai be implemented?

Yours faithfully,
Alexander
Comment 7 Justin Zobel 2021-03-09 05:54:09 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 8 Erin Yuki Schlarb 2021-03-09 19:21:05 UTC
While I believe that this issue still persists on X11, it never existed on Wayland so it'll eventually completely fix itself. :-)