Skip to content

✨ Add SLSGetWindowLevel inside window validation checks#1088

Merged
MrKai77 merged 1 commit intodevelopfrom
kai/check-window-level-with-skylight
Apr 29, 2026
Merged

✨ Add SLSGetWindowLevel inside window validation checks#1088
MrKai77 merged 1 commit intodevelopfrom
kai/check-window-level-with-skylight

Conversation

@MrKai77
Copy link
Copy Markdown
Owner

@MrKai77 MrKai77 commented Apr 28, 2026

Previously, the window level check only existed in Window.fromWindowInfo, since that was the only public way to retrieve a window's level. With SkyLight, we can now fetch a window's CGWindowLevel directly via SLSGetWindowLevel, allowing the check to live in Window's main initializer and apply to every code path. This lets Loop automatically reject intentionally floating windows (such as the notch window from Alcove and likely other notch apps) instead of relying on per-app blacklisting to keep Loop from manipulating them.

Note that the original Window.fromWindowInfo check has been kept as an early bail-out, as it lets Loop reject invalid windows up front using data already in hand, avoiding an unnecessary SkyLight call :)

@MrKai77 MrKai77 self-assigned this Apr 28, 2026
@MrKai77 MrKai77 requested a review from SenpaiHunters April 28, 2026 23:32
@MrKai77 MrKai77 changed the title ✨ Add support for SLSGetWindowLevel ✨ Add SLSGetWindowLevel inside window validation checks Apr 28, 2026
@MrKai77 MrKai77 merged commit 2b0a7cc into develop Apr 29, 2026
1 check passed
@MrKai77 MrKai77 deleted the kai/check-window-level-with-skylight branch April 29, 2026 04:18
@AlejandroVolkova
Copy link
Copy Markdown

@MrKai77 This new implementation is awesome :) ! I’m almost 100% sure it also fixes issue #1056 I reported earlier. It would be great if you guys could verify this with the current build, since I can’t trigger it anymore on my device.

Loop: 1.4.3 (1723)
macOS 26.4.1

@MrKai77
Copy link
Copy Markdown
Owner Author

MrKai77 commented Apr 29, 2026

Thanks for the update @AlejandroVolkova! I can’t reproduce it anymore either, but it’s likely that it was instead PR #1087 fixed it. It introduced a new SkyLight check called SLSFindWindowByGeometry. Essentially, Loop can now directly ask the system "which window is located here?" instead of relying on accessibility APIs or, worse, iterating through every window’s reported position and guessing which one is actually under the cursor. I’ll go ahead and close the issue, great to hear it’s resolved :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants