Subject: BUG (?) in handling of minimum size hints

From: [email-masked]
Date: Sat, 25 Jan 1997 12:15:48 -0500

First a description of the problem, then a patch:

Here is wish (tcl/tk) code that behaves differently in mwm and fvwm2:

 grid [button .a -text hello]
 wm minsize . [winfo screenwidth .] 1
 wm geometry . +0+0
 update
 grid [button .c -text hello]

To translate: we open a window with a small requested width, but a big
requested minimum width.  We then add to the requested height without
changing the requested minimum width (or width for that matter).  Both
mvm and fvwm2 start by giving the window the full requested minimum
width.  What mwm does (which seems right, but I don't know the protocol)
is not to change the window's on-screen width when the requested height 
changes.  Fvwm2, however, reverts to the requested width, which is smaller
than the requested minimum.

I think the bug, if it is one, can be fixed simply by calling 
ConstrainSize in HandleConfigureRequest, as follows:

diff -u events.c~ events.c
--- events.c~   Wed Jan 22 08:37:39 1997
+++ events.c    Sat Jan 25 12:08:11 1997
@@ -1294,6 +1294,7 @@
    * requested client window width; the inner height is the same as the
    * requested client window height plus any title bar slop.
    */
+  ConstrainSize(Tmp_win, &width, &height);
   SetupFrame (Tmp_win, x, y, width, height,sendEvent);
   KeepOnTop();

Thanks for any advice,
Mark

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

---

From: [email-masked]
Date: Sat, 25 Jan 1997 12:58:06 -0500

I've looked over ICCCM 2 (http://tronche.lri.fr:8000/gui/x/icccm/),
and to me it looks like there is no basis for honoring minimum sizes
in WM_NORMAL_HINTS only at initial mapping.  Cf. section 4.1.5:

  Client configure requests are interpreted by the window manager in
  the same manner as the initial window geometry mapped from the
  Withdrawn state, as described in section 4.1.2.3.

This sounds like we should honor minimum size hints in
HandleConfigureRequest.  (I think the patch I sent earlier does this.)

Mark