Subject: FVWM: Focus and GoToPage

From: Ruslan Kosolapov <[email-masked]>
Date: Sat, 03 Jul 2004 09:56:48 +0700

Sorry for bad english, I will try to explain my problems as I can.

  As I sayd some time ago, now I try to use a one large desktop with lot
  of nonoverlapped windows.  I use "Scroll" command for positioning
  viewport (i.e. I not use "Pages" or "Deskstops" metaphor, my desktop
  looks like battlefield in strategy games).

  I use fvwm about two years, and in standart metaphor it is a best wm.

  I choose fvwm for my task because it is a most flexible wm (sawfish is
  flexible too, but sawfish is not developed now).  My metaphor looks
  interesting, and during last week I more and more like it :)

  A most important thing in this metaphor is "focused window should be
  in attention locus, i.e. as far as possible in center of a viewport"  

  I asked here about placement windows on whole multipaged desk, not on
  current page only.  OK, now I can't do it by fvwm.

  So, question number one: anybody needs such feature, or not?  Maybe
  this is not to hard to implement?  I have no time for try to fix it by
  myself - I'm not a C programmer and can't fix it in short time :(

  Question number two: I report a bug (in my opinion it is a bug) about
  wrong behavior of WarpToWindow function.  Shortly: this function
  resets a viewport like GoToPage do it.  Can I to do something with it?
  Is there a workaround?  I can't find a simple solution (I plan to use
  CursorMove or something like it, but it is not a good solution).

  I need WarpToWindow because I use SloppyFocus and I like to change
  active window by keyboard.  In my case fvwm should move mouse pointer
  to focused window.  Can I use something different than WarpToWindow?

  Are there anybody with the same problems or with the same desktop idea?

PS: I can't use XFree86 for my task because of weak flexible of it.

-- 
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: Tavis Ormandy <[email-masked]>
Date: Mon, 5 Jul 2004 11:15:20 +0100

>   in attention locus, i.e. as far as possible in center of a viewport"  

I'm not sure what you mean by "attention locus", but if you mean you
want to centre the viewport on a window how about this:

DestroyFunc CenterViewportOnWindow
AddToFunc CenterViewportOnWindow
+ I FlipFocus
+ I WarpToWindow 50 50
+ I PipeRead "echo Scroll $$((((-$[vp.width]/2)+$[pointer.x])))p $$(((-($[vp.height]/2)+$[pointer.y])))p

Then, for example, bind something to Next CenterViewportOnWindow

>   current page only.  OK, now I can't do it by fvwm.

Well you can, the StartsOnPage/SkipMapping solution sounded okay to me?

>   CursorMove or something like it, but it is not a good solution).

I Think using CursorMove is a good solution, you could add some
CursorMove to the function above to get pretty close to this behaviour!

-- 
-------------------------------------
[email-masked] | finger me for my gpg key.
-------------------------------------------------------
--
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: Dominik Vogt <[email-masked]>
Date: Mon, 5 Jul 2004 14:12:29 +0200

> CursorMove to the function above to get pretty close to this behaviour!

To warp to the top left corner of a window without switching pages
you can use

  AddToFunc my_warptowindow
  + I WindowId root 0 WarpToWindow $[w.x]p $[w.y]p

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]

---

From: Ruslan Kosolapov <[email-masked]>
Date: Mon, 05 Jul 2004 23:47:46 +0700

>> in attention locus, i.e. as far as possible in center of a viewport"
 TO> I'm not sure what you mean by "attention locus", but if you mean
 TO> you want to centre the viewport on a window how about this:

 TO> DestroyFunc CenterViewportOnWindow
 TO> AddToFunc CenterViewportOnWindow
 TO> + I FlipFocus
 TO> + I WarpToWindow 50 50
 TO> + I PipeRead "echo Scroll $$((((-$[vp.width]/2)+$[pointer.x])))p $$(((-($[vp.height]/2)+$[pointer.y])))p

 TO> Then, for example, bind something to Next CenterViewportOnWindow

  :)  Thanks.   I use FvwmTcl module by Victor Wagner for it:

DestroyFunc CenterViewPortAndFocus
AddToFunc   CenterViewPortAndFocus
+ I Module $[bindir]/CenterViewPort.tcl $[w.x] $[w.y] $[w.width] $[w.height] $[vp.width] $[vp.height]

#!/bin/sh
# for sh this is a two lines. for wish - whis is one line \
exec tclsh "$0" "$@"

#parameter's assigns skipped

set command "Scroll [expr $winX - $scrWidth / 2 + $winWidth / 2]p [expr $winY - $scrHeight / 2  + $winHeight / 2]p"

::fvwm::send "WindowID $winID Raise"
::fvwm::send "WindowID $winID Iconify Off"

::fvwm::send $command
#::fvwm::send "WindowID $winID WarpToWindow 1p 1p"

exit 0

 >> I asked here about placement windows on whole multipaged desk, not
 >> on current page only.  OK, now I can't do it by fvwm.
 TO> Well you can, the StartsOnPage/SkipMapping solution sounded okay to
 TO> me?

  No, StartsOnPage is not enough.  But it is not a problem - I will use
  FvwmEvent for moving window to need place.

 >> Question number two: I report a bug (in my opinion it is a bug)
 >> about wrong behavior of WarpToWindow function.  Shortly: this
 >> function resets a viewport like GoToPage do it.  Can I to do
 >> something with it?  Is there a workaround?  I can't find a simple
 >> solution (I plan to use CursorMove or something like it, but it is
 >> not a good solution).
 TO> I Think using CursorMove is a good solution, you could add some
 TO> CursorMove to the function above to get pretty close to this
 TO> behaviour!

  Move viewport for centering window is not a good usability really.
  More comfortable behavior is move viewport by next rules:
   - focused window should be fully visible
   - other windows should be maximally visible
   - viewport moving should be not chaotic (i.e. window shouldn't moving
  accross a whole screen and so on).

  Use CursorMove in such circumstances could be not simple, so, it is a
  not a good solution.  But seems like it is a single way.

---

From: Ruslan Kosolapov <[email-masked]>
Date: Tue, 06 Jul 2004 02:01:03 +0700

>> >   something with it?  Is there a workaround?  I can't find a
 >> >   simple solution (I plan to use CursorMove or something like it,
 >> >   but it is not a good solution).
 DV> To warp to the top left corner of a window without switching pages
 DV> you can use

 DV>   AddToFunc my_warptowindow
 DV>   + I WindowId root 0 WarpToWindow $[w.x]p $[w.y]p

  Wow!  Thank you very much for idea.