Subject: FVWM: Placement on whole desk, not on viewport only

From: Ruslan Kosolapov <[email-masked]>
Date: Mon, 28 Jun 2004 07:13:37 +0700

I have a desk with 3x3 pages.  I use MinOverlapPercentPlacement.

Fvwm place windows on viewport area only (i.e. only on visible screen
area).  But I want that fvwm placing windows on whole desk, like my 3x3
pages desk is a one big viewport.

How I can do that?  

PS: I can use FvwmEvent for handle new window and move it by bash script
and FvwmCommand.  But IMHO this solution is not a best way.

-- 
Ruslan Kosolapov
Plesk QA Department Second Manager
SWsoft, Inc.
E-mail: [email-masked]
Web Site: www.sw-soft.com
--
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: Mon, 28 Jun 2004 02:16:16 +0000

> pages desk is a one big viewport.

I am not sure you will like this. I would find this annoying personally.
It is possible that you will like StartsOnPage better (see also all these
Honors/IgnoresStartsOnPage and SkipMapping). At least you get consistent
results with different applications occupying different pages or desks.

> How I can do that?  

I don't think you can easily do this in fvwm. You may try to do this in X
instead; define your screen size 9 times larger than the physical size
using "Virtual" directive (or something like this). Then you should
probably define your desk 1x1, not 3x3, so it is just one large page.

> and FvwmCommand.  But IMHO this solution is not a best way.

If you choose this way (that is not good indeed), then better use
PipeRead, not FvwmCommand.

Another (half-automatical) solution is to have a window menu to move a
window to certain page or desk, this may involve MoveToPage, GotoPage and
PlaceAgain. Or just have a key binding for PlaceAgain. Or maybe you will
find ManualPlacement for some or all windows even better (doubtfully).

Regards,
Mikhael.

---

From: Ruslan Kosolapov <[email-masked]>
Date: Tue, 29 Jun 2004 00:50:11 +0700

>> How I can do that?  
 MG> I don't think you can easily do this in fvwm. You may try to do
 MG> this in X instead; define your screen size 9 times larger than the
 MG> physical size using "Virtual" directive (or something like
 MG> this). Then you should probably define your desk 1x1, not 3x3, so
 MG> it is just one large page.

  Hmm...  This behavior is exactly what I want.  But how I can scroll
  viewport by fvwm (or by command-line utility) in this case?  I failed
  to find solution in google.  Also about sticky windows - if I will use
  X features I can't use sticky window, isn't it?

  Now I use Scroll command, and all works nicely:
--8<-------------------------------------------------
DestroyFunc CenterViewPort
AddToFunc   CenterViewPort
+ I Current Piperead "echo Scroll \
      $(( $[w.x]-$[vp.width]/2+$[w.width]/2 ))p \
      $(( $[w.y]-$[vp.height]/2+$[w.height]/2 ))p "

DestroyFunc CenterPointer
AddToFunc CenterPointer
+ I Piperead "echo CursorMove \
      $(( -$[pointer.x]+$[vp.width]/2 ))p \
      $(( -$[pointer.y]+$[vp.height]/2 ))p"

DestroyFunc MyFocus
AddToFunc MyFocus
+ I Focus
+ I Raise
+ I Function CenterViewPort
+ I CenterPointer

Key p	 A 4 Direction North MyFocus
Key n	 A 4 Direction South MyFocus
Key f	 A 4 Direction East MyFocus
Key b	 A 4 Direction West MyFocus
Key l	 A 4 Function CenterViewPort
----------------------------------------------->8---

  I.e. viewport scrolls for placing focused window in center.

  BTW, why WarpToWindow is not moving mouse but moving viewport when
  viewport is not equal to page?  Because of such behaviour I need to
  use CenterPointer function instead WarpToWindow 50 50 or CursorMove 50
  50.