r/xfce•
RobThorpe

Prevent XFCE from trying to resize windows

Question

It seems that when I start applications Xfce is trying to resize the windows in some way. Is it possible to prevent this behaviour?

The main problem I have is with GNU Emacs. I have it configured to make it's initial window a certain size. Xfce seems to over-ride this somehow.

If it isn't possible to stop this, is it at least possible to set initial window dimensions in a configuration file somewhere.

Posted Sep 26, 2023, 11:39 AM UTC

12
lihaarp•

Xfwm4 should handle placing, but not initial size. That's up to the application.

If all else fails, there are tools like devilspie2 to automate tasks like resizing stubborn apps.

1
KdeVOID•

I changed some starters to open the app maximized (just added --maximize). Maybe there is a cammad for entering a specific size.

1
Hobscob•

You could launch it with a script, then use wmctrl to force its location and size.
This forces mousepad to a 1200x600 window, at 200 pixels from the top-left corner.

wmctrl -r Mousepad -e 0,200,200,1200,600
1
RobThorpeOP•

Thank you for the input u/KdeVOID and u/lihaarp.

It turned out that the problem was somewhere else. I just assumed it was Xfce because I saw it several times in the week after I'd updated Xfce.

I saw the issue in Firefox but it disappeared after an update of my distro (I use Arch). I saw the problem in Emacs. That seems to be related to a race condition in X somewhere, it's not Xfce.

1
lihaarp•

Firefox places/sizes windows on its own whim, and it's pretty darn broken at that.

1