all repos — openbox @ 9586e3bf1482a30e29f230a1a987386fcdcec2c9

openbox fork - make it a bit more like ryudo

plug memory leaks from the new strut code
Dana Jansens danakj@orodu.net
commit

9586e3bf1482a30e29f230a1a987386fcdcec2c9

parent

7a6a516b8e3d8ad6b15379eabf6652a6f43eab27

M openbox/client.copenbox/client.c

@@ -1993,6 +1993,7 @@ a->y, a->y + a->height - 1,

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 @@

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,14 +2410,14 @@ But not for maximized windows.

*/ (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 @@ *h = a->height;

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;
M openbox/dock.copenbox/dock.c

@@ -522,6 +522,8 @@ dock->w += ob_rr_theme->obwidth * 2;

dock->h += ob_rr_theme->obwidth * 2; screen_update_areas(); + + g_free(a); } void dock_app_configure(ObDockApp *app, gint w, gint h)
M openbox/focus_cycle_popup.copenbox/focus_cycle_popup.c

@@ -433,6 +433,8 @@ p->a_text->surface.parenty = texty;

RrPaint(p->a_text, p->text, textw, texth); p->last_target = newtarget; + + g_free(screen_area); } void focus_cycle_popup_show(ObClient *c, gboolean iconic_windows,

@@ -511,6 +513,7 @@ icon_popup_height(single_popup, POPUP_HEIGHT);

icon_popup_min_width(single_popup, POPUP_WIDTH); icon_popup_max_width(single_popup, MAX(a->width/3, POPUP_WIDTH)); icon_popup_text_width(single_popup, popup.maxtextw); + g_free(a); } text = popup_get_name(c);
M openbox/frame.copenbox/frame.c

@@ -1581,6 +1581,7 @@ Rect *a = screen_physical_area();

iconx = self->area.x + self->area.width / 2 + 32; icony = a->y + a->width; iconw = 64; + g_free(a); } else { iconx = self->client->icon_geometry.x; icony = self->client->icon_geometry.y;
M openbox/keyboard.copenbox/keyboard.c

@@ -103,6 +103,7 @@ popup_position(popup, NorthWestGravity, a->x + 10, a->y + 10);

/* 1 second delay for the popup to show */ popup_delay_show(popup, G_USEC_PER_SEC, text); g_free(text); + g_free(a); } else { popup_hide(popup); }
M openbox/menuframe.copenbox/menuframe.c

@@ -343,6 +343,8 @@ if (pos <= half) {

*dx = MAX(*dx, a->x - x); *dy = MAX(*dy, a->y - y); } + + g_free(a); } static void menu_entry_frame_render(ObMenuEntryFrame *self)

@@ -888,6 +890,8 @@ self->entries = g_list_append(self->entries, more_frame);

} } + g_free(a); + menu_frame_render(self); }

@@ -948,8 +952,10 @@ return FALSE;

/* find the monitor the menu is on */ for (i = 0; i < screen_num_monitors; ++i) { - Rect *a = screen_physical_area_monitor(i); - if (RECT_CONTAINS(*a, x, y)) { + Rect a = screen_physical_area_monitor(i); + gboolean contains = RECT_CONTAINS(*a, x, y); + g_free(a); + if (contains) { self->monitor = i; break; }
M openbox/place.copenbox/place.c

@@ -45,10 +45,12 @@ gint px, py;

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 @@

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;
M openbox/popup.copenbox/popup.c

@@ -281,6 +281,8 @@ } else {

popup_show_timeout(self); } } + + g_free(area); } void popup_hide(ObPopup *self)