Firefox on Linux/ Wayland/ Sway is haveing trouble scaling on multiple screens when the screens have different scaling ratios
My setup: Firefox versions 70-74, developer version and stable; Ubuntu 19.10 with Wayland/ Sway; Internal Monitor 3000x2000 with scaling ratio 2.0 + External Monitor 192…
Firefox versions 70-74, developer version and stable; Ubuntu 19.10 with Wayland/ Sway; Internal Monitor 3000x2000 with scaling ratio 2.0 + External Monitor 1920x1080 with scaling ratio 1.0
Ever since version 70 I noticed that Firefox would on first start scale either according to the external or internal monitor, and be perfectly workable on that one. But when moving it to the other monitor/ opening a new window on the other monitor it would not scale properly, but render according to the scaling factor of the other monitor. So, e.g. when moving from the internal to the external screen it would only render to the top left quarter of the screen, while the application was actually being the right size. At the same time the input mapping was according to the actual window dimensions, and not according to the visual rendering of Firefox. This would also happen the other way round, with Firefox then only rendering the top left part of the web page to the entire screen.
You can see this well on the attached screenshot, but notice that sway is a tiling window manager, so Firefox should actually be exactly the same size as the terminal next to it. Firefox also renders like this when the scaling factor was changed at run time, so the issue seems to me that Firefox on Wayland checks the scaling factor on startup just once globally and does not realize when it was changed or that it can be different on different monitors.