[Wayland] Can not select JetBrains IntelliJ IDEA windows (including Android Studio) with mouse in workspace

Bug #1969574 reported by Saeed
300
This bug affects 8 people
Affects Status Importance Assigned to Milestone
GNOME Shell
New
Unknown
mutter (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

I have 3 apps open in 1 workspace,
When i press window key and i want to select app 2 or 3 with mouse, app 1 shows up!
I can only go to app 2 with [window + tab] or [alt + tab]

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: gnome-shell 42.0-2ubuntu1
ProcVersionSignature: Ubuntu 5.15.0-25.25-generic 5.15.30
Uname: Linux 5.15.0-25-generic x86_64
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Wed Apr 20 11:05:02 2022
DisplayManager: gdm3
InstallationDate: Installed on 2021-11-25 (145 days ago)
InstallationMedia: Ubuntu 20.04.3 LTS "Focal Fossa" - Release amd64 (20210819)
RelatedPackageVersions: mutter-common 42.0-3ubuntu2
SourcePackage: gnome-shell
UpgradeStatus: Upgraded to jammy on 2022-04-16 (3 days ago)

Revision history for this message
Saeed (saeedp47) wrote :
Revision history for this message
Saeed (saeedp47) wrote :

I just notice that this happens with WebStorm + PhpStorm windows randomly!
I have no idea this is a gnome-shell bug or IDE itself ...

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

I can't seem to reproduce it with standard GNOME apps. Can you provide a test case using the default apps installed with Ubuntu?

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
Saeed (saeedp47) wrote :

@vanvugt
I'm also have no problem with gnome apps,
As i said, i have this with JetBrains IDE windows :(

summary: - Can not select app with mouse in workspace
+ Can not select JetBrains IDE windows with mouse in workspace
Changed in gnome-shell (Ubuntu):
status: Incomplete → New
Saeed (saeedp47)
summary: - Can not select JetBrains IDE windows with mouse in workspace
+ [Wayland] Can not select JetBrains IDE windows with mouse in workspace
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: [Wayland] Can not select JetBrains IDE windows with mouse in workspace

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

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The root cause here may also relate to bug 1944065.

Changed in gnome-shell (Ubuntu):
importance: Undecided → Medium
summary: - [Wayland] Can not select JetBrains IDE windows with mouse in workspace
+ [Wayland] Can not select JetBrains IntelliJ IDEA windows (including
+ Android Studio) with mouse in workspace
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Changed in gnome-shell (Ubuntu):
status: Confirmed → In Progress
Changed in mutter (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
Changed in gnome-shell (Ubuntu):
status: In Progress → Triaged
Changed in mutter (Ubuntu):
status: In Progress → Fix Committed
no longer affects: gnome-shell (Ubuntu)
tags: added: fixed-in-42.1 fixed-upstream
Revision history for this message
Jeremy Bícha (jbicha) wrote :

This sounds like LP: #1971693 so I'm marking this a duplicate.

We will be pushing a proposed fix for that bug soon.

Please let us know if that update doesn't fix this issue for you.

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

This bug is where all the action was and what we've been linking to for weeks so this should remain the primary bug.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

the sru upload uses 1971693 though..

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

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

---------------
mutter (42.1-1ubuntu1) kinetic; urgency=medium

  [ Jeremy Bicha ]
  * Merge from Debian unstable. Remaining changes:
    - Add triple-buffering patch
    - Add x11-Add-support-for-fractional-scaling-using-Randr.patch:
      + X11: Add support for fractional scaling using Randr
    - Add ubuntu/wayland-data-device-Allow-any-drag-timestamp....patch
      + Allow any drag timestamp as drag start serial
    - Add backends-native-kms-crtc-Don-t-compare-gamma-values-on-un.patch
      + Avoid memory errors when comparing gamma values
    - Add monitor-manager-Ensure-monitors-settings-after-backend-ha.patch
      + Ensure privacy screen settings are applied on startup
    - Add patches from GNOME !2364
      + Fix X11 selection related crash when Xwayland died
    - debian/libmutter-10-0.symbols: Add symbols for triple buffering patch
  * Refresh triple buffering patch with latest version

  [ Marco Trevisan (Treviño) ]
  * debian/patches: Adapt expected messages to new domains

mutter (42.1-1) unstable; urgency=medium

  * New upstream release
    (LP: #1972726, #1967274, #1965557, #1969574, #1948410, #1967219, #1971693)
  * Drop patches applied in new release
  * debian/libmutter-10-0.symbols: Add new symbol
  * debian/libmutter-10-0.symbols: Drop a symbol that was only in experimental
  * Add Breaks against old gtk3 & gtk4 versions.
    See Ubuntu bug 1972721
  * Release to unstable

mutter (42.0-5) experimental; urgency=medium

  * Team upload
  * d/patches: Update to upstream commit 42.0-74-g6c8e8fbba
    - Bug fixes targeted for 42.1
    - d/p/clutter-stage-Repick-when-pointer-actor-goes-unmapped.patch:
      Replace with the version that was applied upstream
    - d/p/core-Account-ClutterStage-grabs-on-Wayland-key-focus-sync.patch:
      Mark as applied upstream

mutter (42.0-4) unstable; urgency=medium

  * Team upload
  * d/patches: Update to upstream commit 42.0-55-gbe9deeba0
    - Update translations
    - Update upstream status of cherry-picked patches
    - Add various bug fixes including LP: #1959888, LP: #1964037
  * d/p/core-Account-ClutterStage-grabs-on-Wayland-key-focus-sync.patch:
    Add patch proposed upstream to fix grabs vs. system-modal prompts.
    This is particularly annoying when using pkexec, or when using gcr as
    a passphrase prompt for PGP, ssh and/or sudo.
    (Closes: #1008998, LP: #1964442)

 -- Jeremy Bicha <email address hidden> Fri, 13 May 2022 09:14:41 -0400

Changed in mutter (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Dmitry Batrak (dmitry-batrak) wrote :

Even though https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1971693 seems to be resolved with the latest update (with mutter 42.1), the use case described in this ticket still doesn't work as expected every time. Here are the steps to reproduce the issue for the attached minimal Java application:

1. sudo apt install default-jre
2. Download attached file TwoFrames.java
3. From a terminal run the app
java Downloads/TwoFrames.java
4. Press Super (Window) key on the keyboard and click with mouse on frame 1. Then press Super, and click on frame 2. Repeat several times.

At some point, the focus switch will fail, with previously selected frame staying in focus.

Revision history for this message
Dmitry Batrak (dmitry-batrak) wrote :

I'm attaching the source code for a sample X client application, for which the problem can be reproduced reliably. The application uses 'globally active' input focus model, just like Java (AWT/Swing) applications, but also waits for 10 milliseconds before reacting to WM_TAKE_FOCUS message. If such an artificial delay isn't performed (just comment out 'usleep' call in the source code), the problem can be reproduced as well, but only with a certain probability.

The sample app can be compiled and launched using the following command:
gcc twoFrames.c -lX11; ./a.out

Changed in mutter (Ubuntu Jammy):
status: New → Fix Released
importance: Undecided → Medium
Saeed (saeedp47)
information type: Public → Public Security
Revision history for this message
Bryn Cooke (bryncooke) wrote :

I have also noticed the behavior mentioned in https://bugs.launchpad.net/gnome-shell/+bug/1969574/comments/12.

It fails approx 50% of the time for me, which is an improvement from before, but still not ideal.

Note that Alt-Tab does not seem to be affected, just selecting via the workspace.

Jeremy Bícha (jbicha)
Changed in mutter (Ubuntu):
status: Fix Released → Confirmed
Changed in mutter (Ubuntu Jammy):
status: Fix Released → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The upstream bug is still closed: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5395

If you find a problem with the fix then please mention it UPSTREAM. If not in the above link then in a new bug: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/new

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

Looks like this could be handled better by https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2489 but it's still in the works.

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

Let's assume this is not fixed still and that https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5395 was a different problem.

Anyone still experiencing this bug, please report it upstream and then tell us the new issue ID.

Changed in mutter (Ubuntu):
status: Confirmed → Fix Released
status: Fix Released → Confirmed
no longer affects: mutter (Ubuntu Jammy)
tags: removed: fixed-in-42.1 fixed-upstream
no longer affects: gnome-shell
Changed in mutter (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Dmitry Batrak (dmitry-batrak) wrote :

As per the above request, I've created a new upstream ticket for this problem - https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5834

affects: mutter → gnome-shell
Changed in mutter (Ubuntu):
status: Incomplete → Confirmed
Changed in gnome-shell:
status: Unknown → New
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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