summarylogtreecommitdiffstats
path: root/03-ResizeOutlineThin.patch
diff options
context:
space:
mode:
Diffstat (limited to '03-ResizeOutlineThin.patch')
-rw-r--r--03-ResizeOutlineThin.patch352
1 files changed, 352 insertions, 0 deletions
diff --git a/03-ResizeOutlineThin.patch b/03-ResizeOutlineThin.patch
new file mode 100644
index 000000000000..e7229146ac3d
--- /dev/null
+++ b/03-ResizeOutlineThin.patch
@@ -0,0 +1,352 @@
+diff --unified --recursive --text fvwm-2.6.9/fvwm/fvwm.h fvwm-patched/fvwm/fvwm.h
+--- fvwm-2.6.9/fvwm/fvwm.h 2020-08-21 15:30:39.091737766 -0600
++++ fvwm-patched/fvwm/fvwm.h 2020-08-21 15:42:30.000309012 -0600
+@@ -222,6 +222,7 @@
+ 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;
+diff --unified --recursive --text fvwm-2.6.9/fvwm/move_resize.c fvwm-patched/fvwm/move_resize.c
+--- fvwm-2.6.9/fvwm/move_resize.c 2018-05-30 16:28:25.000000000 -0600
++++ fvwm-patched/fvwm/move_resize.c 2020-08-21 15:45:34.999041350 -0600
+@@ -98,7 +98,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 ----- */
+
+@@ -116,26 +116,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++)
+@@ -145,25 +152,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++;
++ }
+ }
+ }
+
+@@ -176,14 +186,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];
+@@ -192,7 +203,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;
+ }
+@@ -210,7 +222,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)
+ {
+@@ -219,8 +232,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)
+ {
+@@ -237,14 +251,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)
+@@ -256,7 +271,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);
+ }
+ }
+
+@@ -2341,6 +2357,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;
+
+@@ -2414,7 +2431,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)
+@@ -2757,7 +2774,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
+ {
+@@ -2833,7 +2850,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;
+
+@@ -3453,7 +3470,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;
+ int x2;
+@@ -3575,7 +3592,7 @@
+ {
+ draw_move_resize_grid(
+ drag->x, drag->y, drag->width - 1,
+- drag->height - 1);
++ drag->height - 1, do_outline_thin);
+ }
+ else
+ {
+@@ -3634,6 +3651,7 @@
+ int x_off;
+ int y_off;
+ direction_t dir;
++ Bool do_outline_thin = DO_RESIZE_OUTLINE_THIN(fw);
+ int warp_x = 0;
+ int warp_y = 0;
+
+@@ -3956,7 +3974,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 */
+@@ -3977,7 +3995,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
+ {
+@@ -4139,7 +4157,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);
+ is_resized = True;
+ /* need to move the viewport */
+ HandlePaging(
+@@ -4158,7 +4176,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);
+ is_resized = True;
+ }
+ fForceRedraw = False;
+@@ -4194,7 +4212,7 @@
+ {
+ draw_move_resize_grid(
+ drag->x, drag->y, drag->width - 1,
+- drag->height - 1);
++ drag->height - 1, do_outline_thin);
+ }
+ }
+ else
+@@ -4255,7 +4273,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)
+ {
+Only in fvwm-patched/fvwm: move_resize.c.orig
+diff --unified --recursive --text fvwm-2.6.9/fvwm/style.c fvwm-patched/fvwm/style.c
+--- fvwm-2.6.9/fvwm/style.c 2020-08-21 15:30:39.091737766 -0600
++++ fvwm-patched/fvwm/style.c 2020-08-21 15:40:46.901822038 -0600
+@@ -4044,6 +4044,12 @@
+ 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);
+Only in fvwm-patched/fvwm: style.c.orig
+diff --unified --recursive --text fvwm-2.6.9/fvwm/style.h fvwm-patched/fvwm/style.h
+--- fvwm-2.6.9/fvwm/style.h 2020-08-21 15:30:39.091737766 -0600
++++ fvwm-patched/fvwm/style.h 2020-08-21 15:40:46.901822038 -0600
+@@ -225,6 +225,10 @@
+ ((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) \
+Only in fvwm-patched/fvwm: style.h.orig
+diff --unified --recursive --text fvwm-2.6.9/fvwm/window_flags.h fvwm-patched/fvwm/window_flags.h
+--- fvwm-2.6.9/fvwm/window_flags.h 2016-10-15 08:51:45.000000000 -0600
++++ fvwm-patched/fvwm/window_flags.h 2020-08-21 15:40:46.905822149 -0600
+@@ -21,6 +21,8 @@
+ ((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) \