Skip to content

Commit 024fc8f

Browse files
committed
Set input shape to 0x0 to passthrough mouse
Define the input shape to be empty so that one cannot click on the grid. This resolves all issues where the cursor ends up pointing to the grid itself instead of the window under the grid due to openpixel() not being called.
1 parent 78f9e07 commit 024fc8f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

keynav.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,9 @@ void cmd_start(char *args) {
983983
/* Tell the window manager not to manage us */
984984
winattr.override_redirect = 1;
985985
XChangeWindowAttributes(dpy, zone, CWOverrideRedirect, &winattr);
986+
/* Set the input shape to be nothing so that the mouse can still
987+
* click/scroll if on the grid */
988+
XShapeCombineRectangles(dpy, zone, ShapeInput, 0, 0, NULL, 0, ShapeSet, 0);
986989

987990
XSelectInput(dpy, zone, StructureNotifyMask | ExposureMask
988991
| PointerMotionMask | LeaveWindowMask );

0 commit comments

Comments
 (0)