X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fframe.c;h=2c1152ee0f3f1ee4b9614fd5a30abdb4eefa2ead;hb=d3d4aa29871111737a4f6985da695c8688a05270;hp=fcad427b49d17023efb3b5350a892fecfd7b48ae;hpb=6ec1881579c8b4499399ed25026f1e5376d0c04b;p=chaz%2Fopenbox diff --git a/openbox/frame.c b/openbox/frame.c index fcad427b..2c1152ee 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -1,7 +1,7 @@ /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*- frame.c for the Openbox window manager - Copyright (c) 2004 Mikael Magnusson + Copyright (c) 2006 Mikael Magnusson Copyright (c) 2003 Ben Jansens This program is free software; you can redistribute it and/or modify @@ -417,12 +417,11 @@ void frame_adjust_area(ObFrame *self, gboolean moved, if (resized) { framerender_frame(self); - frame_adjust_shape(self); } if (!STRUT_EQUAL(self->size, oldsize)) { - guint32 vals[4]; + gulong vals[4]; vals[0] = self->size.left; vals[1] = self->size.right; vals[2] = self->size.top; @@ -436,6 +435,9 @@ void frame_adjust_area(ObFrame *self, gboolean moved, if (focus_cycle_target == self->client) focus_cycle_draw_indicator(); } + if (resized && (self->decorations & OB_FRAME_DECOR_TITLEBAR)) + XResizeWindow(ob_display, self->label, self->label_width, + ob_rr_theme->label_height); } void frame_adjust_state(ObFrame *self) @@ -554,7 +556,7 @@ void frame_release_client(ObFrame *self, ObClient *client) g_hash_table_remove(window_map, &self->tlresize); g_hash_table_remove(window_map, &self->trresize); - ob_main_loop_timeout_remove_data(ob_main_loop, flash_timeout, self); + ob_main_loop_timeout_remove_data(ob_main_loop, flash_timeout, self, TRUE); frame_free(self); } @@ -579,18 +581,27 @@ static void layout_title(ObFrame *self) break; case 'D': if (d) { *lc = ' '; break; } + if (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) + && config_theme_hidedisabled) + break; d = TRUE; self->label_width -= (ob_rr_theme->button_size + ob_rr_theme->padding + 1); break; case 'S': if (s) { *lc = ' '; break; } + if (!(self->decorations & OB_FRAME_DECOR_SHADE) + && config_theme_hidedisabled) + break; s = TRUE; self->label_width -= (ob_rr_theme->button_size + ob_rr_theme->padding + 1); break; case 'I': if (i) { *lc = ' '; break; } + if (!(self->decorations & OB_FRAME_DECOR_ICONIFY) + && config_theme_hidedisabled) + break; i = TRUE; self->label_width -= (ob_rr_theme->button_size + ob_rr_theme->padding + 1); @@ -601,12 +612,18 @@ static void layout_title(ObFrame *self) break; case 'M': if (m) { *lc = ' '; break; } + if (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) + && config_theme_hidedisabled) + break; m = TRUE; self->label_width -= (ob_rr_theme->button_size + ob_rr_theme->padding + 1); break; case 'C': if (c) { *lc = ' '; break; } + if (!(self->decorations & OB_FRAME_DECOR_CLOSE) + && config_theme_hidedisabled) + break; c = TRUE; self->label_width -= (ob_rr_theme->button_size + ob_rr_theme->padding + 1); @@ -615,9 +632,6 @@ static void layout_title(ObFrame *self) } if (self->label_width < 1) self->label_width = 1; - XResizeWindow(ob_display, self->label, self->label_width, - ob_rr_theme->label_height); - if (!n) XUnmapWindow(ob_display, self->icon); if (!d) XUnmapWindow(ob_display, self->desk); if (!s) XUnmapWindow(ob_display, self->shade);