Window Resize Problem

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
mlauronen
Posts: 19
Joined: 2024-02-13 15:25
Has thanked: 2 times
Been thanked: 2 times

Window Resize Problem

#1 Post 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
Last edited by mlauronen on 2025-01-15 12:55, edited 1 time in total.

arzgi
Posts: 1775
Joined: 2008-02-21 17:03
Location: Finland
Has thanked: 1 time
Been thanked: 103 times

Re: Window Resize Problem

#2 Post 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.

mlauronen
Posts: 19
Joined: 2024-02-13 15:25
Has thanked: 2 times
Been thanked: 2 times

Re: Window Resize Problem

#3 Post 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.

arzgi
Posts: 1775
Joined: 2008-02-21 17:03
Location: Finland
Has thanked: 1 time
Been thanked: 103 times

Re: Window Resize Problem

#4 Post 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.

mlauronen
Posts: 19
Joined: 2024-02-13 15:25
Has thanked: 2 times
Been thanked: 2 times

Re: Window Resize Problem

#5 Post 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.

arzgi
Posts: 1775
Joined: 2008-02-21 17:03
Location: Finland
Has thanked: 1 time
Been thanked: 103 times

Re: Window Resize Problem

#6 Post 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.

mlauronen
Posts: 19
Joined: 2024-02-13 15:25
Has thanked: 2 times
Been thanked: 2 times

Re: Window Resize Problem

#7 Post by mlauronen »

This is a bug in FXCE. Please see this bug report.

arzgi
Posts: 1775
Joined: 2008-02-21 17:03
Location: Finland
Has thanked: 1 time
Been thanked: 103 times

Re: Window Resize Problem

#8 Post 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.

mlauronen
Posts: 19
Joined: 2024-02-13 15:25
Has thanked: 2 times
Been thanked: 2 times

Re: Window Resize Problem

#9 Post 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.

arzgi
Posts: 1775
Joined: 2008-02-21 17:03
Location: Finland
Has thanked: 1 time
Been thanked: 103 times

Re: Window Resize Problem

#10 Post 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.

mlauronen
Posts: 19
Joined: 2024-02-13 15:25
Has thanked: 2 times
Been thanked: 2 times

Re: Window Resize Problem

#11 Post 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.

arzgi
Posts: 1775
Joined: 2008-02-21 17:03
Location: Finland
Has thanked: 1 time
Been thanked: 103 times

Re: Window Resize Problem

#12 Post by arzgi »

The bug report was filed to XFCE, not to Debian.

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

Post Reply