Subject: Re: FVWM: Fvwm on a laptop: setting my physical screen resolution?

From: Dominik Vogt <[email-masked]>
Date: Fri, 1 Nov 2002 15:06:22 +0100

On Thu, Oct 31, 2002 at 09:21:16AM -0500, Tessa Lau wrote:
> I use fvwm on a laptop.  When it's docked, it's connected to a monitor
> with 1600x1200 resolution; when I undock it, I have a virtual screen
> of 1600x12000 and physical screen of 1024x768.
> 
> One of the problems that crops up is that an application will pop up
> modal dialog boxes (e.g., a browser's "save file" dialog) that are
> mapped off the edge of the physical display.  Unless I think to pan to
> the right and check for modal dialogs, it looks like my browser has
> wedged.
> 
> I'd like to make it such that when I'm undocked, no windows are mapped
> beyond the edge of the physical screen, so that I can use my laptop as
> if it had an effective virtual resolution of 1024x768.  AFAIK, X is
> incapable of dynamically changing virtual screen resolutions, so I'm
> trying to find a workaround using the window manager.  I need to do
> this without restarting my X server or killing running applications.
> Restarting the window manager is okay, though I'd prefer a method that
> communicates with a running fvwm.
> 
> Is this possible?  It seems like what I want is the ability to set the
> $[vp.width] and $[vp.height] variables to different values rather than
> having them be autodetected by querying the X server.

I think you can do some magic with the EwmhBaseStrut command and
the EWMHUseStrutHints, PlacementOverlapPenalties and
PlacementOverlapPercentPenalties Styles.  This is all new in
2.5.x.  Try this:

  EwmhBaseStrut 0 576 0 432
  style * EWMHPlacementUseWorkingArea
  style * placementoverlappenalties 1 5 10 1 0.05 1000, minoverlapplacement

By the way, I think all the

  ...Strut

stuff is misnamed.  It should all be named

  ...Struts
         ^^^

And I think

  PlacementOverlap(Percent)Penalties

should be renamed to

  MinOverlap(Percent)PlacementPenalties

So, don't be surprised when the old names stop working in future
2.5.x releases.

Also, I think the arguments of the EwmhBaseStrut command should
use "percent of screen size" as the default unit, not "pixels",
since virtually all other commands work like this.  The new
syntax would the be

  EwmhBaseStrut 0p 576p 0p 432p

Olivier:  I can't find anything about the EWMH related code in
the NEWS file.

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" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Olivier Chapuis <[email-masked]>
Date: Fri, 1 Nov 2002 22:18:27 +0100

On Thu, Oct 31, 2002 at 09:21:16AM -0500, Tessa Lau wrote:
> Hi all,

Maybe you will be interested that XFree current cvs can change the
screen resolution dynamically (so XFree-4.3 will be able to do this).
This is done using the xrandr utilities. However, fvwm does not
support Randr yet.

Olivier

---

From: Olivier Chapuis <[email-masked]>
Date: Fri, 1 Nov 2002 22:13:59 +0100

> Olivier:  I can't find anything about the EWMH related code in

There is this in tne NEWS file:

Changes in alpha release 2.5.0 (27-Jan-2002)

[snip]

* Fvwm respect the extended window manager hints
  specification. This allows fvwm to work with KDE version >= 2
  and GNOME version 2. This support is configurable using a bunch
  of new commands and style options, search for "EWMH" in the man
  page.

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 2 Nov 2002 09:46:57 +0100

>   of new commands and style options, search for "EWMH" in the man

I see.  For searching purposes, every new command and style should
be listed in the NEWS and the ChangeLog.

Bye

Dominik ^_^  ^_^