Subject: FVWM: Auto Focus on NewWindow (FvwmEvent busted?)

From: "Christopher Petersen" <[email-masked]>
Date: Thu, 19 Apr 2001 20:41:30 -0400

OK.  I've been through the FAQ...forward, backward, and sideways
in an attempt to spare the list.  And what I found in the FAQ will
not work for me.

Specifically, I cannot get answer 3.18 to do what I want.  Here's
the example given in 3.18:

     DestroyModuleConfig FvwmEvent*
     *FvwmEvent add_window SetGeometryForMyWindow

     DestroyFunc SetGeometryForMyWindow
     AddToFunc   SetGeometryForMyWindow
     + I Next ("My Window") Move +10p +10p
     + I Next ("My Window") Resize 100p 200p

     AddToFunc StartFunction I Module FvwmEvent

What I want is to warp the focus to a specific new window when it
pops up (say, the "Netscape: Find" window).  I attempt to do this
(in version 2.2.5) by:

     DestroyModuleConfig FvwmEvent*
     *FvwmEvent add_window WarpToFind

     DestroyFunc WarpToFind
     AddToFunc   WarpToFind
     + I Next ("My Window") Focus
     + I Next ("My Window") WarpToWindow 50 33

     AddToFunc StartFunction I Module FvwmEvent

This doesn't work.  WHY?

BTW, I've also tried replacing "add_window" with other events
such as "raise_window" and "deiconify".  No luck.  I've also
tried replacing "Next" with "WindowId $0".  No luck.

If you can, please help.
-chris
--
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: Ulrich Fahrenberg <[email-masked]>
Date: Fri, 20 Apr 2001 09:54:55 +0200 (MET DST)

>      AddToFunc StartFunction I Module FvwmEvent

Did you replace "My Window" with "Netscape: Find"? If I do this, it
works for me.

-- 
Ulrich Fahrenberg -- http://www.math.auc.dk/~uli

...denn nicht sein kann, was nicht sein darf.
                         C. Morgenstern

---

From: "Christopher Petersen" <[email-masked]>
Date: Fri, 20 Apr 2001 10:05:45 -0400

> Did you replace "My Window" with "Netscape: Find"? If I do this, it

Sorry.  Yes.  I did that.  (In my copy paste haste [from the example
into the email], I hand-editted it to match my .fvwm2rc...and missed
changing "My Window".)

The following does NOT work for me:

   DestroyFunc WarpToFind
   AddToFunc   WarpToFind
   + I Next ("Netscape: Find") Focus
   + I Next ("Netscape: Find") WarpToWindow 50 33

NOTHING happens.  When "Netscape: Find" appears, it simply pops
up wherever it was last located, but the cursor doesn't move,
and focus does not change.  (I'm using FocusFollowsMouse.)

What version of fvwm are you using?  (Again, I'm using 2.2.5.)

-chris

---

From: Ulrich Fahrenberg <[email-masked]>
Date: Fri, 20 Apr 2001 16:51:51 +0200 (MET DST)

>    AddToFunc StartFunction I Module FvwmEvent

I'm using 2.2.4, what you write works for me, both with SloppyFocus
and with FocusFollowsMouse. I find this strange...

uli

---

From: "Christopher Petersen" <[email-masked]>
Date: Fri, 20 Apr 2001 12:28:54 -0400

> and with FocusFollowsMouse. I find this strange...

Very!  :^)

Perhaps it's netscape.  I'm using 4.77.  And you?  (Let's see
how far we can take this...  :^)

-chris

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 21 Apr 2001 11:23:39 +0200

> how far we can take this...  :^)

Most likely the window title does not match.  There may be
invisible spaces.  Use FvwmIdent to find to get the window's
resource and use that instead.  If this still does not help,
verify that the function is called at all by adding

  AddToFunc WarpToFind I Beep

FvwmEvent may not be running.  Are there any error messages on the
sonsole?

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
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].