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 790168 - Incorrect cursor scale when window moved from scale=1 output to scale=2 output
Incorrect cursor scale when window moved from scale=1 output to scale=2 output
Status: RESOLVED NOTGNOME
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-11-10 13:27 UTC by Drew DeVault
Modified: 2017-12-08 14:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Drew DeVault 2017-11-10 13:27:18 UTC
If you spawn a GTK window on an output at scale=1, then move the window to a scale=2 output, the cursor will not be updated.
Comment 1 Olivier Fourdan 2017-11-22 14:27:18 UTC
Are you talking about the mouse pointer or the text cursor? (the former is handled by the Wayland compositor, ie gnome-shell/mutter rather than gtk+)

FWIW, mouse pointer scaling works fine here (mutter-3.26.2) and adjusts to the output scale.
Comment 2 Olivier Fourdan 2017-11-22 14:28:43 UTC
Just tested the text cursor, it's scaled as well, along with the rest of the window.
Comment 3 Drew DeVault 2017-11-22 14:30:51 UTC
I'm talking about the mouse pointer. On Wayland it's drawn by the compositor, but it's set by the client and drawn based on the properties set on the surface. For a scaled output that should be a 2x buffer and a surface with scale=2 set.

To reproduce this I use rootston, the reference compositor for wlroots: https://github.com/swaywm/wlroots

It's entirely possible the bug is on our side, but I suspect that's not the case.
Comment 4 Olivier Fourdan 2017-11-22 15:41:59 UTC
OK, I see the cursor being "truncated" in weston when output scale=2
Comment 5 Olivier Fourdan 2017-11-22 16:33:21 UTC
(In reply to Olivier Fourdan from comment #4)
> OK, I see the cursor being "truncated" in weston when output scale=2

Yet I am still not convinced this is a client issue, the problem doesn't show if I run "weston --use-pixman".

Besides, looking at the WAYLAND_DEBUG logs, I can tell the scale is set as expected:

  -> wl_pointer@3.set_cursor(1020, wl_surface@12, 3, 3)
  -> wl_surface@12.attach(wl_buffer@22, 0, 0)
  -> wl_surface@12.set_buffer_scale(2)
  -> wl_surface@12.damage(0, 0, 24, 24)
  -> wl_surface@12.commit()

So as far as I can tell, gdk wayland backend is doign the fight thing and it works with gnome-shell/mutter and weston (using the pixman backend).
Comment 6 Drew DeVault 2017-11-22 16:34:11 UTC
Alright, I'll investigate further on my end and get back to you.
Comment 7 Drew DeVault 2017-12-08 14:12:47 UTC
This is indeed our bug, sorry for the trouble.