René J.V. Bertin posted on Fri, 24 Apr 2026 17:23:32 +0200 as excerpted: > Hi, > > I am encountering a weird issue that seems to be caused by KWin (X11 AND > Wayland). > > When session restore is enabled and Firefox configured to show the > standard titlebar, windows are downsized vertically each time they're > restored after a browser restart. The amount corresponds roughly to > either 1x or 2x the height of the titlebar. > > This happens no matter how I impose titlebars on FF windows; be it via > the browser setting; a special KWin application rule or via > `gtk3-nocsd`. > > I thought this was a pure Firefox bug, but it doesn't happen when I run > Xfwm4 (under a KDE environment). > > I've now seen it in KWin4 and KWin5 5.15.5 and whatever (quite) newer > version is in Devuan Chimaera. > > It only happens though after I exited the browser properly, not after an > unexpected exit. > > Anyone else notice this?
I don't have a direct fix for you, but I do remember certain apps (IIRC mostly gtk-based) doing something very similar here some time ago... Then eventually it stopped and the problem has been gone for... I've gotta say at least a couple years, now, and I'd guess more (possibly six-ish, see below). I do have a potential workaround, however, and a guess at a /possible/ cause and thus another possible workaround as I think the timing /might/ coincide, tho I'm not sure. Back when I had the problem here, the windows I noticed it most on were windows that I was deploying kwin window rules for size on. But, I'm a heavy enough user of window rules for various things (I have some rule or another for most apps I run often enough to have developed a preference), and of course if I have a set size for something and it's not appearing at that size I'm obviously more likely to notice it, that I really can't say whether it /only/ affected such windows, or others too. Anyway, what I noticed is that the minimum size height and the regular size height rules were applying differently -- for those windows, one was including the height of the (server-side) titlebar, the other not, so I had to set them differently by the size of the titlebar. When I had both set and adjusted correctly (IDR which had to be set larger), it would be fine, otherwise it would be either title-bar-height too tall or title-bar- height too short. Since that was shortly after client-side-decorations became a thing that gtk/gnome defaulted to, while kde was sticking with server-side including on wayland (which IIRC kwin wasn't ready for yet), I assumed it was bugs with that, signals getting crossed between the app and kwin whether the size was supposed to include the server-side decorations or not (the apps weren't forcing client-side decorations -- only the server-side decorations appeared -- but it was as if some calculation in them assumed the client size included decorations anyway... or subtracted twice instead of once for the server-side, IDR which), and that it'd eventually be fixed... and indeed, the problem eventually ceased and I remember having to adjust sizes vs. minimum-sizes back where I had setup workaround rules. But, looking back, I'm now wondering if the timing coincided with something else or not. More specifically, there are two other things that at least in my rear-view-mirror seem to be pretty close in time and thus might have been related... or not. The first possibly related thing was the decorations I was using. Around that time I was using a kwin-aurorae windeco-engine based theme, because I wanted a shorter titlebar than either oxygen (my otherwise preferred) or breeze (the kde/plasma default) would let me have. But, there was a bug with libglvnd, which had been optional but was in the process of becoming a required dep of something or other, that made aurorae-based titlebars 100% transparent -- there were still there and could be dragged or clicked if you clicked where they should have appeared... only they couldn't be seen AT ALL!! Again, that was still on X, altho it wasn't long (a few months or a year...) before I switched to wayland. So I reluctantly switched back to oxygen titlebars and it's /possible/ that was when the problem went away for me -- or it also might have been bringing in libglvnd. But as mentioned, I switched to (kwin_)wayland shortly thereafter, which is where the sixish-years mentioned above comes in, since I took 18 months off during COVID and make that switch during that time, which would put it in 2020-21, nearing 6 years ago. And that is other thing that might have fixed it for me. Tho I can mention that kwin/plasma was only barely becoming wayland-ready at the time and I filed a *lot* of wayland-related bugs as I was in the process of switching, most of which eventually got fixed. Plus, as I wasn't working so actually had the time to do so, I hack-patched a number of things that they either didn't fix fast enough for me or that I simply didn't like their solution. And I'm still maintaining a number of those hack-patches to this day, altho I'd guess about half of them they ended up fixing/changing to my satisfaction in the intervening years so I don't need them any more. The reason that's apropos is that one of those patches, one I'm actually still maintaining as they haven't fixed the problem upstream, is to allow the oxygen windeco titlebars to be shorter -- turns out there's several pixels of padding that I could patch out, and I was actually able to apply NEGATIVE padding while keeping the titles readable, tho for instance the drop-extenders on y/g/q end up clipped slightly due to extending a pixel or two outside the titlebar. FWIW that's https://bugs.kde.org/show_bug.cgi?id=425874 . But the point being... with that hack-patch trimming the padding I could make the oxygen windeco titlebar even shorter (but still readable) than the black-square aurorae-based windeco off of kdelook that I had previously been running. So there wasn't a reason to switch back to the aurorae-based windeco any longer, and I'm still running that patch and still running with the oxygen windecos... and it could be either the switch from the aurorae-based windeco (or perhaps the switch to libglvnd or an update to it) or the switch from X to wayland, that disappeared the problem for me. That should give you some things to try, anyway. I'm not sure if they were related and actually am not even sure the timing was similar. But looking back it /seems/ the timing was similar enough they /might/ have been related. In any case, if you find something that fixes it or works around it, please post an update. Because while I can't complain about the problem going away, I'm always suspicious of such things, because if it went away without verified explanation, I'm in no better position to "encourage" it to go away again! -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman
