Bug 459161 - Inconsistent cursor size on Wayland
Summary: Inconsistent cursor size on Wayland
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland
: 474430 (view as bug list)
Depends on: 435728 443661 448555 451158
Blocks:
  Show dependency treegraph
 
Reported: 2022-09-15 13:39 UTC by Vlad Zahorodnii
Modified: 2024-04-10 15:57 UTC (History)
22 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Zahorodnii 2022-09-15 13:39:17 UTC
Meta bug report to track inconsistent cursor size issues in Plasma Wayland session.

Xcursor themes don't support HIDPI natively, so the compositor and apps multiply cursor size by the scale factor, however they all use different strategies for handling the case when the cursor theme has no requested size, some fallback to the closest cursor size, some fallback to default size 24, etc. This results in inconsistent cursor size when moving the cursor between windows.
Comment 1 Vlad Zahorodnii 2022-09-15 13:39:29 UTC
*** Bug 443661 has been marked as a duplicate of this bug. ***
Comment 2 Vlad Zahorodnii 2022-09-15 13:39:38 UTC
*** Bug 451158 has been marked as a duplicate of this bug. ***
Comment 3 Vlad Zahorodnii 2022-09-15 13:39:48 UTC
*** Bug 459146 has been marked as a duplicate of this bug. ***
Comment 4 Vlad Zahorodnii 2022-09-16 06:45:13 UTC
*** Bug 448555 has been marked as a duplicate of this bug. ***
Comment 5 nocturne 2022-09-27 00:31:30 UTC
Now after a gtk3 upgrade (possibly from https://gitlab.gnome.org/GNOME/gtk/-/commit/75d3095a6bb0001682be37c6bb4d42e9bb115d39 ). The cursor is 3 times as big on gtk windows compared to rest of the desktop. Using 24 cursor size and 250% global scaling. Following warnings are printed by gtk apps.

(firefox:7952): Gdk-WARNING **: 05:56:17.970: ../gtk/gdk/wayland/gdkcursor-wayland.c:242 cursor image size (64x64) not an integermultiple of scale (3)
Any idea how this can be fixed. It is now hard to use gtk apps with the massive cursor
Comment 6 Jin Liu 2023-01-08 00:46:41 UTC
(In reply to nocturne from comment #5)
> Now after a gtk3 upgrade (possibly from
> https://gitlab.gnome.org/GNOME/gtk/-/commit/
> 75d3095a6bb0001682be37c6bb4d42e9bb115d39 ). The cursor is 3 times as big on
> gtk windows compared to rest of the desktop. Using 24 cursor size and 250%
> global scaling. Following warnings are printed by gtk apps.
> 
> (firefox:7952): Gdk-WARNING **: 05:56:17.970:
> ../gtk/gdk/wayland/gdkcursor-wayland.c:242 cursor image size (64x64) not an
> integermultiple of scale (3)
> Any idea how this can be fixed. It is now hard to use gtk apps with the
> massive cursor

It can be fixed by manually editing ~/.config/gtk-3.0/settings.ini and change the line:
    gtk-cursor-theme-size=24
to
    gtk-cursor-theme-size=8
Comment 7 David Edmundson 2023-01-17 13:45:56 UTC
*** Bug 435728 has been marked as a duplicate of this bug. ***
Comment 8 Jakub 2023-07-10 17:10:50 UTC
*** Bug 471001 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2023-07-25 21:12:56 UTC
I use 36px Breeze cursors at 200% scale. I have rebooted after changing the size from 24px to 36px.

~/.config/gtk-3.0/settings.ini and ~/.config/gtk-4.0/settings.ini both say `gtk-cursor-theme-size=36`

~/.config/kcminputrc says `cursorSize=36`

Here's what I see:
- Over KWin-drawn titlebars, the cursor is 36px
- Over Plasma and KDE apps, the cursor is 48px
- Over GTK apps, the cursor is 24px

It's a bit of a mess. :)
Comment 11 Vlad Zahorodnii 2023-12-14 12:35:19 UTC
*** Bug 474430 has been marked as a duplicate of this bug. ***