diff -r -U 10 fvwm/fvwm.h fvwm/fvwm.h --- fvwm/fvwm.h 2007-06-03 15:32:05.000000000 +0200 +++ fvwm/fvwm.h 2007-06-03 15:41:45.000000000 +0200 @@ -216,20 +216,21 @@ unsigned do_ewmh_ignore_window_type : 1; unsigned do_iconify_window_groups : 1; unsigned do_ignore_gnome_hints : 1; unsigned do_ignore_icon_boxes : 1; unsigned do_ignore_restack : 1; unsigned do_use_window_group_hint : 1; unsigned do_lower_transient : 1; unsigned do_not_show_on_map : 1; unsigned do_raise_transient : 1; unsigned do_resize_opaque : 1; + unsigned do_resize_outline_thin : 1; unsigned do_shrink_windowshade : 1; unsigned do_stack_transient_parent : 1; unsigned do_window_list_skip : 1; unsigned ewmh_maximize_mode : 2; /* see ewmh.h */ unsigned has_depressable_border : 1; unsigned has_mwm_border : 1; unsigned has_mwm_buttons : 1; unsigned has_mwm_override : 1; unsigned has_no_icon_title : 1; unsigned has_override_size : 1; diff -r -U 10 fvwm/style.c fvwm/style.c --- fvwm/style.c 2007-06-03 15:32:05.000000000 +0200 +++ fvwm/style.c 2007-06-03 15:41:45.000000000 +0200 @@ -3501,20 +3501,26 @@ S_SET_DO_RESIZE_OPAQUE(SCF(*ps), on); S_SET_DO_RESIZE_OPAQUE(SCM(*ps), 1); S_SET_DO_RESIZE_OPAQUE(SCC(*ps), 1); } else if (StrEquals(token, "ResizeOutline")) { S_SET_DO_RESIZE_OPAQUE(SCF(*ps), !on); S_SET_DO_RESIZE_OPAQUE(SCM(*ps), 1); S_SET_DO_RESIZE_OPAQUE(SCC(*ps), 1); } + else if (StrEquals(token, "ResizeOutlineThin")) + { + S_SET_DO_RESIZE_OUTLINE_THIN(SCF(*ps), on); + S_SET_DO_RESIZE_OUTLINE_THIN(SCM(*ps), 1); + S_SET_DO_RESIZE_OUTLINE_THIN(SCC(*ps), 1); + } else if (StrEquals(token, "RightTitleRotatedCW")) { S_SET_IS_RIGHT_TITLE_ROTATED_CW(SCF(*ps), on); S_SET_IS_RIGHT_TITLE_ROTATED_CW(SCM(*ps), 1); S_SET_IS_RIGHT_TITLE_ROTATED_CW(SCC(*ps), 1); } else if (StrEquals(token, "RightTitleRotatedCCW")) { S_SET_IS_RIGHT_TITLE_ROTATED_CW(SCF(*ps), !on); S_SET_IS_RIGHT_TITLE_ROTATED_CW(SCM(*ps), 1); diff -r -U 10 fvwm/style.h fvwm/style.h --- fvwm/style.h 2007-06-03 15:32:05.000000000 +0200 +++ fvwm/style.h 2007-06-03 15:41:45.000000000 +0200 @@ -188,20 +188,24 @@ #define S_SET_DO_NOT_SHOW_ON_MAP(c,x) \ ((c).s.do_not_show_on_map = !!(x)) #define S_DO_RAISE_TRANSIENT(c) \ ((c).s.do_raise_transient) #define S_SET_DO_RAISE_TRANSIENT(c,x) \ ((c).s.do_raise_transient = !!(x)) #define S_DO_RESIZE_OPAQUE(c) \ ((c).s.do_resize_opaque) #define S_SET_DO_RESIZE_OPAQUE(c,x) \ ((c).s.do_resize_opaque = !!(x)) +#define S_DO_RESIZE_OUTLINE_THIN(c) \ + ((c).s.do_resize_outline_thin) +#define S_SET_DO_RESIZE_OUTLINE_THIN(c,x) \ + ((c).s.do_resize_outline_thin = !!(x)) #define S_DO_SHRINK_WINDOWSHADE(c) \ ((c).s.do_shrink_windowshade) #define S_SET_DO_SHRINK_WINDOWSHADE(c,x) \ ((c).s.do_shrink_windowshade = !!(x)) #define S_DO_STACK_TRANSIENT_PARENT(c) \ ((c).s.do_stack_transient_parent) #define S_SET_DO_STACK_TRANSIENT_PARENT(c,x) \ ((c).s.do_stack_transient_parent = !!(x)) #define S_DO_WINDOW_LIST_SKIP(c) \ ((c).s.do_window_list_skip) diff -r -U 10 fvwm/window_flags.h fvwm/window_flags.h --- fvwm/window_flags.h 2006-12-21 17:38:58.000000000 +0100 +++ fvwm/window_flags.h 2007-06-03 15:41:45.000000000 +0200 @@ -14,20 +14,22 @@ ((fw)->flags.common.s.focus_policy) #define DO_LOWER_TRANSIENT(fw) \ ((fw)->flags.common.s.do_lower_transient) #define DO_NOT_SHOW_ON_MAP(fw) \ ((fw)->flags.common.s.do_not_show_on_map) #define DO_RAISE_TRANSIENT(fw) \ ((fw)->flags.common.s.do_raise_transient) #define DO_RESIZE_OPAQUE(fw) \ ((fw)->flags.common.s.do_resize_opaque) +#define DO_RESIZE_OUTLINE_THIN(fw) \ + ((fw)->flags.common.s.do_resize_outline_thin) #define DO_SHRINK_WINDOWSHADE(fw) \ ((fw)->flags.common.s.do_shrink_windowshade) #define SET_DO_SHRINK_WINDOWSHADE(fw,x) \ (fw)->flags.common.s.do_shrink_windowshade = !!(x) #define SETM_DO_SHRINK_WINDOWSHADE(fw,x) \ (fw)->flag_mask.common.s.do_shrink_windowshade = !!(x) #define DO_SKIP_CIRCULATE(fw) \ ((fw)->flags.common.s.do_circulate_skip) #define SET_DO_SKIP_CIRCULATE(fw,x) \ (fw)->flags.common.s.do_circulate_skip = !!(x) --- fvwm/move_resize.c 2007-08-04 02:14:43.000000000 +0200 +++ fvwm/move_resize.c 2007-08-04 02:42:08.000000000 +0200 @@ -112,7 +112,7 @@ extern Window PressedW; -static void draw_move_resize_grid(int x, int y, int width, int height); +static void draw_move_resize_grid(int x, int y, int width, int height, Bool thin); /* ----- end of resize globals ----- */ @@ -130,26 +130,33 @@ * */ static int get_outline_rects( - XRectangle *rects, int x, int y, int width, int height) + XRectangle *rects, int x, int y, int width, int height, Bool do_outline_thin) { int i; int n; int m; - n = 3; - m = (width - 5) / 2; - if (m < n) + if (do_outline_thin) { - n = m; - } - m = (height - 5) / 2; - if (m < n) - { - n = m; + n = 1; } - if (n < 1) + else { - n = 1; + n = 3; + m = (width - 5) / 2; + if (m < n) + { + n = m; + } + m = (height - 5) / 2; + if (m < n) + { + n = m; + } + if (n < 1) + { + n = 1; + } } for (i = 0; i < n; i++) @@ -159,25 +166,28 @@ rects[i].width = width - (i << 1); rects[i].height = height - (i << 1); } - if (width - (n << 1) >= 5 && height - (n << 1) >= 5) + if (!do_outline_thin) { - if (width - (n << 1) >= 10) + if (width - (n << 1) >= 5 && height - (n << 1) >= 5) { - int off = (width - (n << 1)) / 3 + n; - rects[i].x = x + off; - rects[i].y = y + n; - rects[i].width = width - (off << 1); - rects[i].height = height - (n << 1); - i++; - } - if (height - (n << 1) >= 10) - { - int off = (height - (n << 1)) / 3 + n; - rects[i].x = x + n; - rects[i].y = y + off; - rects[i].width = width - (n << 1); - rects[i].height = height - (off << 1); - i++; + if (width - (n << 1) >= 10) + { + int off = (width - (n << 1)) / 3 + n; + rects[i].x = x + off; + rects[i].y = y + n; + rects[i].width = width - (off << 1); + rects[i].height = height - (n << 1); + i++; + } + if (height - (n << 1) >= 10) + { + int off = (height - (n << 1)) / 3 + n; + rects[i].x = x + n; + rects[i].y = y + off; + rects[i].width = width - (n << 1); + rects[i].height = height - (off << 1); + i++; + } } } @@ -190,14 +200,15 @@ struct { unsigned is_enabled : 1; + unsigned do_outline_thin : 1; } flags; } move_resize_grid = { { 0, 0, 0, 0 }, - { 0 } + { 0, 0 } }; -static void draw_move_resize_grid(int x, int y, int width, int height) +static void draw_move_resize_grid(int x, int y, int width, int height, Bool do_outline_thin) { int nrects = 0; XRectangle rects[10]; @@ -206,7 +217,8 @@ x == move_resize_grid.geom.x && y == move_resize_grid.geom.y && width == move_resize_grid.geom.width && - height == move_resize_grid.geom.height) + height == move_resize_grid.geom.height && + do_outline_thin == move_resize_grid.flags.do_outline_thin) { return; } @@ -224,7 +236,8 @@ &(rects[0]), move_resize_grid.geom.x, move_resize_grid.geom.y, move_resize_grid.geom.width, - move_resize_grid.geom.height); + move_resize_grid.geom.height, + move_resize_grid.flags.do_outline_thin); } if (width && height) { @@ -233,8 +246,9 @@ move_resize_grid.geom.y = y; move_resize_grid.geom.width = width; move_resize_grid.geom.height = height; + move_resize_grid.flags.do_outline_thin = do_outline_thin; nrects += get_outline_rects( - &(rects[nrects]), x, y, width, height); + &(rects[nrects]), x, y, width, height, do_outline_thin); } if (nrects > 0) { @@ -251,14 +265,15 @@ { if (move_resize_grid.flags.is_enabled) { - draw_move_resize_grid(0, 0, 0, 0); + draw_move_resize_grid(0, 0, 0, 0, 0); } else { move_resize_grid.geom.x = 0; move_resize_grid.geom.y = 0; move_resize_grid.geom.width = 0; - move_resize_grid.geom.height = 0; + move_resize_grid.geom.height = 0; + move_resize_grid.flags.do_outline_thin = 0; } } else if (!move_resize_grid.flags.is_enabled) @@ -270,7 +285,8 @@ move_resize_grid.geom.x, move_resize_grid.geom.y, move_resize_grid.geom.width, - move_resize_grid.geom.height); + move_resize_grid.geom.height, + move_resize_grid.flags.do_outline_thin); } } @@ -2281,6 +2297,7 @@ /* Must not set placed by button if the event is a modified KeyEvent */ Bool is_fake_event; FvwmWindow *fw = exc->w.fw; + Bool do_outline_thin = DO_RESIZE_OUTLINE_THIN(fw); unsigned int draw_parts = PART_NONE; XEvent e; @@ -2354,7 +2371,7 @@ if (!IS_ICONIFIED(fw) && ((!do_move_opaque && !Scr.gs.do_emulate_mwm) || !IS_MAPPED(fw))) { - draw_move_resize_grid(xl, yt, Width - 1, Height - 1); + draw_move_resize_grid(xl, yt, Width - 1, Height - 1, do_outline_thin); } if (move_w == FW_W_FRAME(fw) && do_move_opaque) @@ -2682,7 +2699,7 @@ if (!do_move_opaque) { draw_move_resize_grid( - xl, yt, Width - 1, Height - 1); + xl, yt, Width - 1, Height - 1, do_outline_thin); } else { @@ -2753,7 +2770,7 @@ if (!do_move_opaque) { draw_move_resize_grid( - xl, yt, Width - 1, Height - 1); + xl, yt, Width - 1, Height - 1, do_outline_thin); } break; @@ -3286,7 +3303,7 @@ static void __resize_step( const exec_context_t *exc, int x_root, int y_root, int *x_off, int *y_off, rectangle *drag, const rectangle *orig, int *xmotionp, - int *ymotionp, Bool do_resize_opaque, Bool is_direction_fixed) + int *ymotionp, Bool do_resize_opaque, Bool is_direction_fixed, Bool do_outline_thin) { int action = 0; XEvent e; @@ -3409,7 +3426,7 @@ { draw_move_resize_grid( drag->x, drag->y, drag->width - 1, - drag->height - 1); + drag->height - 1, do_outline_thin); } else { @@ -3469,6 +3486,7 @@ int x_off; int y_off; direction_t dir; + Bool do_outline_thin = DO_RESIZE_OUTLINE_THIN(fw); bad_window = False; ResizeWindow = FW_W_FRAME(fw); @@ -3772,7 +3790,7 @@ if (!do_resize_opaque) { draw_move_resize_grid( - drag->x, drag->y, drag->width - 1, drag->height - 1); + drag->x, drag->y, drag->width - 1, drag->height - 1, do_outline_thin); } /* kick off resizing without requiring any motion if invoked with a key * press */ @@ -3793,7 +3811,7 @@ yo = 0; __resize_step( exc, stashed_x, stashed_y, &xo, &yo, drag, orig, - &xmotion, &ymotion, do_resize_opaque, True); + &xmotion, &ymotion, do_resize_opaque, True, do_outline_thin); } else { @@ -3957,7 +3975,7 @@ __resize_step( exc, x, y, &x_off, &y_off, drag, orig, &xmotion, &ymotion, do_resize_opaque, - is_direction_fixed); + is_direction_fixed, do_outline_thin); /* need to move the viewport */ HandlePaging( &ev, dx, dy, &x, &y, &delta_x, @@ -3974,7 +3992,7 @@ __resize_step( exc, x, y, &x_off, &y_off, drag, orig, &xmotion, &ymotion, do_resize_opaque, - is_direction_fixed); + is_direction_fixed, do_outline_thin); } fForceRedraw = False; is_done = True; @@ -4009,7 +4027,7 @@ { draw_move_resize_grid( drag->x, drag->y, drag->width - 1, - drag->height - 1); + drag->height - 1, do_outline_thin); } } else @@ -4062,7 +4080,7 @@ g = sorig; __resize_step( exc, sorig.x, sorig.y, &xo, &yo, &g, orig, - &xmotion, &ymotion, do_resize_opaque, True); + &xmotion, &ymotion, do_resize_opaque, True, do_outline_thin); } if (vx != Scr.Vx || vy != Scr.Vy) {