gnome-shell 3.38 X11 mode some widgets need to be tapped twice
Affected version
- Linux distribution: Fedora 33 (Reproducible on Fedora 33 Live)
- GNOME Shell version: 3.38.1 and 3.38.3
- (Does not appear in Fedora 32, GNOME Shell 3.36)
- Mutter version: 3.38.1 and 3.38.3
- Only appears in XOrg
Bug summary
In the Activities Overview, the user has to tap the window twice in order to enter the window. In the top bar, the user has to tap a button twice in order to effectively "click" the button.
Steps to reproduce
Experiment 1
- Start Fedora 33 Live with a touch screen device (version of
gnome-shell
andmutter
is 3.38.1). - Switch to X11 mode.
- Open 2 windows.
- Press the super button to enter the activities overview mode.
- Tap a window to switch to it. (Effect A)
- Repeat step 4 and 5 a few times
Experiment 2
- After experiment 1, update
gnome-shell
andmutter
to latest version (3.38.3). - Log out
- In a text terminal
systemctl stop gdm
systemctl start gdm
- Log in
- Try to tap a button on the top bar (Effect B)
- Repeat 4 - 6 in Experiment 1 (Effect C)
Experiment 3 (optional)
- After experiment 2, install the following extension at
~/.local/share/gnome-shell/extensions/fdt38@lxylxy123456.ercli.dev
: https://gist.github.com/lxylxy123456/cc05d9423e7bcbfd1b297446caf50305 - Log out, log in
- Activate the extension with
gnome-extensions enable fdt38@lxylxy123456.ercli.dev
- Open a terminal, monitor GNome shell's logs with
journalctl -f -o cat /usr/bin/gnome-shell
- Tap the new button in the top bar a few times (Effect D)
- Tap some where else and repeat 5 - 6
What happened
- Effect A & C: If the window is not selected before, the user has to tap it twice.
- Effect B: If the button is not selected before, the user has to tap it twice.
- Effect D: When the button is not selected before, the
vfunc_event
on the button on the tap contains 14 (imports.gi.Clutter.EventType.TOUCH_END
), but not 12 (imports.gi.Clutter.EventType.TOUCH_BEGIN
).- Note: due to this, I suspect that this bug may have something to do with Mutter. However I do not have any evidences.
What did you expect to happen
- Effect A & C: If the window is not selected before, the user only has to tap it once (This behavior is observed in Fedora 22 or Fedora 33 Wayland).
- Effect B: If the button is not selected before, the user only has to tap it once, and then menu pops out etc. (This behavior is observed in Fedora 22 or Fedora 33 Wayland).
- Effect D: When the button is not selected before, the
vfunc_event
on the button on the tap contains both 12 (imports.gi.Clutter.EventType.TOUCH_BEGIN
) and 14 (imports.gi.Clutter.EventType.TOUCH_END
). (This behavior is observed in Fedora 33 Wayland; I did not test on Fedora 22).
Relevant logs, screenshots, screencasts etc.
Code Snippet in Extension in Experiment 3
The extension is based on the Indicator template in
gnome-extensions create
, with the following change:
const Clutter = imports.gi.Clutter;
...
class Indicator extends PanelMenu.Button {
... // provided in the template
vfunc_event(event) {
log('vfunc_event: ' + event.type())
return Clutter.EVENT_PROPAGATE
}
}
Attachment Annotations
- Experiment 1 & 2
- IMG_5167
- 00:00 : Just started Fedora 33 and connected to the Internet. Also set a password for liveuser. Currently in the default Wayland windowing system.
- 00:03 - 00:15 : Expected behavior (Effect A) on Wayland: only need to tap a window once.
- 00:21 : Expected behavior (Effect B) on Wayland: only need to tap a button once.
- 00:56 - 01:02 : On XOrg, if tap "Activities" and then tap a window, still expected behavior (Effect A).
- 01:03 - 01:10 : On XOrg, if press the super button and then tap a window, need to tap it twice (Effect A, unexpected behavior).
- 01:30 : Update GNome Shell and Mutter to 3.38.3 (prepare for experiment 2).
- 03:40 : We have now restarted GDM.
- 03:59 - 04:06 : Still need to tap the window twice (Effect A)
- 04:06 - 04:18 : Need to tap the buttons twice (Effect B, unexpected behavior).
- Experiment 3
- IMG_5168
- 00:22 : The important code snippet in the extension.
- 02:03 : I tapped the button once.
- 02:04 : The terminal shows 14, but not 12 (Effect D, unexpected behavior).
- 02:06 : Since the last tap was on the same button, this time both 12 and 14 appear on the terminal.
- 02:42 : Same as 02:04, the terminal shows 14 but not 12.
- I tested on Wayland, but did not record a video.
Edited by lxylxy123456