]> Dogcows Code - chaz/openbox/blobdiff - openbox/action.c
when using openbox-gnome/kde-session, use a separate config file (rc-gnome/kde.xml)
[chaz/openbox] / openbox / action.c
index e340979177603e2b745c91f4c87241b87e7feb54..8c8064f89a21ab86acc5f145efbcdb6f981e9558 100644 (file)
@@ -48,8 +48,21 @@ inline void client_action_start(union ActionData *data)
 inline void client_action_end(union ActionData *data)
 {
     if (config_focus_follow)
-        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) {
+                grab_pointer(FALSE, FALSE, OB_CURSOR_NONE);
+            } 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()))
+                    event_enter_client(c);
+            }
+        }
 }
 
 typedef struct
@@ -1296,7 +1309,7 @@ void action_focus(union ActionData *data)
 void action_unfocus (union ActionData *data)
 {
     if (data->client.any.c == focus_client)
-        focus_fallback(FALSE);
+        focus_fallback(TRUE);
 }
 
 void action_iconify(union ActionData *data)
This page took 0.020942 seconds and 4 git commands to generate.