Hi,

I'm a quite new fvwm user, but already love it's fexibility.

I needed a little upgrade in Maximize growing functions, so I've made a
patch ;-)
It adds another option to the Maximize command called overlayer which
take one parameter - number of layer over which windows can grow.
So any window maximized using "Maximize overlayer 2 grow grow" grows
over any windows on layers 0,1 and 2
I hope this description is clear enough. If not the patch contains also
man page update, so try there ;-)

Greetings
Rafal Bisingier

PS. Sorry for my english. I've tried to make it understandable ;-)


diff -u fvwm.orig/fvwm.1.in fvwm/fvwm.1.in
--- fvwm.orig/fvwm.1.in	2004-02-19 10:36:01.000000000 +0100
+++ fvwm/fvwm.1.in	2004-03-10 15:15:19.790277504 +0100
@@ -5369,12 +5369,16 @@
 .I flags
 argument is a space separated list containing the following
 key words:
-.IR ewmhiwa ", " layer " and " screen .
+.IR ewmhiwa ", " layer ", " overlayer " and " screen .
 .I ewmhiwa
 causes fvwm to ignore the EWMH working area.
 .I layer
 causes the various grow methods to ignore the windows with a layer
 less than or equal to the layer on the window which is maximized.
+.I overlayer
+must have an argument;
+causes the various grow methods to ignore the windows with a layer
+less than or equal to the layer specified as the argument.
 .I screen
 must have an argument which specifies the Xinerama screen on which
 to operate.
diff -u fvwm.orig/move_resize.c fvwm/move_resize.c
--- fvwm.orig/move_resize.c	2004-03-10 13:24:29.473279360 +0100
+++ fvwm/move_resize.c	2004-03-10 15:01:52.602988624 +0100
@@ -3561,7 +3561,7 @@
 static void MaximizeHeight(
 	FvwmWindow *win, unsigned int win_width, int win_x,
 	unsigned int *win_height, int *win_y, Bool grow_up, Bool grow_down,
-	int top_border, int bottom_border, Bool layer_grow)
+	int top_border, int bottom_border, Bool layer_grow, int layer_no)
 {
 	FvwmWindow *cwin;
 	int x11, x12, x21, x22;
@@ -3582,7 +3582,9 @@
 		if (cwin == win ||
 		    (cwin->Desk != win->Desk &&
 		     !is_window_sticky_across_desks(cwin)) ||
-		    (layer_grow && cwin->layer <= win->layer))
+		    (layer_grow && 
+			 ((layer_no >= 0 && cwin->layer <= layer_no) ||
+			  (layer_no < 0 && cwin->layer <= win->layer))))
 		{
 			continue;
 		}
@@ -3632,7 +3634,7 @@
 static void MaximizeWidth(
 	FvwmWindow *win, unsigned int *win_width, int *win_x,
 	unsigned int win_height, int win_y, Bool grow_left, Bool grow_right,
-	int left_border, int right_border, Bool layer_grow)
+	int left_border, int right_border, Bool layer_grow, int layer_no)
 {
 	FvwmWindow *cwin;
 	int x11, x12, x21, x22;
@@ -3653,7 +3655,9 @@
 		if (cwin == win ||
 		    (cwin->Desk != win->Desk &&
 		     !is_window_sticky_across_desks(cwin)) ||
-		    (layer_grow && cwin->layer <= win->layer))
+		    (layer_grow && 
+			 ((layer_no >= 0 && cwin->layer <= layer_no) ||
+			  (layer_no < 0 && cwin->layer <= win->layer))))
 		{
 			continue;
 		}
@@ -3778,6 +3782,7 @@
 	Bool is_screen_given = False;
 	Bool ignore_working_area = False;
 	Bool layer_grow = False;
+	int layer_no = -1;
 	Bool global_flag_parsed = False;
 	int  scr_x, scr_y, scr_w, scr_h;
 	int sx, sy, sw, sh;
@@ -3821,6 +3826,11 @@
 				layer_grow = True;
 				action = taction;
 			}
+			else if (StrEquals(token, "overlayer"))
+			{
+				layer_grow = True;
+				GetIntegerArguments(taction, &action, &layer_no, 1);
+			}
 			else
 			{
 				global_flag_parsed = True;
@@ -3986,7 +3996,7 @@
 				fw, new_g.width, new_g.x,
 				(unsigned int *)&new_g.height, &new_g.y,
 				grow_up, grow_down, page_y + scr_y,
-				page_y + scr_y + scr_h, layer_grow);
+				page_y + scr_y + scr_h, layer_grow, layer_no);
 		}
 		else if (val2 > 0)
 		{
@@ -3999,7 +4009,7 @@
 				fw, (unsigned int *)&new_g.width, &new_g.x,
 				new_g.height, new_g.y, grow_left, grow_right,
 				page_x + scr_x, page_x + scr_x + scr_w,
-				layer_grow);
+				layer_grow, layer_no);
 		}
 		else if (val1 >0)
 		{

Reply via email to