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 774476 - surfaces with no outputs get scale factor reset
surfaces with no outputs get scale factor reset
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-11-15 14:11 UTC by Carlos Garnacho
Modified: 2016-11-18 18:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: Keep last scale factor on surfaces after it left all outputs (1.03 KB, patch)
2016-11-15 14:11 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2016-11-15 14:11:10 UTC
When switching workspaces, surfaces may (not always, that seems like a mutter bug) receive wl_surface.leave on the output, which leaves the surface with no outputs.

In this case gdk also calls window_update_scale() which checks the MAX of the current outputs, and resorts to 1 as the output list is empty. This is bad for hidpi, as it triggers re-scaling of the windows, both when they're being unmapped due to switching to another workspace, and again to get the right scale factor when switching back.

I suggest to keep the current scale if there's no outputs, it would be most likely correct the next time the surface is mapped, and if it isn't, there's still some visible re-scaling due anyway. Patch coming.
Comment 1 Carlos Garnacho 2016-11-15 14:11:39 UTC
Created attachment 339938 [details] [review]
wayland: Keep last scale factor on surfaces after it left all outputs

This can be triggered on workspace switches, and on hidpi results in
the scale factor being reset to 1 while the window is not in the
current workspace.
Comment 2 Matthias Clasen 2016-11-17 11:32:17 UTC
Review of attachment 339938 [details] [review]:

ok
Comment 3 Matthias Clasen 2016-11-18 18:24:54 UTC
Attachment 339938 [details] pushed as 665c3a2 - wayland: Keep last scale factor on surfaces after it left all outputs