Re: Hamm fvwm2 -- new Focus behavior

1998-01-28 Thread Kirk Hilliard
I am still confused about how some functions that I define to emulate
the old Focus function (which also Raised) cause focus to
automatically shift back to under the mouse, but others don't.

Anyhow, here is an improvement on what I last posted, and it still
behaves the way the old Focus did.

From the tail of my ~/.fvwm2/post.hook:

  # The Focus command no longer raises the window automatically.
  # Here is a function that emulates the old Focus behavior.
  DestroyFunc focus-and-raise
  AddToFunc   focus-and-raise I Focus
  +   I Raise

  # And here are the new bindings.
  Key Tab A   M   Next [CurrentDesk !iconic] focus-and-raise
  Key Tab A   MS  Prev [CurrentDesk !iconic] focus-and-raise

Kirk Hilliard


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: Hamm fvwm2 -- new Focus behavior

1998-01-26 Thread Kirk Hilliard
Hi Jameson!

 I also found the fvwm changes troublesome since I had to spend a
 few hours (or was that days) redoing post.hook.  I also feel
 something like ctrltab should raise and focus on successive
 windows.  I found the default fvwm configuration anemic.
[snip]
 HERE IS SOME OF MY CODE FROM post.hook:
[snip]
 # I make controltab cycle and popup windows.
 # I believe this was the default before, but something has changed in fvwm2.
 # CirculateUp is obsolete.
 Key Tab A C Function next-and-raise
 AddToFunc  next-and-raise I Next [CurrentPage !iconic] Focus
 + I Current Raise
 + I Current WarpToWindow 5p 5p
 
 Key Tab A SCFunction previous-and-raise
 AddToFunc  previous-and-raise I Prev [CurrentPage !iconic] Focus
 + I Current Raise
 + I Current WarpToWindow 5p 5p
[snip]

That mostly does it, but I would rather not WarpToWindow -- I want the
cursor to stay put.  But if I leave WarpToWindow out, then focus
returns to the window under the cursor.

This is not the case with when just Focus is bound to the key (such as
in /etc/X11/fvwm2/system.fvwm2rc) -- either with the good old behavior
where Focus also raised and with the new behavior where it doesn't.
It appears that this refocus under mouse behavior is brought on by
multi-line function definitions using +.

Aha!  I just discovered that if I add the Focus and Raise commands on
separate AddToFunc lines without the +, it works as I wanted.  Also,
it seems that when the + is used, then the function takes longer to
execute.  I don't understand why this is, do you?

I am now happy with this tail of my ~/.fvwm2/post.hook:

  # FVWM2 Focus command no longer raises the window automatically.
  # Here are some functions to compensate for that.
  
  DestroyFunc next-and-raise
  AddToFunc   next-and-raise I Next [CurrentDesk !iconic] Focus
  AddToFunc   next-and-raise I Current Raise
  
  DestroyFunc previous-and-raise
  AddToFunc   previous-and-raise I Prev [CurrentDesk !iconic] Focus
  AddToFunc   previous-and-raise I Current Raise
  
  Key Tab A   M   Function next-and-raise
  Key Tab A   MS  Function previous-and-raise

Thanks Jameson,

Kirk Hilliard


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: Hamm fvwm2 -- new Focus behavior

1998-01-25 Thread Jameson Burt
I also  found the fvwm changes troublesome since I had to spend a few hours 
(or was that days) redoing post.hook.  I also feel something like ctrltab 
should raise and focus on successive windows.  I found the default fvwm 
configuration anemic.

I solved this focus and raise problem, but I use ctrl rather than alt with 
tab.  I sought to minimally change the default setup for fvwm in 
/etc/X11/fvwm2.  I found that I do not need my own .fvwm2rc.  All I need are 
~/.fvwm2/init-restart.hook and ~/.fvwm2/post.hook.  Below I include a portion 
of post.hook that solves your raise and focus problem.  Below that, I enclose 
all of my init-restart.hook file.   Being forced to redo fvwm congigurations, 
I saw and now use some wonderful tools that those wonderful fvwm guys put 
together.  For example, like the common desk top environment, I have each 
page display a different background picture, one the earth with its cities, 
one black-and-white 0-1s, one fallen leaves, and one clouds.  Also, whenever I 
interact with the X-window system, different sounds come through my speaker.  
I really like a Star Trek like soft-voiced The system is coming up.  Liking 
Unix, I consider these backgrounds and sounds glitz, largely not worthy of our 
time.  I put them in because non-unix people only notice glitz, having no idea 
what a shell is.  Indeed, non-unix people have largely entered the 
pre-historic era with the mouse carving out hieroglyphics.  Unix is for the 
language literate and the computer literate.


HERE IS SOME OF MY CODE FROM post.hook:

#
# Fvwm, mostly through defaults as sent, has the following possibilities:
# Circulate windows: #
# 1. alttab next window on current page
# 2. altshifttab  previous window on current page
# 3. ctrlalttab   next window (will de-iconify) on current page
# 4. ctrlaltshifttabprevious window (will de-iconify) on current 
page
# 9. altclick-3 or F12Raise-lower the window at current 
cursor-position, like Sun's Front key.

# I make controltab cycle and popup windows.
# I believe this was the default before, but something has changed in fvwm2.
# CirculateUp is obsolete.
Key Tab A C Function next-and-raise
AddToFunc  next-and-raise I Next [CurrentPage !iconic] Focus
+ I Current Raise
+ I Current WarpToWindow 5p 5p

Key Tab A SCFunction previous-and-raise
AddToFunc  previous-and-raise I Prev [CurrentPage !iconic] Focus
+ I Current Raise
+ I Current WarpToWindow 5p 5p


Key Tab A MCFunction next-and-raise-icon
AddToFunc  next-and-raise-icon
+   I Next [CurrentPage] Focus
+   I Current Iconify -1
+   I Current Raise
+   I Current WarpToWindow 5p 5p

Key Tab A SMC   Function previous-and-raise-icon
AddToFunc  previous-and-raise-icon
+   I Prev [CurrentPage] Focus
+   I Current Iconify -1
+   I Current Raise
+   I Current WarpToWindow 5p 5p



HERE ARE ALL MY LINES FROM init-restart.hook:

+ I Module FvwmIconMan
#+ I Module FvwmWinList #I prefer FvwmIconMan
+ I Module FvwmBacker
+ I Module FvwmAudio
#
#I TRY THE FOLLOWNG for FvwmAuto 2000, 2 seconds --if window has focus, it
# actually raises in 2 seconds.
#Still, everybody dislikes any auto-raising.
#+ I Module FvwmAuto 2000

# Because the last line of .fvwm2rc starts FvwmPager 0 0,
# here I kill FvwmPager and restart it, following the last paragraph of 
# README.sysrc.gz.
# However, since FvwmButtons usually didn't swallow FvwmPager when I started 
# FvwmPager here,
# I start the FvwmPager I want in post.hook.
+ I Wait FvwmPager
+ I KillModule FvwmPager
+ I Module FvwmPager 0 3

# In post.hook, I swallow FvwmPager, so the above KillModule FvwmPager
# interrupts and eliminates FvwmButtons also.
# As a solution, I start FvwmButtons below.
+ I Module FvwmButtons



 The behavior of the Focus command has changed in the version of fvwm2
 provided in hamm.
 
 /usr/doc/fvwm2/ChangeLog.gz says:
   2.0.46
   [snip]
 37. Focus command no longer raises - use an interpreted
 focus-and-raise function if that's desired
 
 /etc/X11/fvwm2/system.fvwm2rc (in both bo and hamm) contains the lines:
   Key Tab A   M   Next [CurrentDesk !iconic] Focus
   Key Tab A   MS  Prev [CurrentDesk !iconic] Focus
 
 I prefer the old behavior where Alt-Tab raised the window that it
 shifted focus to, so I added the following lines to my
 ~/.fvwm2/post.hook:
 
   DestroyFunc focus-and-raise
   AddToFunc   focus-and-raise
   + I Raise
   + I Focus
   
   Key Tab A   M   Next [CurrentDesk !iconic] focus-and-raise
   Key Tab A   MS  Prev [CurrentDesk !iconic] focus-and-raise
 
 This works as long as my mouse is 

Hamm fvwm2 -- new Focus behavior

1998-01-24 Thread Kirk Hilliard
The behavior of the Focus command has changed in the version of fvwm2
provided in hamm.

/usr/doc/fvwm2/ChangeLog.gz says:
  2.0.46
  [snip]
37. Focus command no longer raises - use an interpreted
focus-and-raise function if that's desired

/etc/X11/fvwm2/system.fvwm2rc (in both bo and hamm) contains the lines:
  Key Tab A   M   Next [CurrentDesk !iconic] Focus
  Key Tab A   MS  Prev [CurrentDesk !iconic] Focus

I prefer the old behavior where Alt-Tab raised the window that it
shifted focus to, so I added the following lines to my
~/.fvwm2/post.hook:

  DestroyFunc focus-and-raise
  AddToFunc   focus-and-raise
  + I Raise
  + I Focus
  
  Key Tab A   M   Next [CurrentDesk !iconic] focus-and-raise
  Key Tab A   MS  Prev [CurrentDesk !iconic] focus-and-raise

This works as long as my mouse is not in a window, but if it is, then
focus shifts back to the window that the mouse is in after it finishes
raising the next one.  How can I duplicate the behavior of Focus in bo
where the focus stays with the newly raised window regardless of mouse
position?

(This behavior is independent of SloppyFocus, which I normally use.)

Kirk Hilliard


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .