Dock click action "previews" focuses instead

Bug #1987330 reported by John Barrett
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-shell-extension-ubuntu-dock (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Description: Ubuntu 22.04.1 LTS
Release: 22.04

gnome-shell-extension-ubuntu-dock:
  Installed: 72~ubuntu5.22.04.1
  Candidate: 72~ubuntu5.22.04.1
  Version table:
 *** 72~ubuntu5.22.04.1 500
        500 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages
        100 /var/lib/dpkg/status
     72~ubuntu5 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu jammy/main i386 Packages

With the Ubuntu dock click-action set to previews, focusing on one program then clicking on the icon of a different program with multiple windows focuses the most recently used window from that program instead of showing the previews.

Steps to reproduce:-

1) Open multiple Terminal windows (or any program I guess, but I used Terminal and Firefox for testing)
2) Open Firefox
3) Click on the Terminal icon in the dock

Expected behaviour:

Previews for all the Terminal windows are shown

Actual behaviour:

The most recent Terminal window is focused.

Additional info:

Appears to be a regression of #1947445, which was supposedly fixed in version 70 but I'm on version 72. I've tried setting the click-action via gsettings and by editing /usr/share/glib-2.0/schemas/10_ubuntu-dock.gschema.override (as per #1770405) but neither has any effect.

Revision history for this message
John Barrett (johnmbarrett) wrote :
tags: added: jammy
Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
importance: Undecided → Low
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

According to the comment in the upstream code this is not what is expected to happen.

Basically the previews mode is only meant to ALWAYS show the previews when multiple windows are available, without focusing one first. While if one window is there, there's no need for the preview.

The behavior you want can be easy achivied by patching the code with:

diff --git a/appIcons.js b/appIcons.js
index d5bcbf2..3cbbd6c 100644
--- a/appIcons.js
+++ b/appIcons.js
@@ -575,7 +575,7 @@ var DockAbstractAppIcon = GObject.registerClass({
                 if (!Main.overview.visible) {
                     // If only one windows is present just switch to it, but only when trigggered with the
                     // simple click action (no modifiers, no middle click).
- if (singleOrUrgentWindows && !modifiers && button == 1) {
+ if (hasUrgentWindows && !modifiers && button == 1) {
                         let w = windows[0];
                         Main.activateWindow(w);
                     } else

However I'm not sure it should be the default, while you can open a bug upstream or request for a further mode that always shows the previews.

Revision history for this message
John Barrett (johnmbarrett) wrote :

Thanks for your comment, but I think I might not have explained myself clearly in the initial bug report.

The behaviour you describe in your second paragraph (focus if one window, preview if multiple) is what I want and what the code implies should happen, but isn't what's happening. Rather, (on my system at least) click-action previews ALWAYS focuses first regardless of the number of windows.

This can be seen in the video I attached, where the first click focuses one of the terminal windows even though there are two open, and the previews only show up on the second click.

Basically previews mode seems to be acting exactly the same as focus-or-previews, which doesn't seem right.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Mh, the only case I could see this from code is if a window is marked as urgent, but this doesn't seem likely...

Other possibility is that the option is wrongly set... Please check what gsettings gives to you.

Revision history for this message
John Barrett (johnmbarrett) wrote :

The option is correctly set, you can see the output of gsettings in the attached video. Regardless, the issue seems to have spontaneously resolved itself despite no apparent change to the installed version of dash-to-dock (apt list still has it at 72~ubuntu5.22.04.1), so I've marked this bug as Invalid. Thanks for your help.

Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.