On 08 Nov 2002 14:17:10 -0500, Richard Lister wrote:
>
> Peter McAlpine <pmcalpin_at_uoguelph.ca> wrote on Thu, 7 Nov 2002 22:24:34 -0500:
> >
> > I'm trying to write a Perl module... and am getting tripped up trying
> > to figure out what the new page is upon a M_NEW_PAGE.
> >
> > My problem is that M_NEW_PAGE->_vp_width/height only give me the
> > maximum width/height for the top left corner... but I need the top
> > right to figure out what page was just switched to, don't I (I can't
> > assume the screen res)? The only thing I can think of to fix this is
> > to have DeskTopSize inputted as a config option.
> >
> > I tried using the module-flash _at_:
> > ftp://ftp.fvwm.org/pub/fvwm/devel/sources/tests/perl/module-flash
> >
> > But it has the same problem I'm having, it doesn't report the correct
> > page (as it claims it will).
Interesting, what does it report if not the correct page numbers?
It works for me with 2.5.4.
> The problem for a module that doesn't load any X libraries is
> finding out the screen resolution. It would be great if fvwm
> passed this in e.g. M_CONFIG_INFO (future enhancement, anyone?).
>
> I solve it in the following clunky manner:
>
> my $screen;
>
> open(XWININFO, "xwininfo -root|") || die "can't run xwininfo";
> while ( <XWININFO> ) {
> $screen->{w} = $1 if /Width:\s*(\d+)/;
> $screen->{h} = $1 if /Height:\s*(\d+)/;
> }
> close(XWININFO);
>
> I would love a better solution if anyone has one :-)
I should be missing something, please enlighten me.
Is not it exactly what vp_width and vp_height arguments of M_NEW_PAGE are?
And M_NEW_DESK/M_NEW_PAGE are sent on Send_WindowList from modules.
Regards,
Mikhael.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Fri Nov 08 2002 - 21:59:00 GMT