X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fframe.c;h=f4a29289dc9b204f1a089061a263349e3e0b330e;hb=34178097d559ef522ea0984091489c209f4e9e0e;hp=084f3f6accd60c6040f6a6adf6bcf7044de93b1e;hpb=7aae8cc5262c1b36e3196845d62489b76af9063f;p=chaz%2Fopenbox diff --git a/openbox/frame.c b/openbox/frame.c index 084f3f6a..f4a29289 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -89,7 +89,7 @@ ObFrame *frame_new(ObClient *client) ObFrame *self; Visual *visual; - self = g_new0(ObFrame, 1); + self = g_slice_new0(ObFrame); self->client = client; visual = check_32bit_client(client); @@ -229,7 +229,7 @@ void frame_free(ObFrame *self) if (self->colormap) XFreeColormap(obt_display, self->colormap); - g_free(self); + g_slice_free(ObFrame, self); } void frame_show(ObFrame *self) @@ -861,10 +861,12 @@ void frame_adjust_area(ObFrame *self, gboolean moved, if (focus_cycle_target == self->client) focus_cycle_update_indicator(self->client); } - if (resized && (self->decorations & OB_FRAME_DECOR_TITLEBAR)) + if (resized && (self->decorations & OB_FRAME_DECOR_TITLEBAR) && + self->label_width) + { XResizeWindow(obt_display, self->label, self->label_width, ob_rr_theme->label_height); - + } } static void frame_adjust_cursors(ObFrame *self) @@ -1675,12 +1677,12 @@ static gboolean frame_animate_iconify(gpointer p) if (self->client->icon_geometry.width == 0) { /* there is no icon geometry set so just go straight down */ - Rect *a = screen_physical_area_monitor - (screen_find_monitor(&self->area)); + const Rect *a; + + a = screen_physical_area_monitor(screen_find_monitor(&self->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;