Subject: FVWM: [PATCH] Resize problem

From: Håvard Kvålen <[email-masked]>
Date: Tue, 9 Sep 2003 21:19:43 +0200 (CEST)

Hi,

If a client sets WM_NORMAL_HINTS on a window and then starts a resize with
EWMH "moveresize" before any ConfigureRequest is generated, fvwm will use
old data.  The last part of the patch will probably trigger in other cases
too.

diff -ur fvwm-2.5.6-orig/fvwm/decorations.c fvwm-2.5.6/fvwm/decorations.c
--- fvwm-2.5.6-orig/fvwm/decorations.c	2002-12-21 23:18:34.000000000 +0100
+++ fvwm-2.5.6/fvwm/decorations.c	2003-09-09 19:12:29.000000000 +0200
@@ -612,8 +612,15 @@
 static Bool __is_resize_allowed(FvwmWindow *t, int functions,
 				Bool is_user_request)
 {
+	if (HAS_NEW_WM_NORMAL_HINTS(t))
+	{
+		/* get the latest size hints */
+		XSync(dpy, 0);
+		GetWindowSizeHints(t);
+		SET_HAS_NEW_WM_NORMAL_HINTS(t, 0);
+	}
         if (!HAS_OVERRIDE_SIZE_HINTS(t) &&
-	    t->hints.min_width == t->hints.min_width &&
+	    t->hints.min_width == t->hints.max_width &&
 	    t->hints.min_height == t->hints.max_height)
 	{
 	        return False;

-- 
Håvard Kvålen

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked]
Date: Wed, 10 Sep 2003 01:49:58 +0200

> old data.  The last part of the patch will probably trigger in other cases

Thanks for the patch.  I have applied the second part.  The first
problem is already fixed in the latest development code.

> +++ fvwm-2.5.6/fvwm/decorations.c	2003-09-09 19:12:29.000000000 +0200

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]