After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 736398 - windowlist: Shows some windows multiple times (dual monitor)
windowlist: Shows some windows multiple times (dual monitor)
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: extensions
3.13.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-09-10 09:55 UTC by Colin Guthrie
Modified: 2014-09-11 10:14 UTC
See Also:
GNOME target: 3.14
GNOME version: ---


Attachments
window-list: Do not add sticky windows more than once (1.36 KB, patch)
2014-09-11 09:17 UTC, Florian Müllner
committed Details | Review

Description Colin Guthrie 2014-09-10 09:55:09 UTC
Not sure of the exact conditions that trigger it, but I often get windows showing up twice in the officially supported window-list extension.

It requires that you have dual displays and that the window is on the secondary display. In my case I have the tweak "workspaces only on primary display" active (not sure if this is the default or not).

It seems that the window is shown in the windowlist as many times as you have active worksplaces + 1 (i.e. the spare).

It requires a shell restart to see the duplicate windows, but disabling+enabling the extension itself seems to fix it up.
Comment 1 Matthias Clasen 2014-09-11 01:09:28 UTC
sounds like something we should fix for classic mode in 3.14
Comment 2 Florian Müllner 2014-09-11 09:17:54 UTC
Created attachment 285892 [details] [review]
window-list: Do not add sticky windows more than once

When a window's on-all-workspaces property changes to true, the
workspaces the window was not located on will emit the ::window-added
signal for the window; however we don't want multiple buttons for
the same window, so filter out the extra calls.
Comment 3 Rui Matos 2014-09-11 09:35:40 UTC
Review of attachment 285892 [details] [review]:

Looks good.

I wonder though, if we should always check if we already have a button for a window instead of only when if (on_all_workspaces) ?
Comment 4 Colin Guthrie 2014-09-11 09:57:33 UTC
Review of attachment 285892 [details] [review]:

Fixes the immediate problem for me - thanks! 

I've not looked at the code for grouping (I don't use this feature) but would this also handle the case of grouped windows OK if that option were turned on?

Rui's suggestion of always checking seems reasonable too if it could prevent future edge cases (although not sure immediately what they are)
Comment 5 Florian Müllner 2014-09-11 10:01:02 UTC
(In reply to comment #3)
> I wonder though, if we should always check if we already have a button for a
> window instead of only when if (on_all_workspaces) ?

I wouldn't mind, I just couldn't think of anything that would require this in the !on_all_workspaces case ...
Comment 6 Florian Müllner 2014-09-11 10:10:42 UTC
(In reply to comment #4)
> I've not looked at the code for grouping (I don't use this feature) but would
> this also handle the case of grouped windows OK if that option were turned on?

Grouped windows aren't affected by this bug.
Comment 7 Florian Müllner 2014-09-11 10:14:08 UTC
Attachment 285892 [details] pushed as 191c7cc - window-list: Do not add sticky windows more than once

Pushed with the on_all_workspaces check removed.