Subject: FVWM: a HUGE window ... a bug?

From: [email-masked]
Date: Fri, 14 Nov 1997 16:50:46 +0200

Hi everybody!

I have a problem with FVWM2 that I don't have with other window 
managers such as FVWM, Afterstep, twm, Exceed and HP X-Terminals.

I run a commercial application (HP Design and Drafting System for 
Cabling, DDS-C) remotely and display it on my Linux-box. At some 
point in the application a have a list from which I can choose 
different components. If I click with the right mouse button a 
component name, a window opens which displays some technical info 
about the component and the graphical symbols associated with the 
component. The problem is that with FVMW2 this windows is really huge
(1596x6384 pixels) when it is supposed to be something like 533x399 
pixels (533*3=1599, 399*16=6384).

I have really no clue what the problem is ;< I have read the FAQ, TODO,
BUGS, searched the www-site and also looked at the man-page but found 
no indication of a similar behaviour. This is why I'm writing to this 
mailing list.

I can guarantee the reproduction of this bug. Unfortunately not too 
many people have access to DDS-C so I don't know how anybody else 
could repeat it. But I'll be happy to dig up more information if 
someone tells me how.

Here's what I came up with:
- Fvwm Version 2.0.45 compiled on May  8 1997 (from debian-release 1.3
  precompiled binary)
- personal configurationfiles make no difference
- some library info:
  /lib/ld-linux.so.1, libXpm.so.4, libXext.so.6, libX11.so.6, libc.so.5
- I'm running Linux 2.0.30 with AcceleratedX v.3.1

I guess that's all... I can always go back to FVWM1 but I already have
started to enjoy the more advanced features of FVWM2 :)

Thanks in advance,

Jaakko Puurunen

---

Here's somewhat lenghty command output on FVWM2:

Script started on Wed Nov 12 14:13:03 1997
$ xwininfo 

xwininfo: Please select the window about which you
          would like information by clicking the
          mouse in that window.

xwininfo: Window id: 0x2400043 "M601074"

  Absolute upper-left X:  6
  Absolute upper-left Y:  792
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1596
  Height: 6384
  Depth: 8
  Visual Class: PseudoColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x26 (installed)
  Bit Gravity State: ForgetGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: Always
  Save Under State: yes
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +6+792  --2+792  --2--5976  +6--5976
  -geometry 1596x6384+0+768

$ xprop 
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
WM_CLASS(STRING) = "", "Cade"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 0, 768
!!!						 !!!
                user specified size: 533 by 399
!!! perhaps something goes wrong here? --------- !!!
                program specified minimum size: 355 by 266
                program specified minimum aspect ratio: 4/1
                program specified maximum aspect ratio: 1/4
WM_ICON_NAME(STRING) = "M601074"
WM_NAME(STRING) = "M601074"

$ xdpyinfo 
name of display:    :0.0
version number:    11.0
vendor string:    Xi Graphics
vendor release number:    3100
maximum request size:  4194300 bytes
motion buffer size:  256
bitmap unit, bit order, padding:    32, LSBFirst, 32
image byte order:    LSBFirst
number of supported pixmap formats:    7
supported pixmap formats:
    depth 1, bits_per_pixel 1, scanline_pad 32
    depth 4, bits_per_pixel 8, scanline_pad 32
    depth 8, bits_per_pixel 8, scanline_pad 32
    depth 15, bits_per_pixel 16, scanline_pad 32
    depth 16, bits_per_pixel 16, scanline_pad 32
    depth 24, bits_per_pixel 32, scanline_pad 32
    depth 32, bits_per_pixel 32, scanline_pad 32
keycode range:    minimum 8, maximum 167
focus:  window 0x280000d, revert to Parent
number of extensions:    15
    BIG-REQUESTS
    DOUBLE-BUFFER
    MIT-SCREEN-SAVER
    MIT-SHM
    MIT-SUNDRY-NONSTANDARD
    RECORD
    SHAPE
    SYNC
    X3D-PEX
    XC-MISC
    XIE
    XIdle
    XTEST
    XTestExtension1
    XsightExtension
default screen number:    0
number of screens:    1

screen #0:
  dimensions:    1600x1200 pixels (542x406 millimeters)
  resolution:    75x75 dots per inch
  depths (2):    1, 8
  root window id:    0x28
  depth of root window:    8 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x26
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 1
  options:    backing-store NO, save-unders NO
  largest cursor:    64x64
  current input event mask:    0x58003d
    KeyPressMask             ButtonPressMask          ButtonReleaseMask        
    EnterWindowMask          LeaveWindowMask          SubstructureNotifyMask   
    SubstructureRedirectMask PropertyChangeMask       
  number of visuals:    6
  default visual id:  0x20
  visual:
    visual id:    0x20
    class:    PseudoColor
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x0, 0x0, 0x0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x21
    class:    TrueColor
    depth:    8 planes
    available colormap entries:    8 per subfield
    red, green, blue masks:    0xe0, 0x1c, 0x3
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x22
    class:    StaticGray
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x0, 0x0, 0x0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x23
    class:    GrayScale
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x0, 0x0, 0x0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x24
    class:    DirectColor
    depth:    8 planes
    available colormap entries:    8 per subfield
    red, green, blue masks:    0xe0, 0x1c, 0x3
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x25
    class:    StaticColor
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x0, 0x0, 0x0
    significant bits in color specification:    8 bits
$ exit

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: Mon, 17 Nov 1997 09:58:38 +0200

I have some additional information concerning the huge window and FVWM2.

If I start my X-session with FVWM2, restarting with any other
window manager results with the same problem; i.e. afterstep or twm
also display the window incorrectly.

On the other hand, if I start with afterstep, restart with twm,
everything goes fine but switching to FVWM2 results with the problem
again.

Here's the relevant part of the problem, I believe:

user specified size: 533 by 399 (by xprop)
-geometry 1596x6384+0+768 (by xwininfo)

It appears that the user specified size is somehow overridden by FVWM2.

Here's a chance for you gurus out there to make a FVWM2-newbie happy :)

Thanks in advance,

Jaakko Puurunen

---

From: Dan Espen <[email-masked]>
Date: Tue, 18 Nov 1997 15:05:13 -0500

[email-masked] writes:
> The problem is that with FVMW2 this windows is really huge

Given  the multipliers that  the  window is  off by,  I  would have to
suspect the "aspect ratios".  The function in fvwm2 that handles these
hints is in fvwm/resize.c in function "ConstrainSize".  I suggest that
you remove the  code that starts with the  comment "Third, adjust  for
aspect ratio" and see if you still have the problem.

Remove the code up until the comment "Fourth, account for border width
and title height".

Let us know the result.
--
Dan Espen                                Phone: (732) 699-5570
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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, 19 Nov 1997 10:43:29 +0200

> Remove the code up until the comment "Fourth, account for border width

Done as Dan Espen adviced.

> Let us know the result.

The moment of truth ... YES! It works! Thank you Mr. Espen :)

Well, what happens now that the problem is solved? Does the source code
of FVWM2 get updated or do I always have to build my own version of
the software ... I believe debian 2.0 is approaching and I just love
those precompiled packages.

Anyway, thanks again (for everyone) for your help!

Jaakko Puurunen

---

From: Dan Espen <[email-masked]>
Date: Wed, 19 Nov 1997 08:16:44 -0500

> those precompiled packages.

The problem isn't solved, it's merely identified.

What  I had   you  do  is remove   the  code in   fvwm2  that supports
application specified  aspect ratios.  We  really need to fix  it, not
remove it.

I did compare fvwm2's logic to the logic  in ctwm and even though they
have an obvious common origin, they are suspiciously different.

Last night I tried to create a test program that creates a window with
aspect ratios  to reproduce the problem,  but it seems to involve more
than turning on the  flag and setting  the x and  y values in the size
hints structure.  All this  code  is new to   me so if anyone else  is
familiar with this, please jump in.

---

From: Dan Espen <[email-masked]>
Date: Fri, 21 Nov 1997 11:55:35 -0500

>                 program specified maximum aspect ratio: 1/4

There  is a bug  here,  but it's in   the application.  Note that  the
application  has declared the  minimum as 4/1  and the maximum as 1/4.
The application seems to think that 4 is less  than .25.  I got better
results with the ratios in the other order.

It seems like the X  call that sets these parameters (XSetWMSizeHints)
doesn't do any range checking.   Perhaps fvwm2 should.  I've been able
to recreate the problem, and I may submit a patch  to cover this case.
(Of course anyone else that wants to can feel free.)

I can't really speak for the other window managers that didn't produce
a problem  with  this application,  but I  did  see  enough difference
between fvwm2 and ctwm to believe that  ctwm might just ignore the bad
ratios and leave the window alone.

---

From: [email-masked]
Date: Mon, 24 Nov 1997 08:25:36 +0200

> results with the ratios in the other order.

OK, then I'll inform the local representative of the software of this
problem ... we'll see if it gets corrected somewhere in the distant
future.

Jaakko Puurunen