Single click on title bar does not transfer focus to target window (server side decorations in Xorg sessions)

Bug #2013216 reported by Nathan Teodosio
228
This bug affects 41 people
Affects Status Importance Assigned to Milestone
Mutter
Fix Released
Unknown
mutter (Ubuntu)
Fix Released
Medium
Unassigned
Lunar
Fix Released
Medium
Unassigned

Bug Description

Impact
------
Single clicking the title bar of windows without a complex title bar (namely a title bar with additional buttons besides the close/maximinze/minimize) does not transfer focus to them.

Test Case
---------
1. Open gnome-terminal.
2. Run xedit.
3. Focus gnome-terminal.
4. Click Xedit's title bar.

Expected: Xedit has focus.
Observed: gnome-terminal retains focus.
.
5. Focus Xedit.
6. Click gnome-terminal's title bar.

Expected and observed: Xedit relinquishes focus and gnome-terminal gets focus.

Other Info
----------
I can reproduce this in my main, up to date Lunar system in Xorg and also in a virtual machine with the 2023-03-24 09:02 iso (https://cdimage.ubuntu.com/daily-live/current/lunar-desktop-amd64.iso).

What Could Go Wrong
-------------------
This fix is included in the upstream mutter 44.1 release. See LP: #2020225 for more details.

ProblemType: Bug
DistroRelease: Ubuntu 23.04
Package: gnome-shell 44.0-2ubuntu2
ProcVersionSignature: Ubuntu 6.2.0-18.18-generic 6.2.6
Uname: Linux 6.2.0-18-generic x86_64
ApportVersion: 2.26.0-0ubuntu2
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Wed Mar 29 11:53:02 2023
DisplayManager: gdm3
InstallationDate: Installed on 2022-05-16 (316 days ago)
InstallationMedia: Xubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
RelatedPackageVersions: mutter-common 44.0-2ubuntu2
SourcePackage: gnome-shell
UpgradeStatus: Upgraded to lunar on 2023-01-17 (70 days ago)

Revision history for this message
Nathan Teodosio (nteodosio) wrote :
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
tags: added: focus
summary: Single click on title bar does not transfer focus to target window
+ (server side decorations in Xorg sessions)
affects: gnome-shell (Ubuntu) → mutter (Ubuntu)
Changed in mutter (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Changed in mutter:
status: Unknown → New
Changed in mutter:
status: New → Fix Released
Changed in mutter (Ubuntu):
status: Triaged → Fix Committed
tags: added: fixed-in-mutter-44.1 fixed-upstream
Revision history for this message
Daniel McFeeters (fiforms) wrote :

I am experiencing this same issue on Ubuntu 23.04 Beta

Revision history for this message
Peter Freeth (peterfreeth) wrote :

Same problem as soon as I upgraded to 23.04. Gnome 44.0 Linux 6.2.0-20-generic.

If I move a lower window by its title bar then it raises to the top, but if I just click on it then stays below. This is a problem because clicking in a window's active area to raise it is likely to change something in that window. For example if the lower window is a graphics program then clicking in the active area could change the image I'm working on without me realising. I need to click on the titlebar as it is a 'neutral' area.

Revision history for this message
mike@papersolve.com (mike-papersolve) wrote :

this should be fixed when ubuntu upgrades to gnome 44.1 which will hopefully be soon! memory leak bugs that were fixed are also affecting me (as well as this very annoying bug)

Revision history for this message
Scott Wilson (bswilson) wrote :

Is there any specific date that Gnome 44.1 will be released for Lunar?

Also, FYI only, I've noticed that Firefox (snap, version 112.0.2-1, rev 2605) doesn't seem to suffer the same issue as other application windows. I wonder why that is?

Revision history for this message
AndreK (andre-k) wrote :

This is an annoying bug that gives a very inconsistent experience.
Apparently affecting 21 people ... NO . this is affecting thousands of users, it's just hard to google/find as a topic.
This deserves much higher priority.

Revision history for this message
Daniel Knittl-Frank (knittl) wrote (last edit ):

This is also affecting the "middle-click to lower window" and "double-click to toggle shade" (both can be set in GNOME Tweaks > Window Titlebars > Titlebar Actions).

Lowering windows still works for windows with a "complex title bar" (I thought it was only apps already migrated to newer GTK?), but doesn't work for regular windows. Shade cannot be toggled at all, regardless of style of the title bar.

Lunar 23.04 with all updates, GNOME Shell 44.0.

(I'm running on Xorg, due to Wayland breaking similar and other things, most notably the "middle-click to lower")

Revision history for this message
Antonio Esteves (ajaesteves) wrote :

I have this problem too on Ubuntu 23.04.

Revision history for this message
Sylvain (syl201) wrote :

I have this problem too. Hoping a fix soon (y)

And since the upgrade to 23.04, I encountered an strange issue with windows focus: loosing focus when I switch workspace, that I think is related to our issue here. I fixed this other issue with : https://askubuntu.com/a/1464916

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 44.1-1ubuntu1

---------------
mutter (44.1-1ubuntu1) mantic; urgency=medium

  * Merge with Debian (LP: #2020225, LP: #2012100, LP: #2012717,
    LP: #2013216, LP: #2019225, LP: #2006044, LP: #2015861, LP: #1999578,
    LP: #2011251, LP: #2016308)
  * Remaining changes:
    - Add x11-Add-support-for-fractional-scaling-using-Randr.patch
    - Add window-Add-ability-to-override-the-edge-constraints.patch
      + Make possible for extensions (such as Tiling Assistant) to override
        window constraints. (LP: #2007710, #2011611)

mutter (44.1-1) experimental; urgency=medium

  [ Jeremy Bícha ]
  * New upstream release
  * Drop bash patch applied in new release
  * debian/libmutter-12-0.symbols: Add new symbols

  [ Daniel van Vugt ]
  * Update triple buffering patch for Mutter 44.1

  [ Marco Trevisan (Treviño) ]
  * Fix issue with Firefox opening black window in wayland sessions
    - Add d/p/display-Set-compositor-selection-earlier-on-XWayland.patch
      (LP: #1987976)

 -- Jeremy Bícha <email address hidden> Fri, 19 May 2023 16:24:49 -0400

Changed in mutter (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Jonathan Kamens (jik) wrote :

This bug is not fixed. Still happening for me in Xorg on Mantic.

Revision history for this message
Jonathan Kamens (jik) wrote :

What do I do about the fact that I am unable to edit the status of the bug to indicate that it is not fixed? File a new bug?

Revision history for this message
Nathan Teodosio (nteodosio) wrote : Re: [Bug 2013216] Re: Single click on title bar does not transfer focus to target window (server side decorations in Xorg sessions)

 > This bug is not fixed. Still happening for me in Xorg on Mantic.

The fix works for me (mutter 44.1-1ubuntu1).

Did you log out?

Revision history for this message
Jonathan Kamens (jik) wrote :

Logged out, rebooted, made sure all packages are up-to-date, none of it made a difference.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Jonathan, please open a new bug. You can run this command to include basic information about your system:

ubuntu-bug libmutter-12-0

Jeremy Bícha (jbicha)
Changed in mutter (Ubuntu Lunar):
importance: Undecided → Medium
status: New → In Progress
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Jonathan already opened his own bug 2011251 before this. I'm reluctant to hide the reopening just in there because if it fails for one person then it can fail for another.

Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

The fix in 44.1-1ubuntu1 works for me, at least on Lunar.

Jonathan, please run:

  dconf dump /org/gnome/ > settingschanges.txt

and then attach the resulting text file here. In particular I'm wondering if you have a custom configuration like https://gitlab.gnome.org/GNOME/mutter/-/issues/2817

Changed in mutter (Ubuntu Lunar):
status: In Progress → Incomplete
Changed in mutter (Ubuntu):
status: Fix Released → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think comment #19 is incorrect. That version doesn't contain the fix:

https://launchpadlibrarian.net/662966390/mutter_44.0-2ubuntu4_44.0-2ubuntu4.23.04.1.diff.gz

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think I see the problem. In bug 2011251 Jonathan is using:

  gsettings set org.gnome.desktop.wm.preferences focus-mode 'mouse'

instead of the default:

  gsettings set org.gnome.desktop.wm.preferences focus-mode 'click'

So that's a different problem and bug 2011251 will be reopened. This bug remains closed.

Changed in mutter (Ubuntu):
status: Incomplete → Fix Released
Changed in mutter (Ubuntu Lunar):
status: Incomplete → In Progress
Revision history for this message
Scott Wilson (bswilson) wrote :

Is there any news or ETA for the new mutter 44.1-1ubuntu1 package?

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Scott, the mutter 44.1 update for Ubuntu 23.04 needs to be manually approved by a member of the Ubuntu SRU team before it will be built as a -proposed update.

Once approved, if its passes manual verification and after at least a 7-day wait, it will be released as a normal update for Ubuntu 23.04.

There is a lot more detail about the process at https://wiki.ubuntu.com/StableReleaseUpdates

Revision history for this message
Scott Wilson (bswilson) wrote :

Super, thank you for the information, Jeremy.

-SW

On Tue, May 23, 2023 at 3:55 PM Jeremy Bícha <email address hidden>
wrote:

> Scott, the mutter 44.1 update for Ubuntu 23.04 needs to be manually
> approved by a member of the Ubuntu SRU team before it will be built as a
> -proposed update.
>
> Once approved, if its passes manual verification and after at least a
> 7-day wait, it will be released as a normal update for Ubuntu 23.04.
>
> There is a lot more detail about the process at
> https://wiki.ubuntu.com/StableReleaseUpdates
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/2013216
>
> Title:
> Single click on title bar does not transfer focus to target window
> (server side decorations in Xorg sessions)
>
> Status in Mutter:
> Fix Released
> Status in mutter package in Ubuntu:
> Fix Released
> Status in mutter source package in Lunar:
> In Progress
>
> Bug description:
> Impact
> ------
> Single clicking the title bar of windows without a complex title bar
> (namely a title bar with additional buttons besides the
> close/maximinze/minimize) does not transfer focus to them.
>
> Test Case
> ---------
> 1. Open gnome-terminal.
> 2. Run xedit.
> 3. Focus gnome-terminal.
> 4. Click Xedit's title bar.
>
> Expected: Xedit has focus.
> Observed: gnome-terminal retains focus.
> .
> 5. Focus Xedit.
> 6. Click gnome-terminal's title bar.
>
> Expected and observed: Xedit relinquishes focus and gnome-terminal
> gets focus.
>
> Other Info
> ----------
> I can reproduce this in my main, up to date Lunar system in Xorg and
> also in a virtual machine with the 2023-03-24 09:02 iso (
> https://cdimage.ubuntu.com/daily-live/current/lunar-desktop-amd64.iso).
>
> What Could Go Wrong
> -------------------
> This fix is included in the upstream mutter 44.1 release. See LP:
> #2020225 for more details.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 23.04
> Package: gnome-shell 44.0-2ubuntu2
> ProcVersionSignature: Ubuntu 6.2.0-18.18-generic 6.2.6
> Uname: Linux 6.2.0-18-generic x86_64
> ApportVersion: 2.26.0-0ubuntu2
> Architecture: amd64
> CurrentDesktop: ubuntu:GNOME
> Date: Wed Mar 29 11:53:02 2023
> DisplayManager: gdm3
> InstallationDate: Installed on 2022-05-16 (316 days ago)
> InstallationMedia: Xubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64
> (20220419)
> RelatedPackageVersions: mutter-common 44.0-2ubuntu2
> SourcePackage: gnome-shell
> UpgradeStatus: Upgraded to lunar on 2023-01-17 (70 days ago)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mutter/+bug/2013216/+subscriptions
>
>

Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Nathan, or anyone else affected,

Accepted mutter into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mutter/44.1-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in mutter (Ubuntu Lunar):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-lunar
Revision history for this message
Robert Phair (rphair) wrote :

I installed version 44.1 from `lunar-proposed` (plus all dependencies):

gnome-shell/lunar-proposed,now 44.1-0ubuntu1 amd64 [installed]
gnome-shell-common/lunar-proposed,lunar-proposed,now 44.1-0ubuntu1 all [installed,automatic]

and I can confirm that click-to-raise for the GNOME default titlebars is working again, and the resize mouse cursor doesn't erroneously display inside windows anymore.

tags: added: verification-done-lunar
removed: verification-needed-lunar
Revision history for this message
Scott Wilson (bswilson) wrote :

I was able easily to install version 44.1 as well:

$ sudo apt-get install mutter/lunar-proposed
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Selected version '44.1-0ubuntu1' (Ubuntu:23.04/lunar-proposed [amd64]) for 'mutter'
Selected version '44.1-0ubuntu1' (Ubuntu:23.04/lunar-proposed [all]) for 'mutter-common' because of 'mutter'
The following additional packages will be installed:
  mutter-common
The following packages will be upgraded:
  mutter mutter-common
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 148 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu lunar-proposed/main amd64 mutter-common all 44.1-0ubuntu1 [39.6 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu lunar-proposed/universe amd64 mutter amd64 44.1-0ubuntu1 [109 kB]
Fetched 148 kB in 1s (241 kB/s)
(Reading database ... 244946 files and directories currently installed.)
Preparing to unpack .../mutter-common_44.1-0ubuntu1_all.deb ...
Unpacking mutter-common (44.1-0ubuntu1) over (44.0-2ubuntu4.23.04.1) ...
Preparing to unpack .../mutter_44.1-0ubuntu1_amd64.deb ...
Unpacking mutter (44.1-0ubuntu1) over (44.0-2ubuntu4.23.04.1) ...
Setting up mutter-common (44.1-0ubuntu1) ...
Processing triggers for libglib2.0-0:amd64 (2.76.1-1) ...
Processing triggers for libglib2.0-0:i386 (2.76.1-1) ...
Processing triggers for man-db (2.11.2-1) ...
Setting up mutter (44.1-0ubuntu1) ...

I did not receive an update for gnome-shell or gnome-shell-common, as rphair did. Not sure why.

After logging off and logging back on, all Gnome windows behaved as expected. I WAS able to click on windows and title bars to bring focus to that window. However, I noticed that windows from snap packages DID NOT behave as the native Gnome applications. The same incorrect behavior still occurs with just those applications. The only exception to this has been the snap package of Firefox, which somehow has always worked correctly (meaning that with mutter-43 I could click on the title bar of a Firefox window to bring it into focus).

I've noticed these application windows exhibiting the correct behavior under mutter-44.1:

gedit
nautilus

These snap applications DID NOT behave correctly:

Name Version Rev Tracking Publisher Notes
spotify 1.2.11.916.geb595a67 67 latest/stable spotify✓ -
code b3e4e68a 129 latest/stable vscode✓ classic

Again, the snap package for Firefox continues to be fine?

Name Version Rev Tracking Publisher Notes
firefox 113.0.2-1 2710 latest/stable mozilla✓ -

Thanks.

Revision history for this message
Scott Wilson (bswilson) wrote :

Also, forgive me as I'm a n00b with using Launchpad. I was not sure how to add the tag "verification-failed-lunar". Thanks.

Revision history for this message
Nathan Teodosio (nteodosio) wrote : Re: [Bug 2013216] Re: Single click on title bar does not transfer focus to target window (server side decorations in Xorg sessions)

My understanding is that if the update both works for most windows and
does not introduce any regression, putting verification-failed would
prevent it from landing for all users, which would be counterproductive.

Instead, it would be beneficial to open a new bug reporting your
findings for the snap windows you mentioned.

Revision history for this message
Robert Phair (rphair) wrote :

> I did not receive an update for gnome-shell or gnome-shell-common, as rphair did. Not sure why.

I added lunar-proposed and disabled updates from it by default, as described in the Ubuntu wiki, and then ran "aptitude" and selected the available updates in the "gnome" category. There were 4 of these available and selecting gnome-shell selects them all, plus some other dependencies outside that category, all with version 44.1.

> putting verification-failed would prevent it from landing for all users

I agree with this comment and would think from other comments above that we're in a 7-day trial period to see if no testing failures reported. I don't use the "snap" packages but I can say it will help a lot of people if the functionality of the non-snap packages is made generally available.

Revision history for this message
Robert Phair (rphair) wrote :

I have noted since 2 postings ago that the 44.1 package in lunar-proposed *does not* fix the mouse cursor problem 100% (I've seen it still happens since, though maybe less often).

However I would leave my posted tag of verification-done-lunar because it's a 100% fix for the "single click on title bar" problem as originally posted.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Scott, please open a new bug report. You can run this command to include basic information about your system:

ubuntu-bug libmutter-12-0

After you submit the bug report, leave a comment here with a link to the new bug.

Revision history for this message
mike@papersolve.com (mike-papersolve) wrote :

Argh, click to raise doesn't get fixed for me with this. Maybe because I have focus follows mouse also? I still have to click inside the window somewhere to raise it.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Mike, I believe your issue is being tracked at LP: #2011251

Revision history for this message
Peter Havekes (peter-havekes) wrote :

I enabled the -proposed repository and lowered the priority, then i updated mutter and gnome shell:

sudo apt-get install mutter/lunar-proposed gnome-shell/lunar-proposed

This fixed the raise issue for me. I do not use SNAP applications, so I can't test that

Revision history for this message
Miroslav Zaťko (mirec-z) wrote :

fix for this extremely annoying bug is still not available in lunar

Revision history for this message
Bill (atomics-s) wrote :

about firefox it has a custom titlebar - the UI packs the tabs on the titlebar in order to save screen space. google chrome is the same and also an exception to the bug.

about the snap, it appear to have permission structures involving UI-related middleware (I am guessing), so fixing the interactive user UI session may have left the middleware unfixed/inconsistent?

Jeremy Bícha (jbicha)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Paul Dorman (paul-dorman) wrote :

Worked for me, though I also needed gnome-shell-extension-prefs/lunar-proposed as well as the previous version was removed when I installed mutter/lunar-proposed and gnome-shell/lunar-proposed.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 44.1-0ubuntu1

---------------
mutter (44.1-0ubuntu1) lunar; urgency=medium

  [ Jeremy Bícha ]
  * New upstream release (LP: #2020225, LP: #2012717, LP: #2013216,
    LP: #2015861, LP: #2017097)
  * debian/libmutter-12-0.symbols: Add new symbols
  * Drop 3 patches applied in new release

  [ Daniel van Vugt ]
  * Update triple buffering patch for Mutter 44.1 (LP: #2017137)

 -- Jeremy Bícha <email address hidden> Fri, 19 May 2023 16:18:13 -0400

Changed in mutter (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) wrote : Update Released

The verification of the Stable Release Update for mutter has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
km (km-mathcs) wrote :

When will I see this fix in apt for Luna?

Revision history for this message
Nathan Teodosio (nteodosio) wrote : Re: [Bug 2013216] Re: Single click on title bar does not transfer focus to target window (server side decorations in Xorg sessions)

 > When will I see this fix in apt for Luna?

See https://wiki.ubuntu.com/PhasedUpdates.

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.