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 791656 - GTK misbehaves at scale factors >2
GTK misbehaves at scale factors >2
Status: RESOLVED OBSOLETE
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-12-15 15:55 UTC by Drew DeVault
Modified: 2018-05-02 19:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Drew DeVault 2017-12-15 15:55:01 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.
Comment 1 Drew DeVault 2017-12-15 15:55:49 UTC
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
Comment 2 Matthias Clasen 2017-12-15 19:02:13 UTC
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.
Comment 3 Drew DeVault 2017-12-15 19:04:47 UTC
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.
Comment 4 Matthias Clasen 2017-12-17 22:17:40 UTC
I've made scale 3 work now.
Comment 5 Drew DeVault 2017-12-17 22:34:12 UTC
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.
Comment 6 Timm Bäder 2017-12-18 08:59:07 UTC
Drop shadows should already be fixed by https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=ecc9946566a1614cab3126647f130fd169591124
Comment 7 Drew DeVault 2018-01-10 15:58:55 UTC
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.
Comment 8 GNOME Infrastructure Team 2018-05-02 19:36:36 UTC
-- 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.