Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XRandr reconfiguration reshuffles windows even if not needed (since icewm 3.3.3) #728

Closed
plomari opened this issue May 14, 2023 · 8 comments

Comments

@plomari
Copy link

plomari commented May 14, 2023

Something like xrandr --output DisplayPort-1 --same-as DisplayPort-0 --auto doesn't change the resolution or desktop size, but it moves around and reorders all windows on the current workspace. Windows in other workspaces are not changed. Tested in icewm 3.3.3. I suspect this is caused by the fix to #713.

This is really inconvenient. I don't want icewm to shuffle my windows even if the screen or desktop resolution changes. Would it be possible to add an option that disables the window moving code? (It should still move the taskbar.)

@gijsbers
Copy link
Collaborator

Setting ArrangeWindowsOnScreenSizeChange=0 helps immediately.

@gijsbers
Copy link
Collaborator

If you say that the taskbar should be moved, do you mean that the position of the output has changed? Doesn't --same-as preserve geometries?

@gijsbers
Copy link
Collaborator

Could you give the output of xrandr -q before and after that command?

@plomari
Copy link
Author

plomari commented May 15, 2023

Setting ArrangeWindowsOnScreenSizeChange=0 helps immediately.

Perfect. This solves the problem for me.

Could you give the output of xrandr -q before and after that command?

Before:

Screen 0: minimum 320 x 200, current 3840 x 2160, maximum 16384 x 16384
DisplayPort-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 600mm x 340mm
   3840x2160     60.00*+  30.00  
   2560x1440     59.95  
   1920x1200     60.00  
   1920x1080     60.00    59.94  
   1600x1200     60.00  
   1680x1050     60.00  
   1600x900      60.00  
   1280x1024     60.02  
   1440x900      60.00  
   1280x800      59.81  
   1280x720      60.00    59.94  
   1024x768      60.00  
   800x600       60.32  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
DisplayPort-1 connected (normal left inverted right x axis y axis)
   3840x2160     60.00 +  60.00    59.94    60.00    30.00    25.00    24.00    29.97    23.98  
   1920x2160     60.00  
   2560x1440     59.95  
   2048x1152     60.00  
   1920x1200     59.88  
   1920x1080     60.00    60.00    50.00    59.94  
   1600x1200     60.00  
   1680x1050     59.95  
   1600x900      60.00  
   1280x1024     60.02  
   1440x900      60.00  
   1280x800      59.81  
   1280x720      60.00    50.00    59.94  
   1024x768      60.00  
   800x600       60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
HDMI-A-0 disconnected (normal left inverted right x axis y axis)
HDMI-A-1 disconnected (normal left inverted right x axis y axis)
DVI-D-0 disconnected (normal left inverted right x axis y axis)`

Command:

xrandr --output DisplayPort-1 --same-as DisplayPort-0 --auto

After:

Screen 0: minimum 320 x 200, current 3840 x 2160, maximum 16384 x 16384
DisplayPort-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 600mm x 340mm
   3840x2160     60.00*+  30.00  
   2560x1440     59.95  
   1920x1200     60.00  
   1920x1080     60.00    59.94  
   1600x1200     60.00  
   1680x1050     60.00  
   1600x900      60.00  
   1280x1024     60.02  
   1440x900      60.00  
   1280x800      59.81  
   1280x720      60.00    59.94  
   1024x768      60.00  
   800x600       60.32  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
DisplayPort-1 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 698mm x 393mm
   3840x2160     60.00*+  60.00    59.94    60.00    30.00    25.00    24.00    29.97    23.98  
   1920x2160     60.00  
   2560x1440     59.95  
   2048x1152     60.00  
   1920x1200     59.88  
   1920x1080     60.00    60.00    50.00    59.94  
   1600x1200     60.00  
   1680x1050     59.95  
   1600x900      60.00  
   1280x1024     60.02  
   1440x900      60.00  
   1280x800      59.81  
   1280x720      60.00    50.00    59.94  
   1024x768      60.00  
   800x600       60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
HDMI-A-0 disconnected (normal left inverted right x axis y axis)
HDMI-A-1 disconnected (normal left inverted right x axis y axis)
DVI-D-0 disconnected (normal left inverted right x axis y axis)

@plomari
Copy link
Author

plomari commented May 15, 2023

If you say that the taskbar should be moved, do you mean that the position of the output has changed? Doesn't --same-as preserve geometries?

Almost forgot about this. I just mean in general. In the case I reported, position or resolution don't change. But if they change, I would expect that the taskbar gets moved.

gijsbers added a commit that referenced this issue May 16, 2023
Only ArrangeWindowsOnScreenSizeChange when the desktop is really resizing.
@gijsbers
Copy link
Collaborator

Can you test this (with ArrangeWindowsOnScreenSizeChange=1)?

@plomari
Copy link
Author

plomari commented May 17, 2023

Can you test this (with ArrangeWindowsOnScreenSizeChange=1)?

I can confirm that this doesn't reshuffle the windows anymore in my test case.

@plomari
Copy link
Author

plomari commented May 17, 2023

I suggest the following changes to the window rearrangement code:

  • move windows only if the upper left corner is outside of the usable desktop area
  • do this on all workspaces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants