- if (data->any.context != OB_FRAME_CONTEXT_CLIENT && !data->any.button)
- grab_pointer(FALSE, FALSE, OB_CURSOR_NONE);
+ if (data->any.context != OB_FRAME_CONTEXT_CLIENT) {
+ if (!data->any.button && data->any.c) {
+ event_ignore_all_queued_enters();
+ } else {
+ ObClient *c;
+
+ /* usually this is sorta redundant, but with a press action
+ that moves windows our from under the cursor, the enter
+ event will come as a GrabNotify which is ignored, so this
+ makes a fake enter event
+ */
+ if ((c = client_under_pointer()) && c != data->any.c)
+ event_enter_client(c);
+ }
+ }