Re: FVWM: constraining "maximized" window to some portion of the screen

From: Dominik Vogt <dominik.vogt_at_gmx.de>
Date: Sat, 10 Nov 2001 20:12:05 +0100

On Thu, Oct 18, 2001 at 08:51:55PM -0700, Denis Perelyubskiy wrote:
> * Dominik Vogt <fvwm_at_fvwm.org> [15-Oct-01 03:20 -0700]:
> >
> >On Sun, Oct 14, 2001 at 06:20:32PM -0700, Denis Perelyubskiy wrote:
> >> hello,
> >>
> >> is it possible to maximize a window, but so that it only
> >> goes up to something like 150 pixels from the top of the
> >> page, but takes up the whole width?
> >
> >I don't exactly understand if you want. Try one of these:
> [...]
> > # (screen height - 150 pixels) at bottom of screen
> > AddToFunc MaximizeAtBottom
> > + I Maximize $0 $1
> > + Move -0 -0
> > MaximizeAtBottom 0 -150p
> [...]
>
> i wanted almost this, thanks! (i should've looked in the
> manual pages more, but Move -0 -0 is a nice trick which i
> did not know about)
>
> # (screen height - 150 pixels) at bottom of screen
> AddToFunc MaximizeAtBottom
> + "I" Maximize $0 $1
> + "I" Move -0 -0
>
> MaximizeAtBottom 100 -90p
>
> the problem now, however, is that once i maximize the
> window, it is fine, but once i click my button to
> de-maximize it, it stays with its lower-right corner in the
> lower-right portion of the screen. this makes sense, since
> that's exactly what Move -0 -0 did.
>
> the question, is whether i can somehow figure out where the
> window was positions before executing my MaximizeAtBottom,
> and moving the window back?

Hm, this works exactly as expected for me - the window is restored
to the correct position when unmaximized.

Ah, I see. If you bind that function to the window buttons, the
"Move" part is also executed when you unmaximize the window. Try
this one instead:

  # (screen height - 150 pixels) at bottom of screen
  AddToFunc MaximizeAtBottom
  + "I" Maximize $0 $1
  + "I" WindowId $w (maximized) Move -0 -0

  MaximizeAtBottom 100 -90p

Bye

Dominik ^_^ ^_^

 --
Dominik Vogt, dominik.vogt_at_gmx.de
Reply-To: dominik.vogt_at_gmx.de
--
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 Sat Nov 10 2001 - 15:25:14 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:52 BST