After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 754806 - No cursor when using magnifier/zoom
No cursor when using magnifier/zoom
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: magnifier
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 774236 778681 778986 (view as bug list)
Depends on:
Blocks: WaylandRelated
 
 
Reported: 2015-09-09 23:26 UTC by Christian Stadelmann
Modified: 2017-11-20 13:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backends: Dissociate visibility from current cursor sprite (4.26 KB, patch)
2017-11-16 18:34 UTC, Carlos Garnacho
committed Details | Review
backends: Add MetaCursorSprite::texture-changed signal (2.13 KB, patch)
2017-11-16 18:34 UTC, Carlos Garnacho
committed Details | Review
backends: Trigger MetaCursorTracker::cursor-changed on texture changes (1.49 KB, patch)
2017-11-16 18:34 UTC, Carlos Garnacho
committed Details | Review
backends: Protect from reentrancy in meta_cursor_sprite_load_from_theme (1.38 KB, patch)
2017-11-17 13:14 UTC, Carlos Garnacho
committed Details | Review
backends: Do not set up the root cursor on invisible window pointers (1.50 KB, patch)
2017-11-20 12:29 UTC, Carlos Garnacho
committed Details | Review
backends: Do NULL checks before disconnecting/connecting signals (1.54 KB, patch)
2017-11-20 12:29 UTC, Carlos Garnacho
committed Details | Review

Description Christian Stadelmann 2015-09-09 23:26:30 UTC
Steps to reproduce:
1. use Gnome on wayland session (e.g. on Fedora 23)
2. open gnome-control-center, the "universal access" category
3. enable zoom ("screen magnifier")

What should happen:
You should see a mouse cursor

What actually happens:
No mouse cursor visible. UI is barely usable without enabling crosshair. It is hard for a user to go back except he knows how to use the keyboard to change these settings.

Affected versions:
gtk3-3.17.8-1.fc23.x86_64
gnome-shell-3.17.91-1.fc23.x86_64
mutter-3.17.91-1.fc23.x86_64
libwayland-server-1.8.92-1.fc23.x86_64
Comment 1 Christian Stadelmann 2016-09-28 13:49:16 UTC
Still present in 3.22.
Comment 2 Alexandre Franke 2016-11-24 20:32:11 UTC
*** Bug 774236 has been marked as a duplicate of this bug. ***
Comment 3 Magnus H 2017-01-04 07:36:29 UTC
I have the exact same problem consistently on Fedora 25 with Wayland when zoom is enabled. Crosshairs function works correctly but the normal mouse pointer is not shown regardless of crosshairs on/off setting.

The actual function seems to still work, I can click on windows, graphical effects like highlighting checkboxes when hovering etc work.

If I press any key on the keyboard with the mouse standing still, then when I start moving the mouse the cursor actually appears correctly for like one frame and then disappears again.

With zoom off everything works as normal.

Gnome 3.22.2, using Intel Ivy Bridge CPU with integrated graphics. Please ask if you need any other information.
Comment 4 Florian Müllner 2017-02-15 15:28:26 UTC
*** Bug 778681 has been marked as a duplicate of this bug. ***
Comment 5 Bastien Nocera 2017-02-15 15:38:36 UTC
Removing wayland from the title, it also happens in X11, as per bug 778681 (and apologies for the mail spam).
Comment 6 Magnus H 2017-02-18 10:15:13 UTC
For me this happens only on Wayland but not under X11. However under X11 the frame rate seems very low when zoom is enabled so the cursor jumps 5-10 pixels at a time whenever I start moving it.
Comment 7 Florian Müllner 2017-02-20 22:30:58 UTC
*** Bug 778986 has been marked as a duplicate of this bug. ***
Comment 8 Sebastien Bacher 2017-09-01 06:44:18 UTC
Report in Ubuntu as well on https://bugs.launchpad.net/gnome-shell/+bug/1691676
Comment 9 Carlos Garnacho 2017-11-16 18:34:00 UTC
Created attachment 363859 [details] [review]
backends: Dissociate visibility from current cursor sprite

Just like X11/XFixes behaves, the current cursor is not affected
by its visibility, so it can be queried while invisible (possibly
to be replaced).

For this, keep an extra effective_cursor pointer that will be
either equal to displayed_cursor (maybe a bit of a misnomer now)
or NULL if the cursor is invisible. The MetaCursorRenderer
management is tied to the former, and the ::cursor-changed signal
emission to the latter.
Comment 10 Carlos Garnacho 2017-11-16 18:34:07 UTC
Created attachment 363860 [details] [review]
backends: Add MetaCursorSprite::texture-changed signal

As wayland implements the cursor role, it consists of a persistent
MetaCursorSprite that gets the backing texture changed. This is
inconvenient for the places using MetaCursorTracker to track cursor
changes, as they actually track MetaCursorSprites.

This signal will be used to trigger emission of
MetaCursorTracker::cursor-changed, which will make users able to
update accordingly.
Comment 11 Carlos Garnacho 2017-11-16 18:34:15 UTC
Created attachment 363861 [details] [review]
backends: Trigger MetaCursorTracker::cursor-changed on texture changes

So we allow gnome-shell's magnifier to update fake cursors while it's
turned on.
Comment 12 Carlos Garnacho 2017-11-17 13:14:58 UTC
Created attachment 363928 [details] [review]
backends: Protect from reentrancy in meta_cursor_sprite_load_from_theme

This function is supposedly not failable, so just move the theme_dirty
flag clearing to the beginning of the function. Protects against cases
where requesting a cursor image may result in it being loaded and set
as a texture, which emits ::texture-changed, which may end up requesting
the cursor image again.
Comment 13 Olivier Fourdan 2017-11-17 14:49:27 UTC
Review of attachment 363859 [details] [review]:

LGTM;
Comment 14 Olivier Fourdan 2017-11-17 14:54:01 UTC
Review of attachment 363860 [details] [review]:

LGTM;
Comment 15 Olivier Fourdan 2017-11-17 14:57:27 UTC
Review of attachment 363861 [details] [review]:

LGTM;
Comment 16 Olivier Fourdan 2017-11-17 15:00:13 UTC
Review of attachment 363928 [details] [review]:

Yep
Comment 17 Carlos Garnacho 2017-11-17 16:27:31 UTC
Pushed them to master. Thanks!

Attachment 363859 [details] pushed as b1a0bf8 - backends: Dissociate visibility from current cursor sprite
Attachment 363860 [details] pushed as bcbcd6a - backends: Add MetaCursorSprite::texture-changed signal
Attachment 363861 [details] pushed as f45df42 - backends: Trigger MetaCursorTracker::cursor-changed on texture changes
Attachment 363928 [details] pushed as 1790320 - backends: Protect from reentrancy in meta_cursor_sprite_load_from_theme
Comment 18 Carlos Garnacho 2017-11-20 12:28:39 UTC
These commits introduced a couple of issues, reopening and attaching further patches.
Comment 19 Carlos Garnacho 2017-11-20 12:29:29 UTC
Created attachment 364042 [details] [review]
backends: Do not set up the root cursor on invisible window pointers

Commit b1a0bf891 broke the previous logic that we would only fallback
to the root cursor if 1) windows are not interactable or 2) no window
cursor is currently set (i.e. not hovering over any window). Now it
will set up the root cursor if it's NULL, which breaks clients
explicitly setting an invisible cursor. This commit restaurates the
previous behavior.
Comment 20 Carlos Garnacho 2017-11-20 12:29:36 UTC
Created attachment 364043 [details] [review]
backends: Do NULL checks before disconnecting/connecting signals

The displayed cursor may be NULL.
Comment 21 Olivier Fourdan 2017-11-20 12:58:20 UTC
Review of attachment 364042 [details] [review]:

Makes sense.
Comment 22 Olivier Fourdan 2017-11-20 13:00:10 UTC
Review of attachment 364043 [details] [review]:

LGTM;
Comment 23 Carlos Garnacho 2017-11-20 13:11:22 UTC
Cheers! pushed to master.

Attachment 364042 [details] pushed as 3067dab - backends: Do not set up the root cursor on invisible window pointers
Attachment 364043 [details] pushed as cf4b5ef - backends: Do NULL checks before disconnecting/connecting signals