X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=c7859ca67838fa87dfd5c65789d18b24783f44c3;hb=5784f11132cb2ee64af23695867aca9f4ebe0b9b;hp=600acfcc85e81759722ab65e1adf0525b8f38cc0;hpb=d7108df02b18c309e06fa1d12987e9540486fcef;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 600acfcc..c7859ca6 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -347,8 +347,8 @@ void client_manage(Window window) /* make sure the window is visible. */ client_find_onscreen(self, &newx, &newy, - self->frame->area.width, - self->frame->area.height, + self->area.width, + self->area.height, /* non-normal clients has less rules, and windows that are being restored from a session do also. we can assume you want @@ -742,8 +742,8 @@ void client_move_onscreen(ObClient *self, gboolean rude) gint x = self->area.x; gint y = self->area.y; if (client_find_onscreen(self, &x, &y, - self->frame->area.width, - self->frame->area.height, rude)) { + self->area.width, + self->area.height, rude)) { client_move(self, x, y); } } @@ -2198,6 +2198,12 @@ gboolean client_normal(ObClient *self) { self->type == OB_CLIENT_TYPE_SPLASH); } +gboolean client_application(ObClient *self) +{ + return (self->type == OB_CLIENT_TYPE_NORMAL || + self->type == OB_CLIENT_TYPE_DIALOG); +} + static void client_apply_startup_state(ObClient *self, gint x, gint y) { gboolean pos = FALSE; /* has the window's position been configured? */ @@ -3633,3 +3639,17 @@ gboolean client_has_group_siblings(ObClient *self) { return self->group && self->group->members->next; } + +gboolean client_has_application_group_siblings(ObClient *self) +{ + GSList *it; + + if (!self->group) return FALSE; + + for (it = self->group->members; it; it = g_slist_next(it)) { + ObClient *c = it->data; + if (c != self && client_application(c)) + return TRUE; + } + return FALSE; +}