Bug 439053

Summary: GTK apps show pixelated cursors on wayland with hiDPI screen
Product: [Plasma] kwin Reporter: Emilio Cobos Álvarez (:emilio) <emilio>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.23.0
Attachments: Dummy GTK window.

Description Emilio Cobos Álvarez (:emilio) 2021-06-23 08:52:44 UTC
Created attachment 139604 [details]
Dummy GTK window.

SUMMARY

With a HiDPI screen and using wayland, GTK apps show pixelated cursors.

STEPS TO REPRODUCE
1. Run any GTK application (such as the attached one).

OBSERVED RESULT

Pixelated cursor.

EXPECTED RESULT

Crisp cursor such as the ones in QT applications.

SOFTWARE/OS VERSIONS
Operating System: Fedora 34
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Kernel Version: 5.12.11-300.fc34.x86_64
OS Type: 64-bit
Graphics Platform: Wayland

ADDITIONAL INFORMATION

This happens independently of the GTK cursor theme in use.
Comment 1 Emilio Cobos Álvarez (:emilio) 2021-06-23 09:11:24 UTC
The scale is supposed to be updated via `pointer_surface_enter` / `pointer_surface_leave`, but that doesn't get called, so it remains one forever: https://gitlab.gnome.org/GNOME/gtk/-/blob/981a638b01c2ae0fe4d15b6b97667679978a94fc/gdk/wayland/gdkdevice-wayland.c#L4579
Comment 2 Vlad Zahorodnii 2021-06-23 10:48:11 UTC
pointer_surface_enter is not called because kwin doesn't send wl_surface::enter/leave events.
Comment 3 Bug Janitor Service 2021-06-23 12:14:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwayland-server/-/merge_requests/254
Comment 4 Bug Janitor Service 2021-06-23 14:19:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1128
Comment 5 Vlad Zahorodnii 2021-06-25 09:07:55 UTC
Hmm, it seems like the bug report wasn't auto-closed because the commit has no BUG keyword.