firefox-gnome-theme icon indicating copy to clipboard operation
firefox-gnome-theme copied to clipboard

Sizing issues with mixed-DPI setups

Open fbruetting opened this issue 4 years ago • 14 comments

I am on Fedora Silverblue 31 and Wayland and have a main UHD screen and an additional HD screen. There I have the following problems:

  1. Sometimes the menus of the header bar don’t appear when being in full-screen on the UHD screen. When I resize the window to a smaller size and drag it around a bit, the menus work in most positions (but not in all positions).
  2. Firefox doesn’t scale when dragged to another screen (UHD screen is scaled 200%). The scaling is usually set according to the screen the mouse pointer resides in, when I open Firefox (see the exceptions mentioned below).
  3. Sometimes when I open Firefox on the UHD screen, it gets scaled to 400%, so that it’s effectively 200% too large.
  4. Sometimes when I open Firefox on the HD screen, it gets scaled to 50%. But there, the window itself does not get scaled to that size, but instead just the upper left quadrant of the window gets used with the contents scaled to 50%, whereas the other three quadrants stay black.
  5. The video player also makes strange effects when getting resized to sizes smaller than the default (larger is no problem). I made a screen cast:

Peek 2020-02-23 23-23.zip

fbruetting avatar Feb 13 '20 23:02 fbruetting

Those issues are reproducible in default Firefox?

rafaelmardojai avatar Feb 14 '20 23:02 rafaelmardojai

Not at all, FF scales nicely since they implemented the Wayland stuff about two moths ago.

fbruetting avatar Feb 14 '20 23:02 fbruetting

Do these CSS files somehow interfere with Firefox’s settings? After removing the chrome folder, I get really weird scaling issues which I have never seen since installing your scripts. Other profiles, which I did not install your scripts into don’t show this behavior.

fbruetting avatar Feb 15 '20 22:02 fbruetting

Not at all, it only modify Firefox ui via the userChrome.css file.

The only user prefs modifications are in the user.js file, witch are very basic: https://github.com/rafaelmardojai/firefox-gnome-theme/blob/56652507e0bfd15a39d68c1097dfa786f39f5f36/configuration/user.js#L1-L12

But, that file lives in the chrome folder.

Maybe try removing you profile cache (~/.cache/mozilla/firefox/). This won't erase your settings, sessions, etc.

rafaelmardojai avatar Feb 15 '20 22:02 rafaelmardojai

By the way – this is how it sometimes looks when I un-maximize the window. But I also saw these effects in video programs (which seem to handle Wayland in some different manor, since they draw their surfaces by themselves or whatever). So at least it seems that something interferes with Wayland or Mutter here… 🤔

// EDIT: That has been fixed now.

Bildschirmfoto von 2020-02-16 01-55-37

fbruetting avatar Feb 16 '20 00:02 fbruetting

I have tried but I couldn't reproduce the issues.

I only can scale my both screens to 200%. Also i can't help with wayland related bugs, because I'm using NVIDIA drivers.

rafaelmardojai avatar Feb 16 '20 21:02 rafaelmardojai

Doesn't NVidia by now work in Wayland? At least for Fedora, as far as I know.

fbruetting avatar Feb 16 '20 21:02 fbruetting

With proprietary drivers?

rafaelmardojai avatar Feb 16 '20 21:02 rafaelmardojai

https://www.youtube.com/watch?v=F86egPk5-9I

That was two years ago.

fbruetting avatar Feb 16 '20 21:02 fbruetting

I will investigate, installing proprietary drivers on Fedora 31 resulted in Wayland disabled by default to me.

rafaelmardojai avatar Feb 16 '20 21:02 rafaelmardojai

Here is what regular windows produce. Private windows don’t do that, however.

VID-20200223-WA0022.zip

fbruetting avatar Feb 23 '20 15:02 fbruetting

While the above screen shot shows my UHD screen, here is a screen shot of full-screen-FF on my HD screen. Firefox gets scaled here to the upper-left quarter and a little bit distorted (which also some other Wayland-incapable(?) programs do). But in fact the controls are working from their theoretical places. For example when you want to click on the menu icon, you need to click on the quasi-correct spot in the black part of the window.

Bildschirmfoto von 2020-02-27 00-06-13

fbruetting avatar Feb 26 '20 23:02 fbruetting

By the way – this is how it sometimes looks when I un-maximize the window. But I also saw these effects in video programs (which seem to handle Wayland in some different manor, since they draw their surfaces by themselves or whatever). So at least it seems that something interferes with Wayland or Mutter here… thinking

Bildschirmfoto von 2020-02-16 01-55-37

This has been fixed, presumably by Firefox or by Mutter/Shell.

fbruetting avatar Mar 17 '20 14:03 fbruetting

In the meantime, all above mentioned issues got resolved. One thing however still occurs: The anchor points of all popovers of the headerbar buttons on the left side are displaced, which seems to be due to the scaling factor not being considered – the popovers of the right-side headerbar buttons however are correct.

Left-side button popovers

Bildschirmfoto von 2020-06-12 18-48-59

Bildschirmfoto von 2020-06-12 18-49-03

The distance of those two anchors seems to be about double the distance of the two corresponding buttons, so the scaling factor seems to be the root of the issue.

Right-side button popover

Bildschirmfoto von 2020-06-12 18-50-49

fbruetting avatar Jun 12 '20 17:06 fbruetting