GNOME Bugzilla – Bug 774476
surfaces with no outputs get scale factor reset
Last modified: 2016-11-18 18:24:57 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.
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.
Review of attachment 339938 [details] [review]: ok
Attachment 339938 [details] pushed as 665c3a2 - wayland: Keep last scale factor on surfaces after it left all outputs