summaryrefslogtreecommitdiff
path: root/openbox/client.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-06-13 01:58:34 +0000
committerDana Jansens <danakj@orodu.net>2007-06-13 01:58:34 +0000
commit9586e3bf1482a30e29f230a1a987386fcdcec2c9 (patch)
treef102c76852ed547472b2756d058e3d03620c3b71 /openbox/client.c
parent7a6a516b8e3d8ad6b15379eabf6652a6f43eab27 (diff)
plug memory leaks from the new strut code
Diffstat (limited to 'openbox/client.c')
-rw-r--r--openbox/client.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/openbox/client.c b/openbox/client.c
index 8e6e1e39..df494a9f 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -1993,6 +1993,7 @@ void client_update_strut(ObClient *self)
a->x, a->x + a->width - 1,
a->y, a->y + a->height - 1,
a->x, a->x + a->width - 1);
+ g_free(a);
}
g_free(data);
}
@@ -2393,6 +2394,9 @@ gboolean client_has_parent(ObClient *self)
static ObStackingLayer calc_layer(ObClient *self)
{
ObStackingLayer l;
+ Rect *monitor;
+
+ monitor = screen_physical_area_monitor(client_monitor(self));
if (self->type == OB_CLIENT_TYPE_DESKTOP)
l = OB_STACKING_LAYER_DESKTOP;
@@ -2406,15 +2410,15 @@ static ObStackingLayer calc_layer(ObClient *self)
*/
(self->decorations == 0 &&
!(self->max_horz && self->max_vert) &&
- RECT_EQUAL(self->area,
- *screen_physical_area_monitor
- (client_monitor(self))))) &&
+ RECT_EQUAL(self->area, *monitor))) &&
(client_focused(self) || client_search_focus_tree(self)))
l = OB_STACKING_LAYER_FULLSCREEN;
else if (self->above) l = OB_STACKING_LAYER_ABOVE;
else if (self->below) l = OB_STACKING_LAYER_BELOW;
else l = OB_STACKING_LAYER_NORMAL;
+ g_free(monitor);
+
return l;
}
@@ -2720,6 +2724,8 @@ void client_try_configure(ObClient *self, gint *x, gint *y, gint *w, gint *h,
user = FALSE; /* ignore if the client can't be moved/resized when it
is fullscreening */
+
+ g_free(a);
} else if (self->max_horz || self->max_vert) {
Rect *a;
guint i;