Subject: Re: FVWM: Java GUIs and Fvwm2 revisited

From: Dominik Vogt <[email-masked]>
Date: Wed, 7 Mar 2001 20:05:49 +0100

On Wed, Mar 07, 2001 at 02:41:06PM +0100, Michael Lampe wrote:
> For users of the IBM JDK-1.3.0 for Linux I recommend putting a line like
> 
>     Style "*"           UsePPosition
> 
> in ~/.fvwm2rc. This seems to solve the problems with incorrectly sized
> windows that were recently reported on this list. For reference, I have
> attached one of the previously posted samples that show the error/fix.
> It can also be seen with the Java2D demo from the JDK.
> 
> Aside:
>   It really only helps with the IBM JDK. For the Blackdown and the Sun
> Hotspot JDK it makes things even worse.

To make one thing clear in the first place:  This is a *bug* in
the JDK.  This works with mwm because mwm has a hack to detect and
handle the broken window hints that Java produces.

> Some issues are still remaining:
> 
> 
> 1) The Notepad demo that comes with the JDK:
> 
> Obviously, the window wants to get positioned at +0+0. Fvwm2 positiones
> it so that the upper left of the inside is at +0+0, so you don't see its
> titile bar and left border. This is independent of
> UsePPosition/NoPPosition.

After a window has been placed initially, fvwm does not prevent
the application from moving around its own windows.  This is
probably what happens here.  Since Java tries to be its own window
manager but does this miserably, windows often appear at strange
positions.

> I have seen similar perhaps related things with other apps:
> 
> a) xv:
> 
> Just start xv and open the visual schnauzer. It wants to be positioned
> at -10-10, but is placed so that some of the right border and half of
> the buttons at the bottom are outside the viewport.

xv has badly broken window placement and window position hint
code.  I tried to understand what it does once, but the code is so
weird and complex that I see no chance to write a fix.  You should
report this to the xv developers.  BTW, xv-3.10a works properly
for me.

> b) gimp 1.2:
> 
> Open gfig: It wants to be placed centered in x at y=-0. Again the
> buttons at the bottom are partially outside the viewport.

Another bug that should be reported to the gimp developers.  If
position hints are set correctly, the window will appear at the
right spot on the screen.  How do I start gfig?

> 2) Forte (IDE for Java written in Java):
> 
> This is really funny. Forte opens a lot of windows. First, it opens a
> window at the top of the screen with numerous menues, buttons, tabs,
> etc, that spans from left to right. After a second, this window gets a
> kick in the upper left direction so you can only see half of it
> afterwards. Then more windows are opened. At first everything looks
> right. But again after a second they all start crawling towards the
> upper left (you can really watch them moving!) until they are all
> outside the viewport.

What you see is a race contidion between fvwm and the forte
windows.  Let it suffice to say that forte and fvwm disagree where
the window should be placed, and for some reason forte tells fvwm
its geometry again and again.  This can often lead to windows
crawling off screen (xv is another one of these applications that
don't want the window manager to have the final say about its
position).  This usually indicates a violation of the ICCCM2
specifications.
 
> Just to mention it: Mwm works fine for all these apps.

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
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: Michael Lampe <[email-masked]>
Date: Thu, 08 Mar 2001 14:28:07 +0100

> handle the broken window hints that Java produces.

OK. But with 'UsePPosition' you can use at least the IBM JDK with Fvwm2.

> report this to the xv developers.

AFAIK, there hasn't been any xv development since end of 1994.

> BTW, xv-3.10a works properly for me.

I have the same version.

>From a pictures context menu: Filter->Render->Gfig

-Michael

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 10 Mar 2001 17:50:06 +0100

> OK. But with 'UsePPosition' you can use at least the IBM JDK with Fvwm2.

If I only could lay my hands on the mwm source code to see how
they do it...

> AFAIK, there hasn't been any xv development since end of 1994.

Theat can't be true.  My xv supports the png format which does not
exist for long now.

> > BTW, xv-3.10a works properly for me.

Oops, I misread what you wrote.  I see the same with said window.
xv does some funny calculations of its window position.  These
were specifically written for a few window managers.  I remember a
comment in the xv sources that said something like "this will break
with other window managers".  In the end xv does several things
that violate the ICCCM2 severely:  It calculates the position it
wants to use and tries to guess the size of the window manager
decorations, but fails utterly.  Thus the requested position is
screwed up.  Furthermore it forces the window manager to use the
broken hint by claiming that this was 'user specified'.
Therefore, not even "style xv* nopposition" helps.

In the future I may write a "nousposition" style to work around
this, but overall xv's window handling is so completely broken
that it will probably never run nicely with fvwm and most other
window managers (because 'fixing' this would imply to break the
placement of many other applications).

> >From a pictures context menu: Filter->Render->Gfig

Okay, I see.  It's the same problem as with xv.  The window wants
to be placed at +x-0 but requests 'NorthWest' gravity instead of
South gravity which would be correct.  Please report this to the
developers.  All they have to do is to create the window with
"SouthGravity" or "SouthWestGravity" and everything will work
fine.

At least you can use "style gfig nopposition" here.

BTW, the same fix would work for xv, but in addition the
decoration guessing code had to be taken out.

Bye

Dominik ^_^  ^_^

---

From: Dan Espen <[email-masked]>
Date: Sat, 10 Mar 2001 11:16:13 -0500

> If I only could lay my hands on the mwm source code to see how

You can download mwm.  The only restriction is that you can only use
it with a free operating system.

Finding out how Java detects that its running under mwm is easy.
Using our "BugOpts ModalityIsEvil" accomplishes that.

The problem is, once you convince Java that its running under mwm
fvwm has to really act like mwm or Java crashes.  I'm still trying
to figure out what behavior of mwm Java is sensitive to.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
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: Dominik Vogt <[email-masked]>
Date: Sat, 10 Mar 2001 19:36:49 +0100

On Sat, Mar 10, 2001 at 11:16:13AM -0500, Dan Espen wrote:
> You can download mwm.

Where?  I tried to locate the sources but did not find them.

Bye

Dominik ^_^  ^_^

---

From: Michael Han <[email-masked]>
Date: Sat, 10 Mar 2001 09:57:30 -0800

> Where?  I tried to locate the sources but did not find them.

Try http://www.opengroup.org/openmotif/
-- 
[email-masked]                            http://www.mikehan.com/
coffee achiever                              San Francisco, California
"It is better for people to think your [sic] a fool, than for you to
open your mouth and remove all doubts." - some fool
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
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: Dominik Vogt <[email-masked]>
Date: Sun, 11 Mar 2001 21:37:12 +0100

> Try http://www.opengroup.org/openmotif/

And then?  I still do not find it.

Bye

Dominik ^_^  ^_^

---

From: Michael Han <[email-masked]>
Date: Sun, 11 Mar 2001 11:48:22 -0800

> And then?  I still do not find it.

There was some registration form to download it, but it appears you
can just shortcircuit to the FTP site:
ftp://ftp.opengroup.org/pub/openmotif/
I'm grabbing the full 17MB tar, but the whole tree appears to be
expanded, including mwm here:
ftp://ftp.opengroup.org/pub/openmotif/R2.1.30/motif/clients/mwm/
-- 
[email-masked]                            http://www.mikehan.com/
coffee achiever                              San Francisco, California
"How can someone with glasses that thick be so stupid?" - Bart
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
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: Dan Espen <[email-masked]>
Date: Sun, 11 Mar 2001 14:47:08 -0500

> And then?  I still do not find it.

Are you having problems with your browser, possibly with frames?

On the left there is a frame, the second line is downloads.
You have to register then you should be able to download it.

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 11 Mar 2001 22:36:26 +0100

> You have to register then you should be able to download it.

Download what? The whole openmotif tarball?

Bye

Dominik ^_^  ^_^

---

From: Dan Espen <[email-masked]>
Date: Sun, 11 Mar 2001 15:43:09 -0500

> Download what? The whole openmotif tarball?

Thats what I did.  You need parts of the Motif toolkit to understand
some of the things the window manager is doing.

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 12 Mar 2001 00:31:14 +0100

> some of the things the window manager is doing.

Thanks, I got it.

Bye

Dominik ^_^  ^_^

---

From: Tomas Ogren <[email-masked]>
Date: Mon, 12 Mar 2001 03:26:02 +0100

> Theat can't be true.  My xv supports the png format which does not

External patches applied in most/all linux distributions etc.

/Tomas
-- 
Tomas Ögren, [email-masked], http://www.ing.umu.se/~stric/
|- Student at Computing Science, University of Umeå
`- Sysadmin at {cs,ing,acc}.umu.se
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
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]