Mouse events pass through pure Wayland windows (that use wl_shell)

Bug #1739625 reported by Hadrien
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mutter
Fix Released
Medium
mutter (Ubuntu)
Fix Released
High
Daniel van Vugt

Bug Description

  * When I run 'mpv', the video player, and I click on the main window with my mouse, the click goes through and select whatever window was behind.
  * The same thing happens if I build a SDL tutorial and start it with SDL_VIDEODRIVER=wayland.
  * The same thing happens if I build this Wayland tutorial: https://github.com/hdante/hello_wayland
  * The same thing with Jan Newmarch's Wayland tutorial examples.

These different cases lead me to believe that the problem lies in Gnome Wayland compositor and not in these programs.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: gnome-shell 3.26.2-0ubuntu0.1
ProcVersionSignature: Ubuntu 4.13.0-19.22-generic 4.13.13
Uname: Linux 4.13.0-19-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.6
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Thu Dec 21 15:47:50 2017
DisplayManager: gdm3
InstallationDate: Installed on 2017-10-02 (79 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Alpha amd64 (20170926)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Hadrien (psydk) wrote :
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
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Confirmed in 18.04 too.

Changed in wayland (Ubuntu):
status: New → Confirmed
Changed in gnome-shell (Ubuntu):
importance: Undecided → High
Changed in wayland (Ubuntu):
importance: Undecided → High
tags: added: noclick
summary: - Mouse events pass trough pure Wayland windows
+ Mouse events pass through pure Wayland windows
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Mouse events pass through pure Wayland windows

Sounds like either an incorrect usage of wl_surface::set_input_region by the clients, or an incorrect default by gnome-shell.

Certainly the spec says it should be "infinite" by default:
  https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_surface
So that should stop this from happening even with the simplest native Wayland clients.

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

Also, the bug does not occur in as Weston login so it seems to be specific to Gnome Shell.

no longer affects: wayland (Ubuntu)
Changed in mutter (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in mutter:
importance: Unknown → High
status: Unknown → Confirmed
Changed in gnome-shell (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in mutter (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in gnome-shell (Ubuntu):
status: Confirmed → In Progress
Changed in mutter (Ubuntu):
status: Confirmed → In Progress
Changed in mutter:
importance: High → Unknown
status: Confirmed → Unknown
Changed in mutter:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK, I have a fix on the way upstream: https://bugzilla.gnome.org/show_bug.cgi?id=790309

We'll try to get it into Ubuntu ASAP.

no longer affects: gnome-shell (Ubuntu)
tags: added: wayland
summary: - Mouse events pass through pure Wayland windows
+ Mouse events pass through pure Wayland windows (that use wl_shell)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The fix has landed upstream. It's due for release in mutter 3.26.3 ...
https://git.gnome.org/browse/mutter/commit/?h=gnome-3-26&id=294cceaeb8ecfd468132eff8af1f75c9d60ff21d

Revision history for this message
Hadrien (psydk) wrote :

Nice! Good job, Daniel.

I learned with one of your comment that the wl_shell interface is deprecated. After some search, it seems that zxdg_shell_v6 should be used instead?

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

Yes and no :)

I believe the "z" prefix means that interface is still unstable and subject to change. So you might actually be better off staying with wl_shell which is "stable" and won't change. The fix for this bug will be in Ubuntu 18.04 soon hopefully, and I think it may probably land in 17.10 too, based on previous updates.

Changed in mutter:
status: Confirmed → Fix Released
tags: added: fixed-in-3.26.3
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

mutter (3.27.91-1) experimental; urgency=medium

  * New upstream development release (LP: #1751070)
  * Bump minimum libgbm-dev to 17.1 and libdrm-dev to 2.4.83
  * Build-Depend on libcogl-dev (needed for build but shouldn't be…)
  * Cherry-pick bump-api.patch
  * Update package names for soname bump

 -- Jeremy Bicha <email address hidden> Thu, 22 Feb 2018 08:54:47 -0500

Changed in mutter (Ubuntu):
status: In Progress → Fix Released
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.