summaryrefslogtreecommitdiff
path: root/openbox/place.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/place.c
parent7a6a516b8e3d8ad6b15379eabf6652a6f43eab27 (diff)
plug memory leaks from the new strut code
Diffstat (limited to 'openbox/place.c')
-rw-r--r--openbox/place.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/openbox/place.c b/openbox/place.c
index 661226ae..2d14f5bd 100644
--- a/openbox/place.c
+++ b/openbox/place.c
@@ -45,10 +45,12 @@ static Rect *pick_pointer_head(ObClient *c)
screen_pointer_pos(&px, &py);
- for (i = 0; i < screen_num_monitors; ++i) {
- if (RECT_CONTAINS(*screen_physical_area_monitor(i), px, py)) {
+ for (i = 0; i < screen_num_monitors; ++i) {
+ Rect *monitor = screen_physical_area_monitor(i);
+ gboolean contain = RECT_CONTAINS(*monitor, px, py);
+ g_free(monitor);
+ if (contain)
return screen_area_monitor(c->desktop, i, NULL);
- }
}
g_assert_not_reached();
}
@@ -111,7 +113,10 @@ static Rect **pick_head(ObClient *c)
screen_pointer_pos(&px, &py);
for (i = 0; i < screen_num_monitors; i++)
- if (RECT_CONTAINS(*screen_physical_area_monitor(i), px, py)) {
+ Rect *monitor = screen_physical_area_monitor(i);
+ gboolean contain = RECT_CONTAINS(*monitor, px, py);
+ g_free(monitor);
+ if (contain)
add_choice(choice, i);
ob_debug("placement adding choice %d for mouse pointer\n", i);
break;