windows are only in the same app if they are on the same desktop
authorDana Jansens <danakj@orodu.net>
Tue, 22 Dec 2009 16:35:09 +0000 (11:35 -0500)
committerDana Jansens <danakj@orodu.net>
Tue, 22 Dec 2009 16:44:53 +0000 (11:44 -0500)
openbox/client.c
openbox/client.h

index c7b68e29b2cb014babac0a7e166b9e90688d22fc..434e47387ac12401ca4b98201850b8ac30460a8e 100644 (file)
@@ -3512,10 +3512,15 @@ void client_set_desktop(ObClient *self, guint target,
     client_set_desktop_recursive(self, target, donthide, dontraise);
 }
 
-gboolean client_is_in_application(ObClient *self, ObClient *search)
+gboolean client_is_in_application(ObClient *self, ObClient *app)
 {
     /* XXX FIXME make this better */
-    return self->group && self->group == search->group;
+    return self->group && self->group == app->group &&
+        (self->desktop == app->desktop ||
+         (self->desktop == DESKTOP_ALL &&
+          app->desktop == screen_desktop) ||
+         (app->desktop == DESKTOP_ALL &&
+          self->desktop == screen_desktop));
 }
 
 gboolean client_is_direct_child(ObClient *parent, ObClient *child)
index 781341c275397c9ad6fb32238a86b8f3d8911cfd..4d5a8ab7ef0f38749a68f68b4d2cffb1ecd70e06 100644 (file)
@@ -708,7 +708,7 @@ ObClient *client_search_top_direct_parent(ObClient *self);
 
 /*! Are the two clients windows belonging to the same application.
   This checks group members, their children/parents, etc. */
-gboolean client_is_in_application(ObClient *self, ObClient *search);
+gboolean client_is_in_application(ObClient *self, ObClient *app);
 
 /*! Is one client a direct child of another (i.e. not through the group.)
   This checks more than one level, so there may be another direct child in