fix: WM ext does not work when operating focused win from another display#919
Merged
RainyNight9 merged 1 commit intomainfrom Oct 13, 2025
Merged
fix: WM ext does not work when operating focused win from another display#919RainyNight9 merged 1 commit intomainfrom
RainyNight9 merged 1 commit intomainfrom
Conversation
fa148bc to
5e77454
Compare
5e77454 to
43699b6
Compare
…play This commit fixes a bug that most Window Management extension commands won't work if you: 1. operate the focused window from another display 2. and they are adjacent To reproduce this: say you have 2 displays 1. Put the focused window on a non-main display, maximize the window 2. Move the mourse to the main display, making it the active display 3. Launch Coco, then execute the `TopHalf` command The focused window will be moved to the main display, while it should stay in the non-main display. The root cause of the issue is that the previous implementation of `intersects()` didn't handle an edge case correctly, adjavent rectangles should not be considered overlapping. This commit replaces the buggy implementation with the `CGRectIntersectsRect()` function from macOS core graphics library.
43699b6 to
1175548
Compare
medcl
approved these changes
Oct 11, 2025
RainyNight9
approved these changes
Oct 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit fixes a bug that most Window Management extension commands
won't work if you:
To reproduce this:
say you have 2 displays
TopHalfcommandThe focused window will be moved to the main display, while it should
stay in the non-main display.
The root cause of the issue is that the previous implementation of
intersects()didn't handle an edge case correctly, adjavent rectanglesshould not be considered overlapping. This commit replaces the buggy
implementation with the
CGRectIntersectsRect()function from macOScore graphics library.
Standards checklist