Subject: FVWM: Mozilla & focus

From: Markku Tavasti <[email-masked]>
Date: 01 Sep 2004 09:17:29 +0300

How should I configure my fvwm to handle focus with mozilla some sane
way. I prefer sloppy focus.

I have tried several different styles for mozilla, but found
suitable. I want mozilla to get focus when mouse enters, but I also
want to chage focus with keyboard (alt-tab & other combinations). Now
I have this:

Style mozilla*   NeverFocus, NoLenience 
Style Mozilla*   NeverFocus, NoLenience 

So mozilla won't get focus with mouse, but with keyboard yes. Any
ideas how to improve situation?

(fvwm 2.4.18)

-- 
M. Tavasti /  [email-masked]  /   +358-40-5078254
--
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: Wed, 1 Sep 2004 14:43:17 +0200

> ideas how to improve situation?

I don't understand what the problem is.  What you wite suggests
that you want

  Style Mozilla* SloppyFocus

Why do you think this is no "sane way" of focus handling?

Ciao

Dominik ^_^  ^_^

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

---

From: Markku Tavasti <[email-masked]>
Date: 07 Sep 2004 08:49:30 +0300

> Why do you think this is no "sane way" of focus handling?

Problem was only with mozilla. Apparently mozilla is doing something
to focus based on mouse events. I had this function binded to alt-tab
and others:

AddToFunc   oma-focus-and-raise
+ "I" Focus
+ "I" WarpToWindow 50 50 
+ "I" Raise

With that function and sloppy focus mozilla was quite funky. I had
two mozilla windows side by side. Swithcing between them with keyboard
resulted situation where keyboard events went just to another window
where fvwm commanded it. Specially annoying it was with overlapping
windows. Window which was covered by other window was getting events!

But just changing this function a bit will make everything work as
wanted:

AddToFunc   oma-focus-and-raise
+ "I" WarpToWindow 50 50 
+ "I" Focus
+ "I" Raise

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 7 Sep 2004 11:13:40 +0200

On Tue, Sep 07, 2004 at 08:49:30AM +0300, Markku Tavasti wrote:
> where fvwm commanded it.

Aha!  It's the annoying keystrokes-in-mozilla-go-to-wrong-window
problem.  I've been chasing this problem for month but was never
able to reproduce it at will.  Maybe I can with the new
information.

Do you know of a way to make it happen all the time?

> Specially annoying it was with overlapping
 
> AddToFunc   oma-focus-and-raise
    ^^^

(Note that it's not necessary to put the I in double quotes.)

Ciao

Dominik ^_^  ^_^

---

From: Markku Tavasti <[email-masked]>
Date: 07 Sep 2004 18:41:46 +0300

> Do you know of a way to make it happen all the time?

At least for me it happens all the time. For me it is reproducible
every all the time. I have normally only mozilla windows accessible
with alt-tab, and when switching between them, after few changes
situation is there. Normally windows overlap something like 70% on
width, and are full height.

If this is not enough for you to reproduce the problem I can send you
my .fvwm2rc, screenshots, whatever.

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 7 Sep 2004 16:54:21 +0000

> my .fvwm2rc, screenshots, whatever.

To save the Dominik's work, send a minimal rc file ~/.fvwm/mozilla-bug
that contains several lines like Style mozilla-bin, Key, Exec mozilla.
This file would be called as "fvwm -f mozilla-bug" and should show the
problem after pressing certain keys.

Regards,
Mikhael.

---

From: Shao Zhang <[email-masked]>
Date: Wed, 8 Sep 2004 13:56:54 +1000

> problem after pressing certain keys.

The solution posted has effectively saved my life. I am using the
default focus style for firefox, and have the following key bindings:

Key Tab   A    M    Next (CurrentGlobbalPageAnyDesk, CurrentDesk, !iconic) SelectWindow
DestroyFunc SelectWindow
AddToFunc SelectWindow
+ "I" Focus
+ "I" Iconify false
+ "I" Raise
+ "I" WarpToWindow 50 50

I can reliably but only randomly reproduce this problem everyday. I have
two firefox windows open side by side. And it seems to happen more
often when I highlight in one window(text area or url bar), then use
Alt-Tab to switch focus. Hopefully this helps.

Regards,
Shao.