Skip to content

Instantly share code, notes, and snippets.

@admshao
Created February 1, 2018 00:08
Show Gist options
  • Save admshao/7eb3544a90c93bff80f0dab88dafbd76 to your computer and use it in GitHub Desktop.
Save admshao/7eb3544a90c93bff80f0dab88dafbd76 to your computer and use it in GitHub Desktop.
struct {
xcb_input_event_mask_t head;
xcb_input_xi_event_mask_t mask;
} mask;
mask.head.deviceid = XCB_INPUT_DEVICE_ALL_MASTER;
mask.mask = XCB_INPUT_XI_EVENT_MASK_RAW_BUTTON_PRESS |
XCB_INPUT_XI_EVENT_MASK_RAW_BUTTON_RELEASE;
mask.head.mask_len = sizeof(xcb_input_xi_event_mask_t);
xcb_input_xi_select_events(connection, window, 1, &mask);
xcb_flush(connection);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment