]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
add <underMouse> focus option
[chaz/openbox] / openbox / client.c
index e10ce1dd4c4293c45efe04fd4f58c4bdf2846270..9b4932a0fe2f1c940db314166b04a2982ccab68c 100644 (file)
@@ -644,9 +644,11 @@ void client_unmanage(ObClient *self)
     /* flush to send the hide to the server quickly */
     XFlush(ob_display);
 
-    /* ignore enter events from the unmap so it doesnt mess with the
-       focus */
-    event_ignore_all_queued_enters();
+    if (!client_focused(self) || !config_focus_under_mouse) {
+        /* ignore enter events from the unmap so it doesnt mess with the
+           focus */
+        event_ignore_all_queued_enters();
+    }
 
     mouse_grab_for_client(self, FALSE);
 
@@ -3246,8 +3248,7 @@ void client_set_desktop_recursive(ObClient *self,
                 client_set_desktop_recursive(it->data, target, donthide);
 }
 
-void client_set_desktop(ObClient *self, guint target,
-                        gboolean donthide)
+void client_set_desktop(ObClient *self, guint target, gboolean donthide)
 {
     self = client_search_top_normal_parent(self);
     client_set_desktop_recursive(self, target, donthide);
@@ -3877,13 +3878,12 @@ ObClient *client_search_transient(ObClient *self, ObClient *search)
 }
 
 #define WANT_EDGE(cur, c) \
-            if(cur == c)                                                      \
-                continue;                                                     \
-            if(!client_normal(cur))                                           \
+            if (cur == c)                                                     \
                 continue;                                                     \
-            if(screen_desktop != cur->desktop && cur->desktop != DESKTOP_ALL) \
+            if (c->desktop != cur->desktop && cur->desktop != DESKTOP_ALL &&  \
+                cur->desktop != screen_desktop)                               \
                 continue;                                                     \
-            if(cur->iconic)                                                   \
+            if (cur->iconic)                                                  \
                 continue;
 
 #define HIT_EDGE(my_edge_start, my_edge_end, his_edge_start, his_edge_end) \
This page took 0.021763 seconds and 4 git commands to generate.