Re: FVWM: Focus when scrolling view

From: Adam Tla/lka <atlka_at_pg.gda.pl>
Date: Wed, 15 Mar 2000 07:20:17 +0100

OK, but there is a case when you try to scroll from upper left page to left
or up direction and nothing should change.

So you need a little correction to your function:

# I am using Sloppy focus so I want warp mouse pointer to window title
AddToFunc CurrentRaiseWarp I Current (!Visible) Raise
+ I WarpToWindow 50 16p

# going to previous active non iconic window
AddToFunc GoToLast I Prev (CurrentPage !Iconic) FlipFocus

# if page is the same do not change active window
AddToFunc WasActive I DestroyFunc GoToLast
+ I AddToFunc GoToLast I Nop

# choose last active window, activate and warp to it
AddToFunc LastActive I Current (CurrentPage !Iconic) Function WasActive
+ I Function GoToLast
+ I Current (CurrentPage !Iconic) Function CurrentRaiseWarp
+ I DestroyFunc GoToLast
+ I AddToFunc GoToLast I Prev (CurrentPage !Iconic) FlipFocus


AddToFunc ScrollPrev I Scroll $0 $1
+ I Function LastActive

# scroll one page
Key Left A C1 Function ScrollPrev -100 0
Key Left A C12 Function ScrollPrev -100 0
Key Right A C1 Function ScrollPrev 100 0
Key Right A C12 Function ScrollPrev 100 0
Key Up A C1 Function ScrollPrev 0 -100
Key Up A C12 Function ScrollPrev 0 -100
Key Down A C1 Function ScrollPrev 0 100
Key Down A C12 Function ScrollPrev 0 100

# change page and go to the lastactive window on that page
AddToFunc GoPagePrev I GoToPage $0 $1
+ I Function LastActive

Key 1 A C1 Function GoPagePrev 0 0
Key 1 A C12 Function GoPagePrev 0 0

Key 2 A C1 Function GoPagePrev 1 0
Key 2 A C12 Function GoPagePrev 1 0

# after window closing go to last active one
*FvwmEvent destroy_window LastActive

If you have many desks you should add CurrentDesk to the conditions list.
Regards

-- 
 . .  Adam Tla/lka      mailto:atlka_at_pg.gda.pl    ^v^ ^v^ ^v^
  )   System  & Network Administration Group           ~~~~~~
  -  Computer Center,  Technical University of Gdansk, Poland
     PGP public key:   finger atlka_at_sunrise.pg.gda.pl
--
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 Mar 15 2000 - 00:20:19 GMT

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