From: Dana Jansens Date: Tue, 22 Dec 2009 16:35:09 +0000 (-0500) Subject: windows are only in the same app if they are on the same desktop X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=822cfc2f617a66dce31cfd2b60b6f25d62d2826a;p=dana%2Fopenbox.git windows are only in the same app if they are on the same desktop --- diff --git a/openbox/client.c b/openbox/client.c index c7b68e29..434e4738 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -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) diff --git a/openbox/client.h b/openbox/client.h index 781341c2..4d5a8ab7 100644 --- a/openbox/client.h +++ b/openbox/client.h @@ -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