GNOME Bugzilla – Bug 791656
GTK misbehaves at scale factors >2
Last modified: 2018-05-02 19:36:36 UTC
I have issues running GTK software on Wayland compositors with a scale factor of 3 or greater. I observe two problems: gnome-terminal has weird shadows: https://user-images.githubusercontent.com/1310872/34045359-9196537a-e176-11e7-8ef1-d913349bdd0d.png gedit crashes when I hover over buttons on the title bar: Gdk:ERROR:gdkdisplay-wayland.c:1109:_gdk_wayland_display_get_scaled_cursor_theme: assertion failed: (scale <= GDK_WAYLAND_MAX_THEME_SCALE) If a high enough resolution cursor is not available, GTK should fallback to a lower resolution and let the compositor upscale it.
Clarification: I can reproduce this issue on rootston (the wlroots[0] reference compositor) and on Weston. [0] https://github.com/swaywm/wlroots We discovered this issue during this discussion: https://github.com/swaywm/wlroots/pull/488
I'm not sure that scales >=3 are really that relevant in practice - we're talking 9 times the pixels. But a patch to fix cursor themes for this would be very welcome.
You might eat your words in 3 or 4 years, technology moves fast :) There are also probably some users with visual disabilities that would appreciate 3x scale on a 4K screen. We found this when testing fractional scaling, so in practice we would expect to see a non-integral number between 2-3. We ceiling it up to 3 and scale down the buffer in this case.
I've made scale 3 work now.
Thank you for your interim patch, but until a more broadly applicable solution can be found I think this ticket should remain open. Your patch also doesn't address the issues with the drop shadow, so far as I can tell.
Drop shadows should already be fixed by https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=ecc9946566a1614cab3126647f130fd169591124
Additional rationale for a more broadly applicable patch: more accessibility reasons. Consider the use-case of setting scale to 4 on a 4K display, then downscaling it 2x normally, but displaying the true resolution with a magnifying glass tool.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/995.