Subject: FVWM: Switching on page/desk with keyboard and focussing window

From: Jason Friedrich <[email-masked]>
Date: Wed, 20 Nov 2002 15:24:04 +0100

Hello everybody, 

I use Fvwm2 for a few days now. Im quite impressed nad love the pager
and the taskbar :). Only the configuration held me back from using it.

I have configured the styles, colors, key- and mousebindings etc. but
there is still one thing disturbing me. Everytime i change a 
desktop/page with my keyboard (or mouse but prefer to use the 
keyboard), the window(s) there dont get the focus.

Is it possible (perhaps with AddFunc) that Fvwm2 changes to a
desktop/page, remembers the last focused window and focus and raise it?
That would be great because i have the problem that i switch to a
desktop, type with my keyboard and recognize then that the window i want
to type in, is not focused :)=)

Any help would be great.

Thanks in advance, 

-JASON

P.S. I tried a little bit with focus-and-raise after switching but it
does not worl like i imagined.
--
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: Thu, 21 Nov 2002 03:12:58 +0000

> does not worl like i imagined.

Search the mail archives at http://www.mail-archive.com/[email-masked]/
There were several discussions about this, but it may take some time to
find them.

Regards,
Mikhael.

---

From: Peter McAlpine <[email-masked]>
Date: Thu, 21 Nov 2002 09:06:59 -0500

> Hello everybody, 

hi

> to type in, is not focused :)=)

here's a little hack^H^H^H^Hscript I wrote to do just what you are looking
for. You'll need fvwm version 2.5.x I think (for the perl libs), I use
cvs 2.5.5. I just added desk switching support.

NOTE:: Mikhael may be referring to a different solution, to which I am not
aware of...

anyway...

Copy FvwmTrackFocus.pl to your $FVWM_MODULEDIR and then add:

AddToFunc StartFunction
        + I Module FvwmTrackFocus.pl

to your .fvwm2rc

Restart and you're good to go.

-pete
-- 
Peter McAlpine
[email-masked]

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 21 Nov 2002 23:31:10 +0000

> NOTE:: Mikhael may be referring to a different solution, to which I am not

No, your script^H^H^H^H^H^Hmodule seems to best answer the request, it
just does not autoraises. Probably Jason will find autoraising bad or
will be able to replace Focus with any other function.

Regards,
Mikhael.

---

From: Jason Friedrich <[email-masked]>
Date: Fri, 22 Nov 2002 10:38:58 +0100

> cvs 2.5.5. I just added desk switching support.

Thanks Peter, just a few minutes before i read your mail, i found an
entry in the mailing list archive (i think it was from you) just about
this problem and the solving script. :)

The problem for me is that i dont use the "unstable version". Is it
stable enough for the daily work? Easy to compile or any problems?

For 2.4.x i solved the problem by configuring Fvwm like this:

Key 1	  A    M    GoToPage1

AddToFunc   flipfocus-and-raise
+ "I" FlipFocus
+ "I" Raise

AddToFunc GoToDesk1
+ "I" GoToPage 0 0
+ "I" Next [CurrentPage] flipfocus-and-raise
+ "I" Prev [CurrentPage] flipfocus-and-raise

It works for a ClickToFocus-Environment but i will try the 2.5.x version
on the weekend and your script. 

Thanks a lot. 

-Jason