Skip to content

Commit 0969c4b

Browse files
iacoreDemiMarie
andauthored
Apply suggestions from code review
Co-authored-by: Demi Marie Obenour <[email protected]>
1 parent a88b25e commit 0969c4b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

gui-daemon/xside.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -2384,17 +2384,16 @@ static void process_xevent(Ghandles * g)
23842384
XIEvent* xi_event = cookie->data; // from test_xi2.c in xinput cli utility
23852385

23862386
XIDeviceEvent * xi_device = (XIDeviceEvent *)xi_event;
2387-
XILeaveEvent * xi_leave = (XILeaveEvent *)xi_event;
23882387
switch (xi_event->evtype) {
23892388
// ideally raw input events are better, but I'm relying on X server's built-in event filtering and routing feature here
23902389
case XI_KeyPress:
23912390
case XI_KeyRelease:
2392-
if (xi_device && xi_device->flags & XIKeyRepeat) break; // don't send key repeat events
2391+
if (xi_device && (xi_device->flags & XIKeyRepeat)) break; // don't send key repeat events
23932392
process_xievent_keypress(g, xi_device);
23942393
break;
23952394
case XI_FocusIn:
23962395
case XI_FocusOut:
2397-
process_xievent_focus(g, xi_leave);
2396+
process_xievent_focus(g, (XILeaveEvent *)xi_event);
23982397
break;
23992398
}
24002399
XFreeEventData(g->display, cookie);

0 commit comments

Comments
 (0)