Subject: stack ring, again

From: Michael Han <[email-masked]>
Date: Mon, 3 Jul 2000 14:39:01 -0700

Hi, so there's still a problem with the stacking ring code in fvwm
(latest CVS). The problem is specific to the following:

Style * StackTransientParent
Style * RaiseTransient
1 window of higher layer
1 window at the top of the default (4) layer, creating a transient

What happens:

The transient maps on top of the higher-layer window

What really happens:

The transient maps and is dropped at the head of the ring.
Then RaiseOrLowerWindow() adjusts its ring position behind the window
on the higher layer.
RaiseOrLowerWindow() recalls itself on the transient's parent, which
correctly determines that the stacking ring is perfectly in order
RaiseOrLowerWindow() for the transientfor calls itself again.
The innermost (there are three total) RaiseOrLowerWindow() returns
having done nothing.
The transientfor RaiseOrLowerWindow() does nothing
The outermost RaiseOrLowerWindow, which was invoked is_new_window &&
!allow_recursion explicitly returns immediately after the second
RaiseOrLowerWindow() returns

At no point does XRestackWindows() or BroadcastRestack() get invoked.
So while the stacking ring is perfectly correct, the ring and the
window state desynchronize... The RaiseOrLowerWindow() logic is
getting fairly complex, and I'm not sure what the proper fix is
here. I'll think on it some more assuming no one else can suggest a
fix.

Also, I'm noticing that upon restart, the stacking ring may not be
correctly synchronized with the correct or existing window stacking
order. It takes a few explicit raises to get the stacking order
correct. I added some code to dump the stack ring upon restart, at the
head of RaiseOrLowerWindow(). Here's its output after a restart:

Current ring:
        60000d : xterm (on layer 5)
        80001c : editres (on layer 4)
        40000d : FvwmConsole (on layer 4)
Current ring:
        80001c : editres (on layer 4)
Current ring:
        60000d : xterm (on layer 5)
        80001c : editres (on layer 4)
Warning: Color name "LIGHTBACK" is not defined
Warning: Color name "FORE" is not defined
Warning: Color name "DARKBACK" is not defined
Warning: Color name "MEDIUMBACK" is not defined
Current ring:
        40000d : FvwmConsole (on layer 4)
        60000d : xterm (on layer 5)
        80001c : editres (on layer 4)
-- 
[email-masked]                            http://www.mikehan.com/
coffee achiever                              San Francisco, California
"I was thinking of the immortal words of Socrates, who said, "I drank
what?" - Chris Knight
--
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: Tue, 4 Jul 2000 03:45:06 +0200

> here. I'll think on it some more assuming no one else can suggest a

Hm, I'll simply write a function that re-synchronizes the stacking
order in X from the stack ring...

>         80001c : editres (on layer 4)

No idea why yet.

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 Han <[email-masked]>
Date: Mon, 3 Jul 2000 19:04:09 -0700

On Tue, Jul 04, 2000 at 03:45:06AM +0200, Dominik Vogt wrote:
> > [snip]

Yes, that seems to fix things.
 
> >         80001c : editres (on layer 4)

Duh. It's probably got something to do with the fact that I'm only
checking the ring at entry time... Let's assume that the ring is in
the correct state, synchronous with the window order, when it *leaves*
RaiseOrLowerWindow()... I think it's all working now.
-- 
[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]