Subject: fvwm: Fullscreen should not require EWMHUseStackingOrderHints style

From: Manoj Srivastava <[email-masked]>
Date: Tue, 26 Oct 2004 13:26:38 -0500

Hi,

        [Please retain the CC to [email-masked]
         so that the Debian BTS has a record of your input]

	This was reported by a Debian user.

 Fvwm2 seems to have some trouble with the EWMH fullscreen mode.

 My configuration includes a stay-on-top FvwmPager.  When putting EWMH
 compliant applications, such as tvtime, the pager is not obscured by
 the fullscreen window, so I get a TV window with a pager floating on
 top, which is less than desirable.

 The bug can also be reproduced with the fullscreen modes in Mozilla
 Firefox and OpenOffice.org, but I have not tested using this
 extensively as I have with tvtime.

 The bug can be worked around by setting:

 Style *           EWMHUseStackingOrderHints

 in the .fvwm2rc file.

 After investigating the problem, my analysis of the problem is that
 it seems (according to the excellent fvwm manual page) that the
 EWMHUseStackingOrderHints was intended to disable/enable some
 KDE-specific extentions.

 Unfortunately, the slightly misleading option name lead a programmer to
 misinterpret the meaning of the flag when programming the fullscreen
 code, and made that disable the stacking code in that when it was
 enabled.

 The fact that the option is not intended to disable *all* stacking
 hints is further supported by the fact that tvtime also has an (AFAIK)
 EWMH-compliant Always-on-top mode, which does manage to obscure the
 pager properly, even when EWMHUseStackingOrderHints unset.

 From http://www.freedesktop.org/standards/wm-spec/1.3/ar01s07.html#STACKINGORDER

 # Stacking order
 #
 # To obtain good interoperability between different Desktop Environments,
 # the following layered stacking order is recommended, from the bottom:
 #
 # * windows of type _NET_WM_TYPE_DESKTOP
 # * windows having state _NET_WM_STATE_BELOW
 # * windows not belonging in any other layer
 # * windows of type _NET_WM_TYPE_DOCK (unless they have state
 #   _NET_WM_TYPE_BELOW) and windows having state _NET_WM_STATE_ABOVE
 # * focused windows having state _NET_WM_STATE_FULLSCREEN
 #
 # Windows that are transient for another window should be kept above this
 # window.
 #
 # The window manager may choose to put some windows in different stacking
 # positions, for example to allow the user to bring currently a active
 # window to the top and return it back when the window looses focus.

	Let me summarize:

 If the EWMHUseStackingOrderHints style is on, fullscreen works. Pager
 is hidden as it should be.

 If the EWMHUseStackingOrderHints style is off, fullscren works, but
 pager is not hidden. But, EWMH always-on-top modes such as the one
 found in tvtime still works.

 According to the documentation, EWMHUseStackingOrderHints affects
 KDE-specific extentions. The extentions mentioned aren't KDE
 extentions, they are a part of the EWMH standard 1.3 from
 freedesktop.org. So either the documentation is wrong or the code is
 wrong.

 And still, you shouldn't have to activate a special option in order
 for FVWM to fully comply with the recommendation in the standard.

 So, I see two possibilities:

 - The option is intended to tell EWMH never to dictate stacking. In
   that case it's broken since tvtime's EWMH always-on-top stacking
   still works when that option is disabled, and the documentation is
   wrong.

 - And what I think is more likely: The option was intended to
   activate special KDE-specific extentions (as per the documentation)
   but somehow breaks fullscreen mode to be out of compliance with
   recommendations if disabled. This has nothing to do with KDE
   extentions AFAIK.

 The bug has been tested mainly on fvwm debian versions 2.5.10-12 and
 2.5.10-13 (latest testing versions), and has also been tested against
 2.5.12 from the tarball from upstream.

	manoj
-- 
An economist is a man who would marry Farrah Fawcett for her
money. Edgar R. Fiedler
Manoj Srivastava   <[email-masked]>  <http://www.datasync.com/%7Esrivasta/>
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C
--
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: Olivier Chapuis <[email-masked]>
Date: Tue, 26 Oct 2004 23:12:20 +0200

>  Style *           EWMHUseStackingOrderHints

So, everything is fine. No? You use a stay on top pager (i.e., you use
stacking), so you should use this style. I've no time to explain why,
but I do like stay on top windows at all. Maybe, this
EWMHUseStackingOrderHints should be on by default. I do not know (and
I do not care). 

>  EWMHUseStackingOrderHints was intended to disable/enable some

For me the bug is in the man page.

>  # window to the top and return it back when the window looses focus.

FVWM try to follow the spec but surely do not follow this
*recommendation* without an user intervention (or if
EWMHUseStackingOrderHints was a default, without the possibility to
break such a recommendation). For me, the only acceptable stacking
rule is the one concerning _NET_WM_TYPE_DESKTOP.
 
>  is hidden as it should be.

Fine.

>  found in tvtime still works.

Maybe  tvtime use the old GNOME hints? What happen if you use
Style * IgnoreGnomeHints ?

>  freedesktop.org. So either the documentation is wrong or the code is

The documentation is wrong. The EWMHUseStackingOrderHints code and doc
was written before _NET_WM_STATE_BELOW, _NET_WM_STATE_ABOVE and
_NET_WM_STATE_FULLSCREEN was introduced in the ewmh spec.  Even, I
think that at some point in the spec elaboration it was decided that
no stacking rules should appear in the spec (Dominik?), but one day 
someone decided that all wm should work like kwin and metacity ...

The code follows the EWMHUseStackingOrderHints style but not the
doc :o/ This happen even with FVWM!

>  for FVWM to fully comply with the recommendation in the standard.

Not agree (but I do not care if we can disable these stacking
dictatorial rules via a style).
 
>  - The option is intended to tell EWMH never to dictate stacking.

Yes!

>    In that case it's broken since tvtime's EWMH always-on-top stacking

Maybe there is a bug somewhere. I've not tvtime here; but as I said
maybe the old GNOME hints are used. Try to disable the GNOME hints
and see if tvtime is still stay on top.

>    recommendations if disabled. This has nothing to do with KDE

No.

Thanks for the clear feedback.

Regards, Olivier

---

From: Per von Zweigbergk <[email-masked]>
Date: Wed, 27 Oct 2004 11:06:27 +0200 (CEST)

> For me the bug is in the man page.

Very well -- so long as a proper description of the option is in the man 
page, I think this bug can be closed.

> rule is the one concerning _NET_WM_TYPE_DESKTOP.

That's a policy decision for the fvwm team I guess, but I still think it 
makes sense to give full screen applications -- er -- the full screen. :-)
But I can see the case where some body would like to float xclock over 
their session of Quake 3 or whatever to make sure he doesn't stay up too 
late gaming. :-)

> Style * IgnoreGnomeHints ?

No. According to Billy Biggs (main developer of tvtime), he says that he's
pretty sure that he uses EWMH hints only for this case. I haven't looked
closely at the source code himself, though, but I could unless you know 
another way to check what tvtime uses.

The IgnoreGnomeHints style does nothing to change the described behavior.
 
> doc :o/ This happen even with FVWM!

I think the EWMH stacking rules are mostly common sense, and should be the 
default, although they should be overridable by user setting -- i.e. the 
inverse of EWMHUseStackingOrderHints or whatever, but again that's a 
policy decision for the fvwm team.

> Thanks for the clear feedback.

Thanks for an elaborate answer. :-)

-- 
Per von Zweigbergk <[email-masked]>

---

From: Olivier Chapuis <[email-masked]>
Date: Wed, 27 Oct 2004 13:17:07 +0200

> another way to check what tvtime uses.

I've just tried tvtime version 0.9.12. I can confirm that it uses the
EWMH fullscreen hint and no GNOME hints. However, If I've a stay on
top window (EWMHUseStackingOrderHints not enabled) this window is
*not* covered by tvtime.

What version of tvtime do you use?

I take fast look at the 0.9.13 source code. What *may* happen is that
after tvtime is mapped it ask to be above with the _NET_WM_STATE_ABOVE
hints (if a window want to be above it should set this state before
mapping). So, FVWM interprets this has a user query (e.g., the user
has used the kicker taskbar menu on the tvtime "icon") and not as a
program query and respect the user query (ignoring !EWMHUseStackingOrderHints).
If tvtime do effectively this, in my opinion, it tries to override
the wm stacking policy and this is not regular (and I will be not happy
with such application).

There is a plan to extend the EWMH spec so that the wm can know
who send a _NET_WM_STATE_FOO query (so if the app developers do
not cheat we will be able to handle the situation below).

Olivier