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 776821 - Scale factor not properly propagated upon reparent
Scale factor not properly propagated upon reparent
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.22.x
Other Linux
: Normal normal
: Small fix
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-01-03 15:35 UTC by Lionel Landwerlin
Modified: 2017-02-18 02:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Issue (870.16 KB, video/webm)
2017-01-03 15:35 UTC, Lionel Landwerlin
  Details
widget: propagate scale factor upon reparenting a widget (2.70 KB, patch)
2017-01-09 00:22 UTC, Lionel Landwerlin
committed Details | Review

Description Lionel Landwerlin 2017-01-03 15:35:50 UTC
Created attachment 342773 [details]
Issue

This bug is a bit tricky to reproduce :

- you need to run under a wayland compositor.
- you need to have a primary screen at scaling factor of 2 and secondary screen of scaling factor 1

If you open devhelp on the secondary screen, the scaling factor is right in the first tab. But if you open another tab, the scaling factor will be the one of the primary screen.

This will be fixed if you move the devhelp window from the secondary to primary screen and back.

Attached is a video of issue, I could only record the problem in a nested compositor (because video encoder limitations with regards of the texture size).
You can have the same setup by launching mutter with :

MUTTER_DEBUG_NUM_DUMMY_MONITORS=2 MUTTER_DEBUG_DUMMY_MONITOR_SCALES=2,1 mutter --wayland --nested

And devhelp with :

WAYLAND_DISPLAY=wayland-1 devhelp
Comment 1 Lionel Landwerlin 2017-01-09 00:22:44 UTC
Created attachment 343131 [details] [review]
widget: propagate scale factor upon reparenting a widget
Comment 2 Lionel Landwerlin 2017-01-09 00:23:43 UTC
Turns out it's a Gtk+ issue.
Comment 3 Lionel Landwerlin 2017-01-30 14:44:09 UTC
Ping?
Comment 4 Matthias Clasen 2017-02-15 23:46:58 UTC
Review of attachment 343131 [details] [review]:

Looks plausible to me. Although I would say: the scale factor should always be the scale factor of the monitor. The parent widget is only indirectly involved here
Comment 5 Lionel Landwerlin 2017-02-16 11:10:06 UTC
Review of attachment 343131 [details] [review]:

The parent widget will get its scaling factor from the window which is the top widget knowing on what monitor it currently is.
Comment 6 Lionel Landwerlin 2017-02-16 12:35:13 UTC
Review of attachment 343131 [details] [review]:

Pushed to 3.22 branch.
Comment 7 Daniel Boles 2017-02-18 02:52:06 UTC
Please also push to master when applicable. I'll cherry-pick it to there.