Subject: Re: FVWM: FWD: Re: [TAG] determining screen resolution

From: Glen Lee Edwards <[email-masked]>
Date: Tue, 9 Oct 2001 01:12:07 -0500 (CDT)

Dan,

As a follow up to this letter, I checked xrdb.  The window values for width and
height are also showing the largest screen resolution listed in XF86Config
regardless of what the actual settings are:

tty/dev/pts/5 glenlee@members [Tue Oct  9 01:02:49] 
Directory: ~
$ xrdb -symbols
<edit>
-DWIDTH=1152
-DHEIGHT=864

Glen

Glen Lee Edwards writes:
 > Dan,
 > 
 > The line works.  However, on experimenting with it after using Ctrl-Alt-KP_Plus,
 > the variables $[vp.width] and $[vp.height] aren't changing to be current with
 > the new window size.  No matter what screen resolution I was at, the values
 > always showed 1152 and 864 respectively.
 > 
 > I have my screen resolution settings in /etc/X11/XF86Config reading:
 > 
 > 	Modes		"1152x864" "1024x768" "800x600"
 > 
 > I experimented with it by changing the line to :
 > 
 > 	Modes		"1024x768" "1152x864" "800x600"
 > 
 > so when I started X it would start out at 1024x768. But $[vp.width] and
 > $[vp.height]  still read as 1152 and 864.  The only way I could get them to read
 > the correct value was to change the "Modes" line to:
 > 
 > 	Modes		"1024x768"
 > 
 > When it only had one value, $[vp.width] and $[vp.height] read the current window
 > settings.  When I have multiple values in for it the largest settings are used,
 > regardless of what the actual values are.
 > 
 > The draw back to this is that I have to modify XF86Config every time I want to
 > change screen resolutions.  The good part is that I don't have to reset the
 > values in .fvwm2rc.
 > 
 > Is there another way to read current screen size settings through Piperead?  I'm
 > not a computer expert.  I don't know what system wide variables might hold the
 > current screen parameters.
 > 
 > Glen
 > 
 > 
 > Dan Espen writes:
 >  > Glen Lee Edwards <[email-masked]> writes:
 >  > > Is there a way to mathmatically modify these values from within .fvwm2rc?
 >  > > If I
 >  > > use $[vp.width], the bar extends app 12p beyond the viewing range of my
 >  > > screen. I tried 
 >  > > 
 >  > > *MyBar2Geometry $[vp.width]-12x115+0-0
 >  > > and
 >  > > *MyBar2Geometry $[vp.width-12]x115+0-0
 >  > > 
 >  > > but neither worked, instead moving the bar to the top of the screen (it's
 >  > > supposed to be on the bottom).
 >  > 
 >  > Use PipeRead to do arithmetic:
 >  > 
 >  > PipeRead 'echo "*MyBar2Geometry `expr $[vp.width] - 12`x115+0-0"'
 >  > 
 >  > (Warning, lightly tested.)
 >  > 
 >  > -- 
 >  > 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" in the body of a
 >  > message to [email-masked].
 >  > To report problems, send mail to [email-masked].
 >  > 
 > --
 > 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 [email-masked].
 > To report problems, send mail to [email-masked].
 > 
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Dan Espen <[email-masked]>
Date: Tue, 09 Oct 2001 08:39:31 -0400

> tty/dev/pts/5 glenlee@members [Tue Oct  9 01:02:49] 

I'm far from an expert on XFree but I don't believe it provides an API
to get  the  current visible  area   when you  use  KP_plus  to change
resolution.  As far as X and Fvwm are concerned, you still have a full
size screen.