Bug 455974 - Present windows with multiple monitors only shows windows on active display
Summary: Present windows with multiple monitors only shows windows on active display
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-present-windows (show other bugs)
Version: 5.25.4
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-26 20:02 UTC by Michael Magyar
Modified: 2022-11-17 01:14 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Magyar 2022-06-26 20:02:31 UTC
SUMMARY
After upgrading to the Plasma 5.25.0 the "Toggle Present Windows (Windows class)" feature is only showing windows on the currently active display. Previously, all windows of the same type from all monitors where displayed. Interestingly enough, one 1 occasion after reboot and restore of windows the feature did work correctly until I moved a windows to a different monitor.

STEPS TO REPRODUCE
1. Connect multiple displays
2. Open multiple instances of the same application ( Chrome, Konsole, etc )
3. Place application window instances on different monitors
4. Activate "Toggle Present Windows (Window class)"

OBSERVED RESULT
Only windows on the currently active monitor are shown in the "Toggle Present Windows (Windows class).

EXPECTED RESULT
All windows of the same class across all monitors should be displayed in the effect. 

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: KDE Neon
(available in About System)
KDE Plasma Version: 5.25.0
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.4

ADDITIONAL INFORMATION
Graphics platform X11
Comment 1 Michael Magyar 2022-06-27 15:31:40 UTC
Upgrading to KDE Plasma 5.25.1 this morning shows the issue is also present in the .1 bugfix release.
Comment 2 Nate Graham 2022-06-27 18:01:30 UTC
This is fixed in 5.25.2
Comment 3 Michael Magyar 2022-06-27 18:59:07 UTC
Thank you Nate.
Comment 4 Nate Graham 2022-06-27 19:03:38 UTC
Don't thank me, thank Marco Martin who fixed it!
Comment 5 Michael Magyar 2022-06-30 02:18:29 UTC
Thank you for correcting me, and thank you @Marco Martin for your efforts.

I'm afraid however that after upgrading to KDE Plasma 5.25.2 the issue appears to persist.

I am happy to get any debug logs that might help.

I am not an application programmer myself, but am interested in this issue to try. From scanning kwin git for changes by Marco, this seems to be in the right area: https://invent.kde.org/plasma/kwin/-/merge_requests/2572#02f187e00e0c8ed2de4cd3e9e209662cd3a290af_413_435

The keyword 'activeScreen' jumps out at me due to the behaviour being related to the active screen when the effect is started.

To be clear, I am just trying to orient myself to the code base and recent changes. I am not trying to increase the priority or assign blame.

I would appreciate any pointers you can offer to get started. I am aware of https://community.kde.org/Get_Involved/development and https://www.youtube.com/watch?v=B4xoc0K5iA4, and will start there during my long weekend.

Thank you.
Comment 6 Kirby 2022-06-30 20:34:50 UTC
KDE Plasma Version: 5.25.2
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
Kernel Version: 5.18.7-arch1-1 (64-bit)
Graphics Platform: X11

In my case, on 5.25.2, with multiple monitors, I can search by starting to type say "kon" for konsole on my secondary monitor.  It will find and highlight konsole on the monitor.  I can't hit enter to select it so Present Windows effectively only work the one monitor.

If I have two konsole applications with one on each monitors, it will select the one for that monitor.  Present windows invoked on a particular screen searches and allows selection for only that particular screen.
Comment 7 matthewsha 2022-07-12 18:19:53 UTC
Persists in 5.25.3  x11. present all windows  works, present current  desktop works, present window class leaves out windows on other screen (not the screen in focus).
Comment 8 matthewsha 2022-07-12 18:38:41 UTC
PS. clicking icons on windows only task manager presents all windows in groups correctly on both screens. Perhaps related is the present window class with thunderbird apps. clicking on the WOTM shows all windows, but the present windows hotkey shows subclasses only, e.g. Write or Inbox  windowss but not both.
Comment 9 Raman Gupta 2022-07-19 13:03:02 UTC
Same problem here on:

Operating System: Fedora Linux 36
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.3
Kernel Version: 5.18.11-200.fc36.x86_64 (64-bit)
Graphics Platform: X11

This is a regression as this has previously been working fine for years. Have tried Chrome and IntelliJ IDEA and both applications only present their windows on the active screen.
Comment 10 Raman Gupta 2022-07-21 18:46:34 UTC
The other related behavior that has changed is that when doing "Toggle Present Windows (Window class)", it used to show all the windows, but only if they were on the same desktop.

i.e.: old (and IMO correct behavior):

same screen, same desktop: yes
different screen, same desktop: yes
same screen, different desktop: no
different screen, different desktop: no

current behavior:

same screen, same desktop: yes
different screen, same desktop: no
same screen, different desktop: yes
different screen, different desktop: no

IOW, the logic used to show the window as long as it was on the same desktop regardless of screen, and now it shows the window as long as it is on the same screen regardless of desktop.
Comment 11 matthewsha 2022-07-22 16:46:46 UTC
@MMagyar: nice summary. Another present windows class issue:  window settings are ignored. E.g. set kde connect and kde connect sms to substring match, ctrl+F7 will ignore whichever window is not selected.
Comment 12 matthewsha 2022-08-03 00:39:21 UTC
Still Broken on 5.25.4
Comment 13 Raman Gupta 2022-08-03 13:21:12 UTC
Man, this bug is annoying. Totally breaks my workflow. How does breaking fundamental stuff like this get through testing?
Comment 14 matthewsha 2022-08-11 19:15:57 UTC
No news on this bug
Comment 15 matthewsha 2022-09-13 20:43:06 UTC
5 updates, no fix.
Comment 16 Bug Janitor Service 2022-09-14 12:10:19 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2946
Comment 17 Vlad Zahorodnii 2022-09-15 06:52:42 UTC
Git commit be784ba5d2370dd952896df0bc3fd13bd6348eee by Vlad Zahorodnii.
Committed on 15/09/2022 at 06:39.
Pushed by vladz into branch 'master'.

effects/windowview: Fix "active class" mode

Each screen has its own WindowHeap. So setting WindowHeap.activeClass
won't be visible on other screens.

In order to address that limitation, we could monitor
Workspace.activeClient property.

M  +0    -1    src/effects/private/qml/WindowHeap.qml
M  +6    -16   src/effects/private/qml/WindowHeapDelegate.qml

https://invent.kde.org/plasma/kwin/commit/be784ba5d2370dd952896df0bc3fd13bd6348eee
Comment 18 matthewsha 2022-09-16 19:42:46 UTC
IT WORKS! YIPPEE! Many thanks.
Comment 19 Kirby 2022-10-14 04:26:08 UTC
This is still an issue where a search a for an application via Present Windows finds the window after filtering on the other monitor but is unable to select it using Enter.

Operating System: Arch Linux
KDE Plasma Version: 5.26.0
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Kernel Version: 6.0.1-arch1-1 (64-bit)
Graphics Platform: X11
Comment 20 Vlad Zahorodnii 2022-10-14 07:08:44 UTC
That's a different problem, please file a new bug report instead of reopening old ones.
Comment 21 Raman Gupta 2022-10-27 18:48:18 UTC
(In reply to Kirby from comment #19)
> This is still an issue where a search a for an application via Present
> Windows finds the window after filtering on the other monitor but is unable
> to select it using Enter.

@Kirby, did you end up creating a new issue for this? If so, can you link it here? Using the keyboard to select a window is an important use case for me.
Comment 22 Kirby 2022-10-27 20:01:26 UTC
(In reply to Raman Gupta from comment #21)
> (In reply to Kirby from comment #19)
> > This is still an issue where a search a for an application via Present
> > Windows finds the window after filtering on the other monitor but is unable
> > to select it using Enter.
> 
> @Kirby, did you end up creating a new issue for this? If so, can you link it
> here? Using the keyboard to select a window is an important use case for me.

I have not yet.  Frankly, KDE breaks my workflow often enough with minor unresolved bugs I'm considering moving to a tiling window manager.
Comment 23 Raman Gupta 2022-11-17 01:14:54 UTC
Created https://bugs.kde.org/show_bug.cgi?id=461927 for anyone interested in the keyboard type and select issue.