From 822cfc2f617a66dce31cfd2b60b6f25d62d2826a Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 22 Dec 2009 11:35:09 -0500 Subject: [PATCH] windows are only in the same app if they are on the same desktop --- openbox/client.c | 9 +++++++-- openbox/client.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) 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 -- 2.34.1