Page 1 of 1

Window Resize Problem

Posted: 2025-01-14 08:30
by mlauronen
I resize the active window by the following simplified script:

Code: Select all

window_id=$(xdotool getactivewindow)
new_width=100
new_height=100
xdotool windowsize $window_id $new_width $new_height
The window resizes, but if I switch to another workspace and then come back, the window is automatically resized back to its previous size.

How can I disable this 'feature' ?

My system is:
Linux: Debian GNU/Linux 12 (bookworm) 12.8
Kernel: 6.1.119-1
xfce4: 4.18
Nvidia: 535.183.01
GTK: 3.24.38

Re: Window Resize Problem

Posted: 2025-01-14 13:32
by arzgi
Hello!

I too use Xfce, and don't need any scripts. Windows have minimize, maximize and close buttons, if I need resize, I just drag the edge.

Re: Window Resize Problem

Posted: 2025-01-15 12:54
by mlauronen
arzgi wrote: 2025-01-14 13:32 Hello!
I too use Xfce, and don't need any scripts. Windows have minimize, maximize and close buttons, if I need resize, I just drag the edge.
Hi and thx for the reply.

But I have several different window configurations with different applications for different situations and I have automated the whole thing with scripts. So this is not a question of whether I can resize and move the windows manually. So if anyone knows what is causing the problem I am describing, I would be happy to receive instructions or suggestions.

Re: Window Resize Problem

Posted: 2025-01-15 15:04
by arzgi
You can save as many session you like, check Mouse menu/Setttings/Session and starup*

*Those were my translations, as I have localized Xfce to my own language.

Re: Window Resize Problem

Posted: 2025-01-16 15:14
by mlauronen
arzgi wrote: 2025-01-15 15:04 You can save as many session you like, check Mouse menu/Setttings/Session and starup*

*Those were my translations, as I have localized Xfce to my own language.
Sorry, but your answer doesn't help my situation. I need a solution with scripts. NO MANUAL settings.

So if anyone knows a better working tool or method than "xdotool", I would be grateful.

Re: Window Resize Problem

Posted: 2025-01-16 15:27
by arzgi
xdotools man page is quite extensive. And did a duckducgo search "xdotool xfce" it found a few relevant pages, might skim those.

Sorry, that's the best can do on the subjet.

Re: Window Resize Problem

Posted: 2025-01-25 13:33
by mlauronen
This is a bug in FXCE. Please see this bug report.

Re: Window Resize Problem

Posted: 2025-01-25 13:41
by arzgi
In current stable, Debian Bookworm Xfce 4.18, can't confirm that error, I could not get such behavior even if i tried.
I don't use xdotool.

Re: Window Resize Problem

Posted: 2025-01-29 05:33
by mlauronen
arzgi wrote: 2025-01-25 13:41 In current stable, Debian Bookworm Xfce 4.18, can't confirm that error, I could not get such behavior even if i tried.
I don't use xdotool.
This is my system where the problem occurs and that bug report confirms the problem:

Code: Select all

Linux: Debian GNU/Linux 12 (bookworm) 12.9
Kernel: 6.1.124-1
xfce4: 4.18
Nvidia: 535.216.01
GTK: 3.24.38
btw.
Did you do the test by FIRST Tiling the window in the upper right corner with a shortcut key, for example, and only then resizing the window with xdotool or wctrl commands (or that script), after which you change the desktop and come back?


The key here is you first tile the window and then try to change the size.

Re: Window Resize Problem

Posted: 2025-01-29 14:05
by arzgi
As I said, i dont't use xdotool, maybe fill a bug report.

To me the whole concept is odd, using scripts to replace mouse, which was invented at Palo Alto, quite many years ago.

Re: Window Resize Problem

Posted: 2025-02-01 05:57
by mlauronen
arzgi wrote: 2025-01-29 14:05 As I said, i dont't use xdotool, maybe fill a bug report.

To me the whole concept is odd, using scripts to replace mouse, which was invented at Palo Alto, quite many years ago.
It's the same with wctrl and I guess with other tools too. There already is a bug report so...

I find it strange to use a mouse when you can automate things, for example in my case I have dozens of windows in 5 different workspaces that I want to always open in a specific workspace at a predetermined location and size. Doing this with a mouse would be time consuming and just a little silly.

But thanks for your opinions.

Re: Window Resize Problem

Posted: 2025-02-01 12:20
by arzgi
The bug report was filed to XFCE, not to Debian.

I understand your point, but clearly can not give better advice.