]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
add group transients when setting up the group
[chaz/openbox] / openbox / client.c
index b061b8f6eee493517fa8f1502876765c6205c10f..879f60c790895d411f6adeab1a69c2ef4550aeb5 100644 (file)
@@ -1015,6 +1015,7 @@ void client_update_wmhints(Client *self)
 {
     XWMHints *hints;
     gboolean ur = FALSE;
+    GSList *it;
 
     /* assume a window takes input if it doesnt specify */
     self->can_focus = TRUE;
@@ -1042,6 +1043,13 @@ void client_update_wmhints(Client *self)
             if (hints->window_group != None)
                 self->group = group_add(hints->window_group, self);
 
+            /* add other transients of the group that are already set up */
+            for (it = self->group->members; it; it = it->next)
+                if (it->data != self &&
+                    ((Client*)it->data)->transient_for == TRAN_GROUP)
+                    self->transients = g_slist_append(self->transients,
+                                                      it->data);
+
             /* because the self->transient flag wont change from this call,
                we don't need to update the window's type and such, only its
                transient_for, and the transients lists of other windows in the
@@ -1134,10 +1142,9 @@ void client_update_class(Client *self)
             if (data[1])
                 self->class = g_strdup(data[1]);
         }
+        g_strfreev(data);     
     }
 
-    g_strfreev(data);     
-
     if (PROP_GETS(self->window, wm_window_role, locale, &s))
        self->role = g_strdup(s);
 
@@ -1314,7 +1321,7 @@ void client_calc_layer(Client *self)
             for (it = self->group->members; it; it = it->next)
                 if (it->data != self &&
                     ((Client*)it->data)->transient_for != TRAN_GROUP) {
-                    self = self->transient_for;
+                    self = it->data;
                     break;
                 }
         }
@@ -1587,7 +1594,7 @@ void client_fullscreen(Client *self, gboolean fs, gboolean savearea)
         x = y = w = h = 0;
     } else {
         guint num;
-       guint32 *dimensions;
+       gint32 *dimensions;
 
         /* pick some fallbacks... */
         x = screen_area(self->desktop)->x +
@@ -1598,7 +1605,7 @@ void client_fullscreen(Client *self, gboolean fs, gboolean savearea)
         h = screen_area(self->desktop)->height / 2;
 
        if (PROP_GETA32(self->window, openbox_premax, cardinal,
-                        &dimensions, &num)) {
+                        (guint32**)&dimensions, &num)) {
             if (num == 4) {
                 x = dimensions[0];
                 y = dimensions[1];
This page took 0.020967 seconds and 4 git commands to generate.