switch-monitor
switch-monitor copied to clipboard
windows are offset by a little bit
Hi, first of all thanks for the script. It works great except for one thing: With every switch I do, the window gets offset a little bit from its original position. So after 2 or 3 switches most windows end up on the bottom of the screen.
I added some correction values in the script to counter the offset, which works fine.
# apply correction offsets
new_y=`expr $y - 36`
new_x=`expr $new_x - 1`
# move the window to the same relative x,y position in the other monitor
xdotool windowmove $window_id $new_x $new_y
Do you have any idea where that behaviour stems form?
Seems this doesn't apply to every window (meaning the issue, not your solution to that 😅 ). When I use the script with Firefox, the window switches screens just perfectly. No sliding down whatsoever. Same with e.g. TeamViewer and Packet Sender (the latter comes bundled as an AppImage). Maybe this effect has to do with the window toolkit that that specific applications use (or don't use, depends on how you look at it 😆 ).