RE: FVWM: Windows opening partially off screen

From: Moore, Garron <Garron.Moore_at_boeing.com>
Date: Wed, 18 Aug 2004 09:26:17 -0700

For anyone who is interested, I found something that works and have
included it below.

Garron


Module FvwmEvent
*FVWMEvent: PassID
*FVWMEvent: add_window MoveWindowOnScreen

AddToFunc MoveWindowOnScreen
+ I PipeRead "if [ `expr $[w.x] + $[w.width] - $[vp.width]` -gt 0 ]; then echo MoveToRight; fi"
+ I PipeRead "if [ $[w.y] -lt 0 ]; then echo MoveToLeft; fi"
+ I PipeRead "if [ `expr $[w.y] + $[w.height] - $[vp.height]` -gt 0 ]; then echo MoveToBottom; fi"
+ I PipeRead "if [ $[w.x] -lt 0 ]; then echo MoveToTop; fi"

AddToFunc MoveToTop
+ I Move keep 0
AddToFunc MoveToBottom
+ I Move keep -0
AddToFunc MoveToLeft
+ I Move 0 keep
AddToFunc MoveToRight
+ I Move -0 keep


-----Original Message-----
From: Moore, Garron
Sent: Thursday, August 12, 2004 12:43 PM
To: Moore, Garron; dominik.vogt_at_gmx.de; fvwm
Subject: RE: FVWM: Windows opening partially off screen


I think that it would be something like this, but the expressions don't
evaluate and I'm not sure that this is proper syntax.

AddToFunc MoveWindowOnScreen
+ I WindowId $0 ($[w.x] < 0) MoveToLeft
+ I WindowId $0 (($[w.x] + $[w.width]) > $[vp.width]) MoveToRight
+ I WindowId $0 ($[w.y] < 0) MoveToTop
+ I WindowId $0 (($[w.y] + $[w.height]) > $[vp.height]) MoveToBottom

--------------------------------------------------------------------------


FvwmEvent is a good suggestion. I have figured out how to create functions
to move a window to the screen edge, but is there a way to check where the
window is and run the appropriate command based on its location?

I have figured out some functions, but I don't know how to implement
MoveWindowOnScreen. Can someone give me advice?


Module FvwmEvent

*FVWMEvent: PassID
*FVWMEvent: add_window MoveWindowOnScreen

AddToFunc MoveToTop
+ I Move keep 0

AddToFunc MoveToBottom
+ I Move keep -0

AddToFunc MoveToLeft
+ I Move 0 keep

AddToFunc MoveToRight
+ I Move -0 keep

AddToFunc MoveWindowOnScreen
# if window is off to left
# MoveToLeft
# if window is off to right
# MoveToRight
# if window is off to top
# MoveToTop
# if window is off to bottom
# MoveToBottom



Thanks,
Garron Moore


On Wed, Aug 11, 2004 at 04:12:08PM -0700, Moore, Garron wrote:

(Please type replies below the quoted sections of the precvious mail on this list).

> Does anyone have any ideas? I feel like I have tried everything.

I can't think of anything short of using FvwmEvent to execute a script that corrects
the window position if it's off screen.

> Also, moving windows works just fine. They won't move off of the
> Screen. If I move a window that is partially off the screen, it will
> jump to be completely on the screen.

[snip]

> > Some of the windows in our app are set up to open with their top
> > left corner where the mouse pointer is. If the mouse pointer is next
> > to the right or bottom of the screen, the windows are opening up
> > partially off the screen. Is there a Style that can be set to ensure
> > the windows will be placed completely on the screen?

If you have control over what the application does, why don't you modify the
application code. Okay, it does not know the size of the decorations beforehand,
but it could at least make sure that the window stays almost on screen.

Ciao

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.
--
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.
--
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 Wed Aug 18 2004 - 11:27:50 BST

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