Subject: FVWM: Move window across pages without going there?

From: Gert Brinkmann <[email-masked]>
Date: Thu, 27 Feb 2003 21:54:53 +0100

Hello,

while experimenting with virtual desktop commands I have configured the 
usual CTRL-ALT-CursorKey to move the screen to another page (GotoPage) 
and also CTRL-RighWin-ALT-CursorKey to move the currently focused window 
to a page and also go there. Therefore I use this function:

AddToFunc MoveAndGotoPage
+ I Raise
+ I MoveToPage $0 $1
+ I GotoPage $0 $1

Key Right W CM4 MoveAndGotoPage +1p +0p
...

Is this the correct way to handle this or is there a smarter way to go?

My main question is now: How to configure fvwm so that 
RightWin-CursorKey moves the focused window around without moving the 
screen?

I tried

   Key Right W 4 MoveToPage +1p +0p

but there are 2 problems:

First: After moving the window, the focus should not change to another 
window that might have been behind the recently moved window until the 
RightWin key is released. Otherwise you could not move the initially 
focused window across 2 pages.

Second: The arguments "+1p +0p" of MoveToPage are taken relative to the 
page where the screen currently is at. It has to be relative to the page 
where the currently moved window is at in this case.

Is there a solution for this?

Gert

--
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: Mikhael Goikhman <[email-masked]>
Date: Fri, 28 Feb 2003 00:32:39 +0000

> Is this the correct way to handle this or is there a smarter way to go?

There is no a "smarter" way than this.

> focused window across 2 pages.

Unfortunately I don't see a good solution for this unless ClickToFocus is
used.

> where the currently moved window is at in this case.

You may use Move w+$[vp.width] w+$[vp.height], but unlike MoveToPage it
does not check for desktop page boundaries...

> Is there a solution for this?

Well, after some more thinking I see some solution:

  Key F5 A CS  SetEnv CURRENT_WID $$w
  Key Right A 4  WindowId $$[CURRENT_WID] Move w+$[vp.width] keep
  Key Left  A 4  WindowId $$[CURRENT_WID] Move w-$[vp.width] keep

You need first to mark a window, then move it to any direction.

Regards,
Mikhael.

---

From: parv <[email-masked]>
Date: Thu, 27 Feb 2003 20:24:20 -0500

in message <[email-masked]>, wrote Mikhael
Goikhman thusly...
> > First: After moving the window, the focus should not change to
> > another window that might have been behind the recently moved
> > window until the RightWin key is released. Otherwise you could
> > not move the initially focused window across 2 pages.
> 
> Unfortunately I don't see a good solution for this unless
> ClickToFocus is used.

Another workaround/solution (assuming window being moved has
MouseFocus style & FvwmPager SloppyFocus)...

  Rest the mouse on window representation in -Pager in order to keep
  focus on the window being moved.  Then just issue the command
  sequence to move window any which way.

  - Parv

--