1 diff -U3 -r fvwm/builtins.c fvwm/builtins.c
2 --- fvwm/builtins.c 2011-08-07 00:03:31.000000000 +0200
3 +++ fvwm/builtins.c 2011-12-09 20:53:09.537508019 +0100
8 + else if (!do_add && StrEquals(parm,"buttonwidth"))
13 + sscanf(action, "%d%n", &width, &next);
15 + if (decor->button_width != width)
17 + decor->button_width = width;
18 + decor->flags.has_changed = 1;
23 else if (!do_add && StrEquals(parm,"MinHeight"))
26 diff -U3 -r fvwm/frame.c fvwm/frame.c
27 --- fvwm/frame.c 2011-12-09 19:51:38.705188705 +0100
28 +++ fvwm/frame.c 2011-12-09 20:53:09.537508019 +0100
29 @@ -1369,7 +1369,14 @@
30 tb_thick = fw->title_thickness;
31 nbuttons = fw->nr_left_buttons + fw->nr_right_buttons;
33 - b_length = tb_thick;
34 + if (fw->decor->button_width == 0)
36 + b_length = tb_thick;
40 + b_length = fw->decor->button_width;
42 t_length = tb_length - nbuttons * b_length;
43 if (nbuttons > 0 && t_length < MIN_WINDOW_TITLE_LENGTH)
45 diff -U3 -r fvwm/fvwm.h fvwm/fvwm.h
46 --- fvwm/fvwm.h 2011-12-09 19:51:38.705188705 +0100
47 +++ fvwm/fvwm.h 2011-12-09 20:53:09.534174771 +0100
49 unsigned has_rounded_corners_top : 1;
50 unsigned has_rounded_corners_bottom : 1;
51 unsigned has_slightly_rounded_corners : 1;
52 + unsigned has_no_top_border : 1;
53 focus_policy_t focus_policy;
56 diff -U3 -r fvwm/geometry.c fvwm/geometry.c
57 --- fvwm/geometry.c 2011-12-09 19:51:38.705188705 +0100
58 +++ fvwm/geometry.c 2011-12-09 20:53:09.534174771 +0100
60 const FvwmWindow *fw, size_borders *borders, Bool is_shaded)
63 + int *title_border = NULL;
66 bw = HAS_FLUXBOX_HANDLES(fw) ? 1 : fw->boundary_width;
68 switch (GET_TITLE_DIR(fw))
71 - borders->top_left.height += title_thickness;
72 + title_border = &borders->top_left.height;
75 - borders->bottom_right.height += title_thickness;
76 + title_border = &borders->bottom_right.height;
79 - borders->top_left.width += title_thickness;
80 + title_border = &borders->top_left.width;
83 - borders->bottom_right.width += title_thickness;
84 + title_border = &borders->bottom_right.width;
88 + if (HAS_NO_TOP_BORDER(fw))
92 + *title_border += title_thickness;
94 borders->total_size.width =
95 borders->top_left.width + borders->bottom_right.width;
96 borders->total_size.height =
98 borders->bottom_right.width = bw;
99 borders->top_left.height = bw;
100 borders->bottom_right.height = fw->boundary_width;
102 + if (HAS_NO_TOP_BORDER(fw))
104 + switch (GET_TITLE_DIR(fw))
107 + borders->top_left.height = 1;
110 + borders->bottom_right.height = 1;
113 + borders->top_left.width = 1;
116 + borders->bottom_right.width = 1;
121 borders->total_size.width =
122 borders->top_left.width + borders->bottom_right.width;
123 borders->total_size.height =
124 diff -U3 -r fvwm/screen.h fvwm/screen.h
125 --- fvwm/screen.h 2011-12-09 19:51:38.675189480 +0100
126 +++ fvwm/screen.h 2011-12-09 20:53:09.537508019 +0100
129 int title_height; /* explicitly specified title bar height */
130 int min_title_height;
132 /* titlebar buttons */
133 TitleButton buttons[NUMBER_OF_TITLE_BUTTONS];
134 TitleButton titlebar;
135 diff -U3 -r fvwm/style.c fvwm/style.c
136 --- fvwm/style.c 2011-12-09 19:51:38.708521953 +0100
137 +++ fvwm/style.c 2011-12-09 20:53:09.534174771 +0100
138 @@ -4734,6 +4734,12 @@
139 ps->change_mask.has_title_format_string = 1;
142 + else if (StrEquals(token, "TopBorder"))
144 + S_SET_HAS_NO_TOP_BORDER(SCF(*ps), !on);
145 + S_SET_HAS_NO_TOP_BORDER(SCM(*ps), 1);
146 + S_SET_HAS_NO_TOP_BORDER(SCC(*ps), 1);
148 else if (StrEquals(token, "TopTitleRotated"))
150 S_SET_IS_TOP_TITLE_ROTATED(SCF(*ps), on);
151 @@ -5360,6 +5366,11 @@
153 flags->do_redecorate = True;
156 + if (S_HAS_NO_TOP_BORDER(SCC(*ret_style)))
158 + flags->do_redecorate = True;
163 diff -U3 -r fvwm/style.h fvwm/style.h
164 --- fvwm/style.h 2011-12-09 19:51:38.708521953 +0100
165 +++ fvwm/style.h 2011-12-09 20:53:09.534174771 +0100
167 ((c).s.has_slightly_rounded_corners)
168 #define S_SET_HAS_SLIGHTLY_ROUNDED_CORNERS(c,x) \
169 ((c).s.has_slightly_rounded_corners = !!(x))
170 +#define S_HAS_NO_TOP_BORDER(c) \
171 + ((c).s.has_no_top_border)
172 +#define S_SET_HAS_NO_TOP_BORDER(c,x) \
173 + ((c).s.has_no_top_border = !!(x))
175 #define S_DO_EWMH_MINI_ICON_OVERRIDE(c) \
176 ((c).s.do_ewmh_mini_icon_override)
177 #define S_SET_DO_EWMH_MINI_ICON_OVERRIDE(c,x) \
178 diff -U3 -r fvwm/window_flags.h fvwm/window_flags.h
179 --- fvwm/window_flags.h 2011-12-09 19:51:38.708521953 +0100
180 +++ fvwm/window_flags.h 2011-12-09 20:53:09.534174771 +0100
182 (fw)->flags.common.s.has_slightly_rounded_corners = !!(x)
183 #define SETM_HAS_SLIGHTLY_ROUNDED_CORNERS(fw,x) \
184 (fw)->flag_mask.common.s.has_slightly_rounded_corners = !!(x)
185 +#define HAS_NO_TOP_BORDER(fw) \
186 + ((fw)->flags.common.s.has_no_top_border)
187 +#define SET_HAS_NO_TOP_BORDER(fw,x) \
188 + (fw)->flags.common.s.has_no_top_border = !!(x)
189 +#define SETM_HAS_NO_TOP_BORDER(fw,x) \
190 + (fw)->flag_mask.common.s.has_no_top_border = !!(x)
192 /* access to the special flags of a window */
193 #define DO_REUSE_DESTROYED(fw) \