gardesk/ers / 0003875

Browse files

Restore click-through on overlays via kCGSIgnoreForEvents tag

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
00038753ea6b1e1198693414d6fe6a5ab88575b6
Parents
721b2fb
Tree
d591968

1 changed file

StatusFile+-
M src/main.rs 7 0
src/main.rsmodified
@@ -1235,6 +1235,13 @@ fn create_overlay(
12351235
         SLSFlushWindowContentRegion(cid, wid, ptr::null());
12361236
         CGContextRelease(ctx);
12371237
 
1238
+        // Click-through. Without this the overlay window swallows mouse
1239
+        // clicks and scroll-wheel/trackpad gestures inside the target
1240
+        // window's bounds. Bit 1 of the SLS tag word is kCGSIgnoreForEvents.
1241
+        // Must run AFTER drawing — see CLAUDE.md "Draw before setting tags".
1242
+        let tags: u64 = 1 << 1;
1243
+        SLSSetWindowTags(cid, wid, &tags, 64);
1244
+
12381245
         Some((cid, wid, bounds, scale))
12391246
     }
12401247
 }