Subject: wharf's maxswallow behavior

From: Ben Winslow <[email-masked]>
Date: Sun, 25 Jul 1999 20:34:54 -0400

Here is a patch to fix the Wharf's MaxSwallow behavior-- currently, it
forces a MaxSwallow'd apps window to 55x57.  This patch uses
XGetGeometry to change the size to match the running app, which fixes
problems swallowing many AfterStep/Window Maker Wharf/Dock apps.  The
patch is against 2.3.3, although the FvwmWharf module hasn't changed
since then, so it should still work fine.

-- 
Ben Winslow / [email-masked] / |Rain| / freshmeat news squad

Knowledge is of no value unless you put it into practice.
- Heber J. Grant

diff -ur fvwm.orig/modules/FvwmWharf/FvwmWharf.c fvwm-2.3.3/modules/FvwmWharf/FvwmWharf.c
--- fvwm.orig/modules/FvwmWharf/FvwmWharf.c	Sat May 29 19:13:01 1999
+++ fvwm-2.3.3/modules/FvwmWharf/FvwmWharf.c	Sun Jul 25 20:00:57 1999
@@ -2167,6 +2167,9 @@
 {
   char *temp;
   int button,i,j;
+  int width, height;
+  int junk1, junk2, junk3, junk4;
+  Window root;
   long supplied;
 
   for(i=0;i<num_rows;i++)
@@ -2202,9 +2205,13 @@
      while (*mods++);
 
 	      }
	    if (Buttons[button].maxsize) {
-	      Buttons[button].icons[0].w = 55;
-	      Buttons[button].icons[0].h = 57;
+	      XGetGeometry(dpy, Buttons[button].IconWin, &root,
+	      	           &junk1, &junk2, &width, &height, &junk3,
+	      	           &junk4);
+	      			
+	      Buttons[button].icons[0].w = width;
+	      Buttons[button].icons[0].h = height;
 	    }
 	    else {
 	      Buttons[button].icons[0].w = ICON_WIN_WIDTH;