1 diff -U3 -r fvwm/add_window.c fvwm/add_window.c
2 --- fvwm/add_window.c 2011-12-09 19:40:50.151782172 +0100
3 +++ fvwm/add_window.c 2011-12-09 19:51:38.701855458 +0100
8 + style_flags *sflags = &(pstyle->flags);
10 get_title_font_size_and_offset(
11 fw, S_TITLE_DIR(SCF(*pstyle)),
12 @@ -1777,6 +1778,10 @@
13 fw->title_thickness = width;
14 fw->title_text_offset = offset;
15 fw->corner_width = fw->title_thickness + fw->boundary_width;
16 + if (SHAS_CORNER_WIDTH(sflags))
18 + fw->corner_width = SGET_CORNER_WIDTH(*pstyle);
22 fw->title_thickness = 0;
27 + frame_make_rounded_corners(fw);
32 diff -U3 -r fvwm/borders.c fvwm/borders.c
33 --- fvwm/borders.c 2011-12-09 19:44:44.919122542 +0100
34 +++ fvwm/borders.c 2011-12-09 19:51:38.705188705 +0100
35 @@ -1754,6 +1754,24 @@
39 +static void border_fill_fluxbox_handle(
40 + Pixmap dest_pix, rectangle *dest_g, common_decorations_type *cd, Bool corner)
45 + dpy, dest_pix, corner ? cd->shadow_gc : cd->relief_gc, dest_g->x + 1, dest_g->y + 1,
46 + dest_g->width - dest_g->x - 3, dest_g->height - dest_g->y - 2);
49 + dpy, dest_pix, cd->shadow_gc, dest_g->x + dest_g->width - 2, dest_g->y + 1,
50 + 1, dest_g->height - dest_g->y - 2);
53 + dpy, dest_pix, cd->shadow_gc, dest_g->x + 1, dest_g->height - 2,
54 + dest_g->width - dest_g->x - 3, 1);
57 /* create a root transparent colorset bg, we take in account a possible
59 static Pixmap border_create_root_transparent_pixmap(
60 @@ -1998,12 +2016,28 @@
61 pix_g.width = part_g.width;
62 pix_g.height = part_g.height;
63 border_fill_pixmap_background(p, &pix_g, &bg, cd);
64 + if (HAS_FLUXBOX_HANDLES(fw) && (part & PART_BOTTOM))
66 + pix_g.y = part_g.height - fw->boundary_width;
67 + if (part != PART_BORDER_S)
71 + if (part == PART_BORDER_SE)
75 + if (fw->boundary_width > 2)
77 + border_fill_fluxbox_handle(p, &pix_g, cd, !(part & PART_BORDER_S));
80 if (free_bg_pixmap && bg.pixmap.p)
82 XFreePixmap(dpy, bg.pixmap.p);
84 /* draw the relief over the background */
85 - if (!br->relief.is_flat)
86 + if (!br->relief.is_flat && !HAS_FLUXBOX_HANDLES(fw))
88 border_draw_part_relief(br, frame_g, &part_g, p, is_inverted);
89 /* draw the handle marks */
91 JustificationType just;
96 + bw = HAS_FLUXBOX_HANDLES(fw) ? 1 : fw->boundary_width;
99 ret_td->frame_g = *new_g;
100 @@ -4560,16 +4597,16 @@
101 /* geometry of the title bar title + buttons */
104 - ret_td->bar_g.width = new_g->width - 2 * fw->boundary_width;
105 + ret_td->bar_g.width = new_g->width - 2 * bw;
106 ret_td->bar_g.height = ret_td->layout.title_g.height;
107 - ret_td->bar_g.x = fw->boundary_width;
108 + ret_td->bar_g.x = bw;
109 ret_td->bar_g.y = ret_td->layout.title_g.y;
113 ret_td->bar_g.width = ret_td->layout.title_g.width;
114 - ret_td->bar_g.height = new_g->height - 2 * fw->boundary_width;
115 - ret_td->bar_g.y = fw->boundary_width;
116 + ret_td->bar_g.height = new_g->height - 2 * bw;
117 + ret_td->bar_g.y = bw;
118 ret_td->bar_g.x = ret_td->layout.title_g.x;
121 @@ -4621,7 +4658,7 @@
123 ret_td->left_buttons_g.height = rbl;
124 ret_td->right_buttons_g.height = lbl;
125 - ret_td->right_buttons_g.y = fw->boundary_width;
126 + ret_td->right_buttons_g.y = bw;
127 ret_td->right_buttons_g.x = ret_td->bar_g.x;
128 ret_td->left_buttons_g.y = ret_td->layout.title_g.y +
129 ret_td->layout.title_g.height;
130 @@ -4631,7 +4668,7 @@
132 ret_td->left_buttons_g.width = rbl;
133 ret_td->right_buttons_g.width = lbl;
134 - ret_td->right_buttons_g.x = fw->boundary_width;
135 + ret_td->right_buttons_g.x = bw;
136 ret_td->right_buttons_g.y = ret_td->bar_g.y;
137 ret_td->left_buttons_g.x = ret_td->layout.title_g.x +
138 ret_td->layout.title_g.width;
139 @@ -4644,7 +4681,7 @@
141 ret_td->left_buttons_g.height = lbl;
142 ret_td->right_buttons_g.height = rbl;
143 - ret_td->left_buttons_g.y = fw->boundary_width;
144 + ret_td->left_buttons_g.y = bw;
145 ret_td->left_buttons_g.x = ret_td->bar_g.x;
146 ret_td->right_buttons_g.y = ret_td->layout.title_g.y +
147 ret_td->layout.title_g.height;
148 @@ -4654,7 +4691,7 @@
150 ret_td->left_buttons_g.width = lbl;
151 ret_td->right_buttons_g.width = rbl;
152 - ret_td->left_buttons_g.x = fw->boundary_width;
153 + ret_td->left_buttons_g.x = bw;
154 ret_td->left_buttons_g.y = ret_td->bar_g.y;
155 ret_td->right_buttons_g.x = ret_td->layout.title_g.x +
156 ret_td->layout.title_g.width;
157 @@ -4997,7 +5034,7 @@
161 - bw = fw->boundary_width;
162 + bw = HAS_FLUXBOX_HANDLES(fw) ? 1 : fw->boundary_width;
163 /* ret_g->x and ret->y is just an offset relatively to the w,
164 * maybe we can take the relief in account? */
166 @@ -5015,6 +5052,10 @@
168 ret_g->x = sidebar_g->x;
169 ret_g->y = 2 * sidebar_g->y + sidebar_g->height - bw;
170 + if (HAS_FLUXBOX_HANDLES(fw))
172 + ret_g->y = 2 * sidebar_g->y + sidebar_g->height - fw->boundary_width;
174 *ret_w = FW_W_SIDE(fw, 2);
177 @@ -5049,9 +5090,14 @@
181 + ret_g->height = bw;
183 ret_g->width = sidebar_g->width;
185 + if (HAS_FLUXBOX_HANDLES(fw))
187 + ret_g->height = fw->boundary_width;
192 diff -U3 -r fvwm/frame.c fvwm/frame.c
193 --- fvwm/frame.c 2011-08-07 00:03:31.000000000 +0200
194 +++ fvwm/frame.c 2011-12-09 19:51:38.705188705 +0100
196 /* inform the modules of the change */
197 BroadcastConfig(M_CONFIGURE_WINDOW,fw);
199 + frame_make_rounded_corners(fw);
204 @@ -1954,6 +1956,7 @@
207 frame_setup_shape(fw, mra->end_g.width, mra->end_g.height, fw->wShaped);
208 + frame_make_rounded_corners(fw);
209 if (mra->flags.do_restore_gravity)
211 mra->grav.client_grav = fw->hints.win_gravity;
212 @@ -2075,6 +2078,210 @@
216 +void draw_rounded_mask(Window win, int width, int height, Bool slightlyrounded, window_parts draw_parts, int col)
222 + unsigned long valuemask;
225 + int l0[] = { 0, 1, 0, 1, 2, 3 };
226 + int l1[] = { 1, 2, 1, 2, 3, 5 };
227 + int l2[] = { 2, 1, 5, 3, 2, 1 };
228 + int l3[] = { 1, 1, 1, 1, 1, 2 };
230 + if (slightlyrounded)
242 + dpy, win, &JunkRoot, &rect.x, &rect.y,
243 + &rect.width, &rect.height, &JunkBW, &JunkDepth);
247 + pm = XCreatePixmap(dpy, win, width, height, 1);
249 + XSetForeground(dpy, gc, !col);
250 + XFillRectangle(dpy, pm, gc, 0, 0, w, h);
251 + XSetForeground(dpy, gc, col);
253 + /* Draw a rounded shape on the corners of the pixmap */
254 + for (x = lstart; x < lend; x++)
256 + if (draw_parts & PART_BORDER_NW)
258 + XFillRectangle(dpy, pm, gc, 0, l0[x], l2[x], l3[x]);
260 + if (draw_parts & PART_BORDER_NE)
262 + XFillRectangle(dpy, pm, gc, w-l2[x], l0[x], l2[x], l3[x]);
264 + if (draw_parts & PART_BORDER_SW)
266 + XFillRectangle(dpy, pm, gc, 0, h-l1[x], l2[x], l3[x]);
268 + if (draw_parts & PART_BORDER_SE)
270 + XFillRectangle(dpy, pm, gc, w-l2[x], h-l1[x], l2[x], l3[x]);
274 + FShapeCombineMask(dpy, win, ShapeBounding, 0, 0, pm, col==1 ? ShapeSubtract : ShapeSet);
276 + XFreePixmap(dpy, pm);
279 +static void frame_draw_rounded_mask(FvwmWindow *fw, Window win, window_parts draw_parts, int col)
281 + draw_rounded_mask(win, fw->g.frame.width, fw->g.frame.height,
282 + HAS_SLIGHTLY_ROUNDED_CORNERS(fw), IS_MAXIMIZED(fw)?0:draw_parts, col);
285 +/* Returns a corner corrected for rotation of the titlebar (ie button 1 is always NW) */
286 +#define SWAP_CORNER(PART) corner = corner & (PART) ? corner ^ (PART) : corner
287 +static window_parts __get_corner(window_parts corner, FvwmWindow *fw)
291 + dir = GET_TITLE_DIR(fw);
293 + /* Flip horizontally (relative to tb) if the titlebar is rotated */
294 + if ((dir == DIR_N && IS_TOP_TITLE_ROTATED(fw))
295 + || (dir == DIR_S && !IS_BOTTOM_TITLE_ROTATED(fw))
296 + || (dir == DIR_W && IS_LEFT_TITLE_ROTATED_CW(fw))
297 + || (dir == DIR_E && !IS_RIGHT_TITLE_ROTATED_CW(fw)))
299 + SWAP_CORNER(PART_BORDER_NE | PART_BORDER_NW);
302 + /* Swap SE/SW so that shift left goes in a clockwise order */
303 + SWAP_CORNER(PART_BORDER_SW | PART_BORDER_SE);
305 + /* Rotate clockwise depending on dir */
307 + if (corner > PART_BORDER_SE)
309 + corner = corner >> 4;
312 + /* Swap SE/SW back */
313 + SWAP_CORNER(PART_BORDER_SW | PART_BORDER_SE);
318 +void frame_make_rounded_corners(FvwmWindow *fw)
321 + window_parts draw_parts;
324 + FvwmWindow *left_button = 0;
325 + FvwmWindow *right_button = 0;
327 + if (!fw || !FShapesSupported)
332 + window_parts corner_nw = __get_corner(PART_BORDER_NW, fw);
333 + window_parts corner_ne = __get_corner(PART_BORDER_NE, fw);
334 + window_parts corner_se = __get_corner(PART_BORDER_SE, fw);
335 + window_parts corner_sw = __get_corner(PART_BORDER_SW, fw);
337 + for (x = 9;x>=0;x--)
339 + if (FW_W_BUTTON(fw, x) != None)
343 + left_button = FW_W_BUTTON(fw, x);
347 + right_button = FW_W_BUTTON(fw, x);
353 + if (HAS_ROUNDED_CORNERS_TOP(fw))
355 + mask |= corner_ne | corner_nw;
357 + if (HAS_ROUNDED_CORNERS_BOTTOM(fw))
359 + mask |= corner_se | corner_sw;
362 + /* Draw mask on each corner of the window. This involves the frame, title,
363 + * buttons and parent wins depending on the window configuration */
364 + rect = fw->g.frame;
365 + frame_draw_rounded_mask(fw, FW_W_FRAME(fw), mask, 1);
371 + draw_parts |= corner_nw;
375 + draw_parts |= corner_ne;
381 + draw_parts |= corner_sw;
385 + frame_draw_rounded_mask(fw, left_button, mask & (corner_nw|corner_sw), 0);
389 + draw_parts |= corner_se;
393 + frame_draw_rounded_mask(fw, right_button, mask & (corner_ne|corner_se), 0);
396 + frame_draw_rounded_mask(fw, FW_W_TITLE(fw), mask & draw_parts, 0);
398 + if (!IS_SHADED(fw))
400 + frame_draw_rounded_mask(fw, FW_W_PARENT(fw), mask & (corner_sw|corner_se), 0);
404 + frame_draw_rounded_mask(fw, left_button, mask & corner_nw, 0);
408 + frame_draw_rounded_mask(fw, right_button, mask & corner_ne, 0);
414 + frame_draw_rounded_mask(fw, FW_W_PARENT(fw), mask & PART_CORNERS, 0);
420 /****************************************************************************
422 * Sets up the shaped window borders
423 diff -U3 -r fvwm/frame.h fvwm/frame.h
424 --- fvwm/frame.h 2007-01-13 14:16:34.000000000 +0100
425 +++ fvwm/frame.h 2011-12-09 19:51:38.705188705 +0100
428 /* ---------------------------- included header files ---------------------- */
430 +#include "borders.h"
432 /* ---------------------------- global definitions ------------------------- */
434 /* ---------------------------- global macros ------------------------------ */
436 Bool do_send_configure_notify);
437 void frame_setup_shape(
438 FvwmWindow *fw, int w, int h, int shape_mode);
439 +void frame_make_rounded_corners(FvwmWindow *fw);
440 +void draw_rounded_mask(Window win, int width, int height, Bool slightlyrounded, window_parts draw_parts, int col);
443 diff -U3 -r fvwm/fvwm.h fvwm/fvwm.h
444 --- fvwm/fvwm.h 2011-12-09 19:40:50.148448924 +0100
445 +++ fvwm/fvwm.h 2011-12-09 19:51:38.705188705 +0100
447 unsigned windowshade_laziness : 2;
448 unsigned use_title_decor_rotation : 1;
449 unsigned has_border_under_title : 1;
450 + unsigned has_fluxbox_handles : 1;
451 + unsigned has_rounded_corners_top : 1;
452 + unsigned has_rounded_corners_bottom : 1;
453 + unsigned has_slightly_rounded_corners : 1;
454 focus_policy_t focus_policy;
458 unsigned has_edge_resistance_move : 1;
459 unsigned has_edge_resistance_xinerama_move : 1;
460 unsigned has_handle_width : 1;
461 + unsigned has_corner_width : 1;
462 unsigned has_icon : 1;
463 unsigned has_icon_boxes : 1;
464 unsigned has_icon_size_limits : 1;
467 /* resize handle width */
469 + short corner_width;
473 diff -U3 -r fvwm/geometry.c fvwm/geometry.c
474 --- fvwm/geometry.c 2011-12-09 19:40:50.145115675 +0100
475 +++ fvwm/geometry.c 2011-12-09 19:51:38.705188705 +0100
476 @@ -480,16 +480,18 @@
477 const FvwmWindow *fw, size_borders *borders, Bool is_shaded)
482 - borders->top_left.width = fw->boundary_width;
483 - borders->bottom_right.width = fw->boundary_width;
484 - borders->top_left.height = fw->boundary_width;
485 + bw = HAS_FLUXBOX_HANDLES(fw) ? 1 : fw->boundary_width;
486 + borders->top_left.width = bw;
487 + borders->bottom_right.width = bw;
488 + borders->top_left.height = bw;
489 borders->bottom_right.height = fw->boundary_width;
491 title_thickness = fw->title_thickness;
492 if (HAS_TITLE(fw) && HAS_BORDER_UNDER_TITLE(fw) && !is_shaded)
494 - title_thickness += fw->boundary_width;
495 + title_thickness += bw;
498 switch (GET_TITLE_DIR(fw))
500 void get_window_borders_no_title(
501 const FvwmWindow *fw, size_borders *borders)
503 - borders->top_left.width = fw->boundary_width;
504 - borders->bottom_right.width = fw->boundary_width;
505 - borders->top_left.height = fw->boundary_width;
508 + bw = HAS_FLUXBOX_HANDLES(fw) ? 1 : fw->boundary_width;
510 + borders->top_left.width = bw;
511 + borders->bottom_right.width = bw;
512 + borders->top_left.height = bw;
513 borders->bottom_right.height = fw->boundary_width;
514 borders->total_size.width =
515 borders->top_left.width + borders->bottom_right.width;
516 diff -U3 -r fvwm/menus.c fvwm/menus.c
517 --- fvwm/menus.c 2011-12-09 19:40:50.138449178 +0100
518 +++ fvwm/menus.c 2011-12-09 19:51:38.708521953 +0100
520 #include "menugeometry.h"
521 #include "menuparameters.h"
524 #include "libs/FGettext.h"
526 /* ---------------------------- local definitions -------------------------- */
527 @@ -3191,6 +3192,13 @@
531 +static void menu_make_rounded_corners(MenuRoot *mr)
533 + draw_rounded_mask(MR_WINDOW(mr), MR_WIDTH(mr), MR_HEIGHT(mr),
534 + MST_HAS_SLIGHTLY_ROUNDED_CORNERS(mr),
535 + MST_HAS_ROUNDED_CORNERS(mr)?PART_CORNERS:0, 0);
541 @@ -3764,6 +3772,8 @@
545 + menu_make_rounded_corners(mr);
547 XMoveWindow(dpy, MR_WINDOW(mr), x, y);
550 diff -U3 -r fvwm/menustyle.c fvwm/menustyle.c
551 --- fvwm/menustyle.c 2011-12-09 19:40:50.138449178 +0100
552 +++ fvwm/menustyle.c 2011-12-09 20:14:42.916305166 +0100
554 "TitleColorset", "HilightTitleBack",
556 "VerticalMargins", "FlatSeparators",
557 + "RoundedCorners", "SlightlyRoundedCorners",
558 "UniqueHotkeyActivatesImmediate",
561 @@ -1604,12 +1605,18 @@
562 &ST_VERTICAL_MARGIN_BOTTOM(tmpms),
565 - case 63: /* UniqueHotKeyActivatesImmediate */
566 - ST_HOTKEY_ACTIVATES_IMMEDIATE(tmpms) = on;
568 case 63: /* FlatSeparators */
569 ST_DO_FLAT_SEPARATOR(tmpms) = on;
571 + case 64: /* UniqueHotKeyActivatesImmediate */
572 + ST_HOTKEY_ACTIVATES_IMMEDIATE(tmpms) = on;
574 + case 65: /* RoundedCorners */
575 + ST_HAS_ROUNDED_CORNERS(tmpms) = on;
577 + case 66: /* SlightlyRoundedCorners */
578 + ST_HAS_SLIGHTLY_ROUNDED_CORNERS(tmpms) = on;
582 case 99: /* PositionHints */
583 diff -U3 -r fvwm/menustyle.h fvwm/menustyle.h
584 --- fvwm/menustyle.h 2011-12-09 19:40:50.141782426 +0100
585 +++ fvwm/menustyle.h 2011-12-09 19:51:38.708521953 +0100
587 #define MST_DO_HILIGHT_BACK(m) ((m)->s->ms->look.flags.do_hilight_back)
588 #define ST_DO_FLAT_SEPARATOR(s) ((s)->look.flags.do_flat_separator)
589 #define MST_DO_FLAT_SEPARATOR(m) ((m)->s->ms->look.flags.do_flat_separator)
590 +#define ST_HAS_ROUNDED_CORNERS(s) ((s)->look.flags.has_rounded_corners)
591 +#define MST_HAS_ROUNDED_CORNERS(m) ((m)->s->ms->look.flags.has_rounded_corners)
592 +#define ST_HAS_SLIGHTLY_ROUNDED_CORNERS(s) ((s)->look.flags.has_slightly_rounded_corners)
593 +#define MST_HAS_SLIGHTLY_ROUNDED_CORNERS(m) ((m)->s->ms->look.flags.has_slightly_rounded_corners)
594 #define ST_DO_HILIGHT_FORE(s) ((s)->look.flags.do_hilight_fore)
595 #define MST_DO_HILIGHT_FORE(m) ((m)->s->ms->look.flags.do_hilight_fore)
596 #define ST_DO_HILIGHT_TITLE_BACK(s) ((s)->look.flags.do_hilight_title_back)
598 unsigned do_hilight_title_back : 1;
599 unsigned using_default_titlefont : 1;
600 unsigned do_flat_separator : 1;
601 + unsigned has_rounded_corners : 1;
602 + unsigned has_slightly_rounded_corners : 1;
604 unsigned char ReliefThickness;
605 unsigned char TitleUnderlines;
606 diff -U3 -r fvwm/style.c fvwm/style.c
607 --- fvwm/style.c 2011-12-09 19:40:50.148448924 +0100
608 +++ fvwm/style.c 2011-12-09 19:51:38.708521953 +0100
611 *merged_style, SGET_HANDLE_WIDTH(*add_style));
613 + if (add_style->flags.has_corner_width)
615 + SSET_CORNER_WIDTH(*merged_style, SGET_CORNER_WIDTH(*add_style));
617 if (add_style->flags.has_icon_size_limits)
620 @@ -2602,6 +2606,20 @@
621 ps->change_mask.has_color_back = 1;
624 + else if (StrEquals(token, "CornerWidth"))
626 + if (GetIntegerArguments(rest, &rest, val, 1))
628 + SSET_CORNER_WIDTH(*ps, (short)*val);
629 + ps->flags.has_corner_width = 1;
633 + ps->flags.has_corner_width = 0;
635 + ps->flag_mask.has_corner_width = 1;
636 + ps->change_mask.has_corner_width = 1;
638 else if (StrEquals(token, "CirculateSkipIcon"))
640 S_SET_DO_CIRCULATE_SKIP_ICON(SCF(*ps), on);
641 @@ -2912,6 +2930,15 @@
642 S_SET_HAS_MWM_BORDER(SCM(*ps), 1);
643 S_SET_HAS_MWM_BORDER(SCC(*ps), 1);
645 + else if (StrEquals(token, "FluxboxHandles"))
647 + S_SET_HAS_FLUXBOX_HANDLES(SCF(*ps), on);
648 + S_SET_HAS_FLUXBOX_HANDLES(SCM(*ps), 1);
649 + S_SET_HAS_FLUXBOX_HANDLES(SCC(*ps), 1);
650 + S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCF(*ps), !on);
651 + S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCM(*ps), 1);
652 + S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCC(*ps), 1);
654 else if (StrEquals(token, "FocusFollowsMouse"))
656 style_set_old_focus_policy(ps, 1);
657 @@ -4117,6 +4144,50 @@
658 S_SET_IS_RIGHT_TITLE_ROTATED_CW(SCM(*ps), 1);
659 S_SET_IS_RIGHT_TITLE_ROTATED_CW(SCC(*ps), 1);
661 + else if (StrEquals(token, "RoundedCorners"))
663 + S_SET_HAS_ROUNDED_CORNERS_TOP(SCF(*ps), on);
664 + S_SET_HAS_ROUNDED_CORNERS_TOP(SCM(*ps), 1);
665 + S_SET_HAS_ROUNDED_CORNERS_TOP(SCC(*ps), 1);
667 + /* FluxboxHandles found */
668 + if (S_HAS_FLUXBOX_HANDLES(SCC(*ps))) {
669 + S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCF(*ps), !on);
670 + S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCM(*ps), 1);
671 + S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCC(*ps), 1);
674 + S_SET_HAS_FLUXBOX_HANDLES(SCF(*ps), !on);
675 + S_SET_HAS_FLUXBOX_HANDLES(SCM(*ps), 1);
676 + S_SET_HAS_FLUXBOX_HANDLES(SCC(*ps), 1);
677 + S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCF(*ps), on);
678 + S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCM(*ps), 1);
679 + S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCC(*ps), 1);
682 + else if (StrEquals(token, "RoundedCornersTop"))
684 + S_SET_HAS_ROUNDED_CORNERS_TOP(SCF(*ps), on);
685 + S_SET_HAS_ROUNDED_CORNERS_TOP(SCM(*ps), 1);
686 + S_SET_HAS_ROUNDED_CORNERS_TOP(SCC(*ps), 1);
688 + else if (StrEquals(token, "RoundedCornersBottom"))
690 + /* FluxboxHandles found */
691 + if (S_HAS_FLUXBOX_HANDLES(SCC(*ps))) {
692 + S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCF(*ps), !on);
693 + S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCM(*ps), 1);
694 + S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCC(*ps), 1);
697 + S_SET_HAS_FLUXBOX_HANDLES(SCF(*ps), !on);
698 + S_SET_HAS_FLUXBOX_HANDLES(SCM(*ps), 1);
699 + S_SET_HAS_FLUXBOX_HANDLES(SCC(*ps), 1);
700 + S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCF(*ps), on);
701 + S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCM(*ps), 1);
702 + S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCC(*ps), 1);
708 @@ -4251,6 +4322,12 @@
709 S_SET_HAS_NO_STICKY_STIPPLED_ICON_TITLE(SCM(*ps), 1);
710 S_SET_HAS_NO_STICKY_STIPPLED_ICON_TITLE(SCC(*ps), 1);
712 + else if (StrEquals(token, "SlightlyRoundedCorners"))
714 + S_SET_HAS_SLIGHTLY_ROUNDED_CORNERS(SCF(*ps), on);
715 + S_SET_HAS_SLIGHTLY_ROUNDED_CORNERS(SCM(*ps), 1);
716 + S_SET_HAS_SLIGHTLY_ROUNDED_CORNERS(SCC(*ps), 1);
718 else if (StrEquals(token, "Slippery"))
720 S_SET_IS_STICKY_ACROSS_PAGES(SCF(*ps), !on);
721 @@ -5264,6 +5341,20 @@
723 flags->do_update_rotated_title = 1;
726 + /* has_fluxbox_handles */
727 + if (S_HAS_FLUXBOX_HANDLES(SCC(*ret_style)))
729 + flags->do_redecorate = True;
732 + /* has_rounded_corners */
733 + if (S_HAS_ROUNDED_CORNERS_TOP(SCC(*ret_style))
734 + || S_HAS_ROUNDED_CORNERS_BOTTOM(SCC(*ret_style))
735 + || S_HAS_SLIGHTLY_ROUNDED_CORNERS(SCC(*ret_style)))
737 + flags->do_redecorate = True;
740 if (S_HAS_BORDER_UNDER_TITLE(SCC(*ret_style)))
742 @@ -5528,6 +5619,12 @@
743 flags->do_update_modules_flags = 1;
746 + /* has_corner_width */
747 + if (ret_style->change_mask.has_corner_width)
749 + flags->do_redecorate = True;
752 if (ret_style->change_mask.do_save_under ||
753 ret_style->change_mask.use_backing_store ||
754 ret_style->change_mask.use_parent_relative)
755 diff -U3 -r fvwm/style.h fvwm/style.h
756 --- fvwm/style.h 2011-12-09 19:40:50.148448924 +0100
757 +++ fvwm/style.h 2011-12-09 19:51:38.708521953 +0100
759 ((sf)->has_color_fore)
760 #define SHAS_HANDLE_WIDTH(sf) \
761 ((sf)->has_handle_width)
762 +#define SHAS_CORNER_WIDTH(sf) \
763 + ((sf)->has_corner_width)
764 #define SHAS_ICON(sf) \
766 #define SHAS_ICON_BOXES(sf) \
768 ((c).s.has_border_under_title)
769 #define S_SET_HAS_BORDER_UNDER_TITLE(c,x) \
770 ((c).s.has_border_under_title = !!(x))
771 +#define S_HAS_FLUXBOX_HANDLES(c) \
772 + ((c).s.has_fluxbox_handles)
773 +#define S_SET_HAS_FLUXBOX_HANDLES(c,x) \
774 + ((c).s.has_fluxbox_handles = !!(x))
775 +#define S_HAS_ROUNDED_CORNERS_TOP(c) \
776 + ((c).s.has_rounded_corners_top)
777 +#define S_SET_HAS_ROUNDED_CORNERS_TOP(c,x) \
778 + ((c).s.has_rounded_corners_top = !!(x))
779 +#define S_HAS_ROUNDED_CORNERS_BOTTOM(c) \
780 + ((c).s.has_rounded_corners_bottom)
781 +#define S_SET_HAS_ROUNDED_CORNERS_BOTTOM(c,x) \
782 + ((c).s.has_rounded_corners_bottom = !!(x))
783 +#define S_HAS_SLIGHTLY_ROUNDED_CORNERS(c) \
784 + ((c).s.has_slightly_rounded_corners)
785 +#define S_SET_HAS_SLIGHTLY_ROUNDED_CORNERS(c,x) \
786 + ((c).s.has_slightly_rounded_corners = !!(x))
787 #define S_DO_EWMH_MINI_ICON_OVERRIDE(c) \
788 ((c).s.do_ewmh_mini_icon_override)
789 #define S_SET_DO_EWMH_MINI_ICON_OVERRIDE(c,x) \
792 #define SSET_HANDLE_WIDTH(s,x) \
793 ((s).handle_width = (x))
794 +#define SGET_CORNER_WIDTH(s) \
796 +#define SSET_CORNER_WIDTH(s,x) \
797 + ((s).corner_width = (x))
798 #define SGET_LAYER(s) \
800 #define SSET_LAYER(s,x) \
801 diff -U3 -r fvwm/window_flags.h fvwm/window_flags.h
802 --- fvwm/window_flags.h 2011-12-09 19:40:50.151782172 +0100
803 +++ fvwm/window_flags.h 2011-12-09 19:51:38.708521953 +0100
804 @@ -316,12 +316,12 @@
805 (fw)->flags.common.s.is_bottom_title_rotated = !!(x)
806 #define SETM_IS_BOTTOM_TITLE_ROTATED(fw,x) \
807 (fw)->flag_mask.common.s.is_bottom_title_rotated = !!(x)
808 -#define IS_BOTTOM_TITLE_ROTATED(fw) \
809 - ((fw)->flags.common.s.is_bottom_title_rotated)
810 -#define SET_IS_BOTTOM_TITLE_ROTATED(fw,x) \
811 - (fw)->flags.common.s.is_bottom_title_rotated = !!(x)
812 -#define SETM_IS_BOTTOM_TITLE_ROTATED(fw,x) \
813 - (fw)->flag_mask.common.s.is_bottom_title_rotated = !!(x)
814 +#define IS_TOP_TITLE_ROTATED(fw) \
815 + ((fw)->flags.common.s.is_top_title_rotated)
816 +#define SET_IS_TOP_TITLE_ROTATED(fw,x) \
817 + (fw)->flags.common.s.is_top_title_rotated = !!(x)
818 +#define SETM_IS_TOP_TITLE_ROTATED(fw,x) \
819 + (fw)->flag_mask.common.s.is_top_title_rotated = !!(x)
820 #define USE_TITLE_DECOR_ROTATION(fw) \
821 ((fw)->flags.common.s.use_title_decor_rotation)
822 #define SET_USE_TITLE_DECOR_ROTATION(fw,x) \
824 (fw)->flags.common.s.has_border_under_title = !!(x)
825 #define SETM_HAS_BORDER_UNDER_TITLE(fw,x) \
826 (fw)->flag_mask.common.s.has_border_under_title = !!(x)
827 +#define HAS_FLUXBOX_HANDLES(fw) \
828 + ((fw)->flags.common.s.has_fluxbox_handles && (fw->flags.has_handles))
829 +#define SET_HAS_FLUXBOX_HANDLES(fw,x) \
830 + (fw)->flags.common.s.has_fluxbox_handles = !!(x)
831 +#define SETM_HAS_FLUXBOX_HANDLES(fw,x) \
832 + (fw)->flag_mask.common.s.has_fluxbox_handles = !!(x)
833 +#define HAS_ROUNDED_CORNERS_TOP(fw) \
834 + ((fw)->flags.common.s.has_rounded_corners_top)
835 +#define SET_HAS_ROUNDED_CORNERS_TOP(fw,x) \
836 + (fw)->flags.common.s.has_rounded_corners_top = !!(x)
837 +#define SETM_HAS_ROUNDED_CORNERS_TOP(fw,x) \
838 + (fw)->flag_mask.common.s.has_rounded_corners_top = !!(x)
839 +#define HAS_ROUNDED_CORNERS_BOTTOM(fw) \
840 + ((fw)->flags.common.s.has_rounded_corners_bottom)
841 +#define SET_HAS_ROUNDED_CORNERS_BOTTOM(fw,x) \
842 + (fw)->flags.common.s.has_rounded_corners_bottom = !!(x)
843 +#define SETM_HAS_ROUNDED_CORNERS_BOTTOM(fw,x) \
844 + (fw)->flag_mask.common.s.has_rounded_corners_bottom = !!(x)
845 +#define HAS_SLIGHTLY_ROUNDED_CORNERS(fw) \
846 + ((fw)->flags.common.s.has_slightly_rounded_corners)
847 +#define SET_HAS_SLIGHTLY_ROUNDED_CORNERS_BOTTOM(fw,x) \
848 + (fw)->flags.common.s.has_slightly_rounded_corners = !!(x)
849 +#define SETM_HAS_SLIGHTLY_ROUNDED_CORNERS(fw,x) \
850 + (fw)->flag_mask.common.s.has_slightly_rounded_corners = !!(x)
852 /* access to the special flags of a window */
853 #define DO_REUSE_DESTROYED(fw) \
854 diff -U3 -r fvwm/windowshade.c fvwm/windowshade.c
855 --- fvwm/windowshade.c 2007-01-27 12:33:16.000000000 +0100
856 +++ fvwm/windowshade.c 2011-12-09 19:51:38.711855201 +0100
858 border_draw_decorations(
859 fw, PART_TITLEBAR, (fw == get_focus_window()) ? True : False,
860 0, CLEAR_BUTTONS, NULL, NULL);
861 + frame_make_rounded_corners(fw);
862 /* update hints and inform modules */
863 BroadcastConfig(M_CONFIGURE_WINDOW, fw);