]> Dogcows Code - chaz/openbox/blobdiff - openbox/actions.c
Add a focus option, unfocusOnLeave that removes focus from a window when the pointer...
[chaz/openbox] / openbox / actions.c
index 7854636131d75be20aeb4be85423600015c5fcaf..5d47b33f2e6bed804e647e7f1e5811d642569f4b 100644 (file)
@@ -408,13 +408,19 @@ void actions_client_move(ObActionsData *data, gboolean start)
                are ignored during a grab, so don't force fake ones when they
                should be ignored
             */
-            if ((c = client_under_pointer()) && c != data->client &&
-                !grab_on_pointer())
-            {
-                ob_debug_type(OB_DEBUG_FOCUS,
-                              "Generating fake enter because we did a "
-                              "mouse-event action");
-                event_enter_client(c);
+            if (!grab_on_pointer()) {
+                if ((c = client_under_pointer()) && c != data->client) {
+                    ob_debug_type(OB_DEBUG_FOCUS,
+                                  "Generating fake enter because we did a "
+                                  "mouse-event action");
+                    event_enter_client(c);
+                }
+                else if (!c && c != data->client) {
+                    ob_debug_type(OB_DEBUG_FOCUS,
+                                  "Generating fake leave because we did a "
+                                  "mouse-event action");
+                    event_enter_client(data->client);
+                }
             }
         }
         else if (!data->button && !config_focus_under_mouse)
This page took 0.021449 seconds and 4 git commands to generate.