I have a window rule for Firefox that sets the size and position when I open it.
The position is still working, but the size rule stopped working a few days ago. I see Firefox open to the correct position, and the window looks like it is opening to the desired size very briefly, but then the size shrinks.
You could try re-setting the window class using the detect window property tool to pick the details from your Firefox window, it could be a change within Firefox that has caused it.
Yes, same behavior with Apply Initially, Force, and Remember.
After I restarted Firefox and the window shrank in size, I opened the window rule, selected Apply Now for Size, and the window expanded to the size I have set in the rule.
I set Size back to Apply Initially, and New Window and New Private Window both open to the desired size.
I have no idea what can be the problem, but perhaps you can workaround by creating a custom kwin script that “waits” a bit before resizing the window. If this may be a solution for you I can guide you through the procedure
PS it just came to my mind an old problem I had with Firefox that I solved by setting an environmental variable to force Wayland instead of x11 as backend. I think this should be the default now, but never say never. Try to look for “Firefox force Wayland” for the procedure
Hi tubbadu
I’m interested in the custom kwin script you offered:
“… script that “waits” a bit before resizing the window.”
I restart often and getting tired of resizing the Firefox window after it overrides my kwin rule.
The script should register a handler for the windowAdded signal: kwin will call the handler function anytime a new window is created. The handler should check if the window is a Firefox window, and if it is it should wait some time (can be achieved with a JavaScript timer or something like that), and then resize the window
If you want to try to write it it’s not that hard, otherwise I’ll write it for you as soon as I can
(Note: the APIs are plasma 6 specific. The plasma 5 APIs are slightly different)
Okay, thank you. Yes, I’m using Plasma 6. I haven’t written a script previously, but will have a look at the link when I have more time on the weekend.
Cheers