Closed itshog closed 1 month ago
Hey, so these are probably Firefox bugs. It's got some weirdness with window commit handling, you can even see it with the main window: at startup the content sometimes appears smaller than it should until the next time niri asks it to update its size, while the niri border is rendered at the correct size. This means that Firefox acknowledged and set its window size correctly, but then drew the content at the wrong size.
For these dialogs specifically, it should set xdg-toplevel min_size and max_size so niri doesn't try to resize it big, but even if it didn't, it seems that once again it acknowledged and used the niri suggested full column size, but then drew the contents small.
Maybe this has already been reported, but I didn't find anything in the issue tracker. Basically, when clicking on a file (like a pdf document) in Firefox the "what should Firefox do?" popup appears with the wrong geometry, with borders encapsulating a whole column while the actual content is significantly smaller (see picture). When resizing the popup window the content updates to fill the whole column, ending with an absurdly big popup (but at least the borders match with the actual content in this case). Note that I have the option
prefer-no-csd
in my config.When the
prefer-no-csd
option is instead disabled, I see an entirely different problem, that I can't reproduce reliably: if I use the default theme, the popup appears with the whole column size, whereas if I use my custom userChrome.css the popup appear with the "right" size, but then it resizes to fill the whole column if I open a new window. Also, sometimes (this is the strangest one to me) the popup appears on the bottom of the screen, and at the top (where the popup should go) I see a solid green (my border color) window with the size of the popup: this usually lasts only for a fraction of a second, and then the popup positions correctly. The picture here was taken with my phone because I wasn't able to take a screenshot of this (maybe the screen updating for taking the screenshot makes the problem go away?).I suspect that this issue may not be Niri's responsibility, and instead depend on some client bug. I'm reporting it there because I didn't notice similar behaviour in other compositors, but I'll gladly report the bug to the relevant upstream if it turns out to be some Firefox or gtk bug.
On a side note, the pinentry-gnome3 popup dialog for authentication works as expected, with borders matching the size of the window, so the problem doesn't affect all gtk apps.
System Information