Skip to content

Commit

Permalink
Set input shape to 0x0 to passthrough mouse
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jabashque committed Mar 19, 2020
1 parent 78f9e07 commit 024fc8f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions keynav.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,9 @@ void cmd_start(char *args) {
/* Tell the window manager not to manage us */
winattr.override_redirect = 1;
XChangeWindowAttributes(dpy, zone, CWOverrideRedirect, &winattr);
/* Set the input shape to be nothing so that the mouse can still
* click/scroll if on the grid */
XShapeCombineRectangles(dpy, zone, ShapeInput, 0, 0, NULL, 0, ShapeSet, 0);

XSelectInput(dpy, zone, StructureNotifyMask | ExposureMask
| PointerMotionMask | LeaveWindowMask );
Expand Down

0 comments on commit 024fc8f

Please sign in to comment.