easy-move-resize icon indicating copy to clipboard operation
easy-move-resize copied to clipboard

Unexpected window movement on multi monitor setup with tiled windows

Open alexanderadam opened this issue 3 years ago • 1 comments

It's a bit difficult to explain so please ask if you need more details to reproduce this

  1. You need to have a multi monitor setup (not with screen mirroring but using them as an extended desktop / separate displays) and put them side by side (so one monitor on the left and one on the right)
  2. Now use window tiling to put a window to the right side of the left display (i.e. middle click on the green maximise button on the window decoration and then select Move Window to Right Side of Screen)
  3. Now try to resize the window and try to make it narrower(!) on the top left corner but don't use the native resize (this is working obviously) - use easy-move-resize here!

What happens is, that the window will be moved partially to the other display (although it shouldn't move at all when resizing).

This also works without using window tiling as long as the window borders are near enough to the other display. The speed of resizing also plays a role here. 😉

Furthermore this bug only happens on resizing the left side of the window.

I have the feeling that it is related to the flickering seen in this video:

https://user-images.githubusercontent.com/372620/134575188-4f089018-aad9-480c-a127-a0328dcb5a2f.mov

It feels like instead the native resizing there is a customized calculation involved which moves the window on resizing on the left side and shrinks it. But the coordinates on the right side are lost/broken if the window left the display within the resizing transaction. But I have absolutely no clue about system programming so I might be entirely wrong with this. 😆

Anyway, thank you soooo much for your work! 🙌

alexanderadam avatar Sep 23 '21 19:09 alexanderadam

This is interesting, thanks @alexanderadam. We do indeed synthesize a resize from the left with a move+resize due to how the window APIs we have access to work. Looking at this, I noticed that if you resize from the left and just keep going, when the window reaches minimum size, we end up moving the window. Our resize computation logic seems to need to some better guardrails here.

dmarcotte avatar Nov 13 '21 22:11 dmarcotte