1 diff -U3 -r fvwm/borders.c fvwm/borders.c
2 --- fvwm/borders.c 2011-12-09 19:19:30.354527773 +0100
3 +++ fvwm/borders.c 2011-12-09 19:32:33.277812649 +0100
5 rectangle *ret_g, Window *ret_w)
10 bw = fw->boundary_width;
11 /* ret_g->x and ret->y is just an offset relatively to the w,
12 @@ -5062,7 +5063,32 @@
13 ret_g->height = sidebar_g->y;
20 + if (HAS_BORDER_UNDER_TITLE(fw))
23 + switch (GET_TITLE_DIR(fw))
25 + case DIR_N: title = part & PART_TOP; break;
26 + case DIR_E: title = part & PART_RIGHT; break;
27 + case DIR_S: title = part & PART_BOTTOM; break;
28 + case DIR_W: title = part & PART_LEFT; break;
32 + ret_g->width = max(ret_g->width, 2 * bw + fw->title_thickness);
33 + ret_g->height = max(ret_g->height, 2 * bw + fw->title_thickness);
34 + if (part & PART_RIGHT)
36 + ret_g->x = 2 * sidebar_g->x + sidebar_g->width - ret_g->width;
38 + if (part & PART_BOTTOM)
40 + ret_g->y = 2 * sidebar_g->y + sidebar_g->height - ret_g->height;
46 diff -U3 -r fvwm/borders.h fvwm/borders.h
47 --- fvwm/borders.h 2003-06-29 21:53:23.000000000 +0200
48 +++ fvwm/borders.h 2011-12-09 19:32:33.277812649 +0100
51 PART_TITLEBAR = 0x300,
63 diff -U3 -r fvwm/fvwm.h fvwm/fvwm.h
64 --- fvwm/fvwm.h 2011-12-09 19:19:30.357861021 +0100
65 +++ fvwm/fvwm.h 2011-12-09 19:32:33.277812649 +0100
67 #define WINDOWSHADE_LAZY_MASK 0x3
68 unsigned windowshade_laziness : 2;
69 unsigned use_title_decor_rotation : 1;
70 + unsigned has_border_under_title : 1;
71 focus_policy_t focus_policy;
74 diff -U3 -r fvwm/geometry.c fvwm/geometry.c
75 --- fvwm/geometry.c 2009-08-22 17:58:23.000000000 +0200
76 +++ fvwm/geometry.c 2011-12-09 19:32:33.277812649 +0100
79 /* ---------------------------- forward declarations ----------------------- */
81 +static void __get_window_borders(
82 + const FvwmWindow *fw, size_borders *borders, Bool is_shaded);
84 /* ---------------------------- local variables ---------------------------- */
86 /* ---------------------------- exported variables (globals) --------------- */
88 int big_height = big_g->height;
91 - get_window_borders(fw, &b);
92 + __get_window_borders(fw, &b, 1);
96 switch (SHADED_DIR(fw))
98 void get_window_borders(
99 const FvwmWindow *fw, size_borders *borders)
101 + __get_window_borders(fw, borders, 0);
104 +static void __get_window_borders(
105 + const FvwmWindow *fw, size_borders *borders, Bool is_shaded)
107 + int title_thickness;
109 borders->top_left.width = fw->boundary_width;
110 borders->bottom_right.width = fw->boundary_width;
111 borders->top_left.height = fw->boundary_width;
112 borders->bottom_right.height = fw->boundary_width;
114 + title_thickness = fw->title_thickness;
115 + if (HAS_TITLE(fw) && HAS_BORDER_UNDER_TITLE(fw) && !is_shaded)
117 + title_thickness += fw->boundary_width;
120 switch (GET_TITLE_DIR(fw))
123 - borders->top_left.height += fw->title_thickness;
124 + borders->top_left.height += title_thickness;
127 - borders->bottom_right.height += fw->title_thickness;
128 + borders->bottom_right.height += title_thickness;
131 - borders->top_left.width += fw->title_thickness;
132 + borders->top_left.width += title_thickness;
135 - borders->bottom_right.width += fw->title_thickness;
136 + borders->bottom_right.width += title_thickness;
139 borders->total_size.width =
140 diff -U3 -r fvwm/geometry.h fvwm/geometry.h
141 --- fvwm/geometry.h 2007-01-13 16:07:14.000000000 +0100
142 +++ fvwm/geometry.h 2011-12-09 19:32:33.277812649 +0100
144 FvwmWindow *fw, rectangle *ret_g);
145 void get_window_borders(
146 const FvwmWindow *fw, size_borders *borders);
147 +void get_window_borders_shaded(
148 + const FvwmWindow *fw, size_borders *borders);
149 void get_window_borders_no_title(
150 const FvwmWindow *fw, size_borders *borders);
151 void set_window_border_size(
152 Seulement dans fvwm: menustyle.c.rej
153 diff -U3 -r fvwm/style.c fvwm/style.c
154 --- fvwm/style.c 2011-12-09 19:19:30.361194269 +0100
155 +++ fvwm/style.c 2011-12-09 19:32:33.274479401 +0100
156 @@ -2259,6 +2259,12 @@
158 rest = style_parse_button_style(ps, rest, on);
160 + else if (StrEquals(token, "BORDERUNDERTITLE"))
162 + S_SET_HAS_BORDER_UNDER_TITLE(SCF(*ps), on);
163 + S_SET_HAS_BORDER_UNDER_TITLE(SCM(*ps), 1);
164 + S_SET_HAS_BORDER_UNDER_TITLE(SCC(*ps), 1);
166 else if (StrEquals(token, "BorderWidth"))
168 if (GetIntegerArguments(rest, &rest, val, 1))
169 @@ -5229,6 +5235,11 @@
171 flags->do_update_rotated_title = 1;
174 + if (S_HAS_BORDER_UNDER_TITLE(SCC(*ret_style)))
176 + flags->do_redecorate = True;
181 diff -U3 -r fvwm/style.h fvwm/style.h
182 --- fvwm/style.h 2011-12-09 19:19:30.361194269 +0100
183 +++ fvwm/style.h 2011-12-09 19:32:33.274479401 +0100
185 ((c).s.use_title_decor_rotation)
186 #define S_SET_USE_TITLE_DECOR_ROTATION(c,x) \
187 ((c).s.use_title_decor_rotation = !!(x))
188 +#define S_HAS_BORDER_UNDER_TITLE(c) \
189 + ((c).s.has_border_under_title)
190 +#define S_SET_HAS_BORDER_UNDER_TITLE(c,x) \
191 + ((c).s.has_border_under_title = !!(x))
192 #define S_DO_EWMH_MINI_ICON_OVERRIDE(c) \
193 ((c).s.do_ewmh_mini_icon_override)
194 #define S_SET_DO_EWMH_MINI_ICON_OVERRIDE(c,x) \
195 diff -U3 -r fvwm/window_flags.h fvwm/window_flags.h
196 --- fvwm/window_flags.h 2011-12-09 19:19:30.361194269 +0100
197 +++ fvwm/window_flags.h 2011-12-09 19:32:33.277812649 +0100
199 (fw)->flags.common.s.use_title_decor_rotation = !!(x)
200 #define SETM_USE_TITLE_DECOR_ROTATION(fw,x) \
201 (fw)->flag_mask.common.s.use_title_decor_rotation = !!(x)
202 +#define HAS_BORDER_UNDER_TITLE(fw) \
203 + ((fw)->flags.common.s.has_border_under_title)
204 +#define SET_HAS_BORDER_UNDER_TITLE(fw,x) \
205 + (fw)->flags.common.s.has_border_under_title = !!(x)
206 +#define SETM_HAS_BORDER_UNDER_TITLE(fw,x) \
207 + (fw)->flag_mask.common.s.has_border_under_title = !!(x)
209 /* access to the special flags of a window */
210 #define DO_REUSE_DESTROYED(fw) \