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

From: Dominik Vogt <[email-masked]>
Date: Sat, 10 Nov 2001 20:12:05 +0100

On Thu, Oct 18, 2001 at 08:51:55PM -0700, Denis Perelyubskiy wrote:
>   * Dominik Vogt <[email-masked]> [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, [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: Denis Perelyubskiy <[email-masked]>
Date: Thu, 15 Nov 2001 09:39:06 -0800

[...]
  [...]
  >  MaximizeAtBottom 100 -90p

ah, thanks. that works just like i would like it to :)

denis

-- 
// mailto: Denis Perelyubskiy <[email-masked]>
// icq   : 12359698
// PGP   : http://www.cs.ucla.edu/~denisp/files/pgp.asc
--
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].