GNOME Bugzilla – Bug 754806
No cursor when using magnifier/zoom
Last modified: 2017-11-20 13:11:36 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
Still present in 3.22.
*** Bug 774236 has been marked as a duplicate of this bug. ***
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.
*** Bug 778681 has been marked as a duplicate of this bug. ***
Removing wayland from the title, it also happens in X11, as per bug 778681 (and apologies for the mail spam).
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.
*** Bug 778986 has been marked as a duplicate of this bug. ***
Report in Ubuntu as well on https://bugs.launchpad.net/gnome-shell/+bug/1691676
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.
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.
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.
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.
Review of attachment 363859 [details] [review]: LGTM;
Review of attachment 363860 [details] [review]: LGTM;
Review of attachment 363861 [details] [review]: LGTM;
Review of attachment 363928 [details] [review]: Yep
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
These commits introduced a couple of issues, reopening and attaching further patches.
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.
Created attachment 364043 [details] [review] backends: Do NULL checks before disconnecting/connecting signals The displayed cursor may be NULL.
Review of attachment 364042 [details] [review]: Makes sense.
Review of attachment 364043 [details] [review]: LGTM;
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