Subject: Re: FVWM: Saving Windows: save stacking order?

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 12 Jul 2004 02:48:44 +0000

On 11 Jul 2004 17:01:16 +0000, Mikhael Goikhman wrote:
> 
> On 11 Jul 2004 20:08:06 +1000, Scott Smedley wrote:
> > 
> > > Currently M_RESTACK is the only event with periodical format, and it is
> > > not fully supported by perllib yet. So, you can't get the stacking info
> > > yet. But there is nothing inherently difficult to implement such
> > > periodical format parsing, I just didn't have a need for this event yet.
> > 
> > I'm not sure what you mean by "periodical format". Can you please
> > elaborate?
> > 
> > I notice there are only 3 fields in an M_RESTACK event:
> > 
> > win_id
> > ptr, &
> > frame_id
> > 
> > I can't find a logical connection b/w those fields & a way to calculate
> > the stacking order.
> 
> These 3 arguments are repeated for all windows participated in restack.
> So there are actually 3*number_of_windows arguments in M_RESTACK event.
> 
> You are right, the meaning of the windows is not documented well, just
> briefly, in http://fvwm.org/documentation/dev_modules.php#M_RESTACK .
> You should figure out yourself how to use this to get the stacking order.
> 
> I will either implement the generic support for events with periodical
> arguments (more likely), or provide the special M_RESTACK interface.

Ok, I have implemented the generic looped args support, so M_RESTACK
is now fully supported.

But I am disappointed now. It seems that M_RESTACK is always sent when
some window is lowered and it always has 6 arguments (i.e. 2 windows).
This is kind of contradicting the documentation in the link above.
Unless of course I have some bug (unlikely). If someone knows whether
this strange behaviour of M_RESTACK is intended, please explain.

So, I am not sure whether this event is useful to manage the stacking
order. M_LOWER_WINDOW and M_RAISE_WINDOW seem to be more useful.

I think you should take a look at FvwmPager, it is the only module
currently that manages stacking order of windows.

Regards,
Mikhael.
--
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: Scott Smedley <[email-masked]>
Date: Mon, 12 Jul 2004 17:28:50 +1000

Hi Mikhael, :)

> Ok, I have implemented the generic looped args support, so M_RESTACK

Thank-you muchly!

One problem: I'm running a simple module & get this error:

Internal error, event type 100000000 (11 names, 7 values)

Also FVWM::Window::dump in WindowList.pm looks dodgy. I had to change it to:

sub dump ($) {
    my ($window) = @_;
    my $id = $window->{win_id};
    my $string = "Window $id\n";
    foreach my $prop (sort keys %$window) {
        next if $prop =~ /^_/;
        $string .= "\t$prop:\t[$window->{$prop}]\n";
    }
    return $string;
}

to get it to compile, but I'm not sure if that's right.

> currently that manages stacking order of windows.

Will do, thanks.

SCoTT. :)

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 12 Jul 2004 13:23:13 +0000

> Internal error, event type 100000000 (11 names, 7 values)

It is M_ICONIFY, it sometimes sends 7 and sometimes 11 values.

> Also FVWM::Window::dump in WindowList.pm looks dodgy. I had to change it to:

Sorry about this.

I tested this with FvwmGtkDebug and it worked as expected including
variable number of arguments in M_ICONIFY. However, true, I got both of
the problems with FvwmWindowMenu. I will commit the fix now.

Regards,
Mikhael.