if (client == NULL)
client = table_get(byChild, event->event);
+ /* Check for stack windows */
+ if (client == NULL) {
+ struct Stack_Window *stack_win;
+ SLIST_FOREACH(stack_win, &stack_wins, stack_windows)
+ if (stack_win->window == event->event) {
+ client = stack_win->container->currently_focused;
+ break;
+ }
+ }
+
+
/* If not, then the user moved his cursor to the root window. In that case, we adjust c_ws */
if (client == NULL) {
LOG("Getting screen at %d x %d\n", event->root_x, event->root_y);
/* We want to know when… */
mask |= XCB_CW_EVENT_MASK;
- values[1] = XCB_EVENT_MASK_BUTTON_PRESS | /* …mouse is pressed */
+ values[1] = XCB_EVENT_MASK_ENTER_WINDOW | /* …mouse is moved into our window */
+ XCB_EVENT_MASK_BUTTON_PRESS | /* …mouse is pressed */
XCB_EVENT_MASK_EXPOSURE; /* …our window needs to be redrawn */
struct Stack_Window *stack_win = &(container->stack_win);