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

[Bug] Moving window between monitors using mouse doesn't always work #26

Closed
KaKi87 opened this issue Oct 30, 2023 · 5 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@KaKi87
Copy link

KaKi87 commented Oct 30, 2023

Hello,

When dragging a window from a monitor, one of the following often happens when dropping it into another one :

  • the window goes back to its previous position, and I have to try again ;
  • the window stays where the cursor is instead of being repositioned, and I have to drag it back to its previous monitor before trying again.

Thanks

@leukipp leukipp self-assigned this Nov 28, 2023
@leukipp leukipp added the bug Something isn't working label Nov 28, 2023
@leukipp
Copy link
Owner

leukipp commented Dec 3, 2023

  • the window goes back to its previous position, and I have to try again ;

A window is assigned to a monitor if the center point (of the rectangular layout) is located inside the monitor. The position of the grabbing cursor is then mostly irrelevant, but must be at least also inside the new monitor.

This means that a window must be moved at least half the width/height into another monitor, such that a screen swap is initiated. This mechanism is intentional, to handle literal "edge cases", where windows are partial moved (due geometry reload, etc.) over the edges of screens.

  • the window stays where the cursor is instead of being repositioned, and I have to drag it back to its previous monitor before trying again.

This seems to be a timing issue (ewmh events are fired late) and I will have to look into it.

@KaKi87
Copy link
Author

KaKi87 commented Dec 28, 2023

Hello,
Any news on this ?
Thanks

leukipp added a commit that referenced this issue Jan 11, 2024
@leukipp
Copy link
Owner

leukipp commented Jan 16, 2024

This means that a window must be moved at least half the width/height into another monitor, such that a screen swap is initiated.

Starting with v2.3.2 the behavior is now different:

  • Window swaps between one tiled and one untiled monitor will require that the window center is inside the new screen (as previous).
  • Window swaps between two tiled monitors will only require that the grabbing cursor position is inside the new screen (improved).

This means that the drag/drop behavior between tiled monitors is now more intuitive and user friendly.

This seems to be a timing issue (ewmh events are fired late) and I will have to look into it.

The issues may still occur from time to time, but should have noticeably improved starting with v2.3.2.
Mostly GNOME based (Muffin/Mutter/Marco/Metacity...) window managers are causing issues (see #37).

Closing for now, feel free to create a new issue with detailed information's if you run into further problems.

@leukipp leukipp closed this as completed Jan 16, 2024
@KaKi87
Copy link
Author

KaKi87 commented Jan 16, 2024

Well, I'm still experiencing the issue : try a move, it fails, try the same again, it succeeds.

I'm not sure I should create a new issue since I can't find anything that explains what makes it succeed or fail, sorry

@KaKi87
Copy link
Author

KaKi87 commented Feb 22, 2024

Hello ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants