Subject: FVWM: VMWare and focus following mouse

From: [email-masked]
Date: Tue, 6 May 2003 19:12:01 -0400

Hi,

I use vmware with fvwm 2.5.5, and the MouseFocusClickRaises style.  I
just sent this email to the vmware support forum:

	I use vmware under a window manager with a focus-follows-mouse
	policy.  When windows are in front of the vmware window, vmware
	won't release the mouse cursor until the mouse moves outside the
	boundary of the vmware window, even though there is a window in
	front of the vmware window that should receive the focus.  This
	only happens when the cursor has been grabbed by vmware (it's the
	arrow, not the hand).

	In these cases, the cursor disappears behind the window in front,
	resulting in confusing behavior.  I expect that when the pointer
	moves from vmware to a window that partially obscures the vmware
	window, the focus should transfer to the window in front.  However
	vmware retains the focus until the pointer exits the vmware window,
	at which point focus switches to the window beneath the cursor.

	I have seen this problem with both fvwm (version 2.5.5) and sawfish
	(version 1.2) window managers.

Normally I would categorize this as a vmware bug, but in some cases fvwm
is also at fault.  Sometimes, even though I move the mouse outside the
vmware window, focus doesn't transfer to the window on top, but rather
remains inside the vmware window.  So I can get into a situation, where
the focus is in one window, but my cursor is quite obviously in a
different window.

Unfortunately, it only happens sometimes.  But it happens dozens of
times a day, and it gets to be rather annoying.

Any ideas?  Has this been fixed in a newer version of fvwm?

--Tessa
--
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: Marc Dirix <[email-masked]>
Date: Wed, 7 May 2003 07:54:34 +0200

This is normal, because vmware want's to simulate windows within
an "new" computer it make sure that there is no confusion
about wat belong's to what. I now there is a copy/paste possibility
but regarding mouse and keyboard the made sure thing go right.

Ever tried pressing ctrl-alt to remove mouse from the vmware screen?
This results that the vmware box is treated as a normal fvwm window.
Afterwards, it is possible to click into vmware to get back.

This ain't an fvwm bug, and certainly also ain't an vmware bug.
Fvwm can't do a thing about it because vmware set's these proparties.
vmware acts like a normal fvwm window, but inside vmware it has full control about how the new box works, and it needs to do that to fully simulate the new
computer.

Regards,
Marc

-- 
Thanks,

Marc aka IzNoGood

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 7 May 2003 10:02:37 +0200

> Any ideas?  Has this been fixed in a newer version of fvwm?

My guess is that vmware grabs all mouse events when the pointer
enters its window.  I am sure there *is* a vmware bug since it
should release the grab when the pointer leaves its window, since
you seems to have set it up to behave this way.

About focus not being transferred outside the vmware window:  when
the pointer is (un)grabbed, X generates EnterNotify and
LeaveNotify for the windows involved.  It is important to ignore
some of these events.  For example, if you have something like

  mouse 1 a csm Next (xterm) Focus

You would not want that the EnterNotify for the window under the
pointer that is generated when the automatic pointer grab is
released makes fvwm focus the window that already had the focus.  
There are delicate heuristics in fvwm that try to guess which have
to be ignored and which do not.  But there is no way to make it
work hundred percent reliably.

Bye

Dominik ^_^  ^_^

---

From: Tessa Lau <[email-masked]>
Date: Wed, 7 May 2003 14:02:24 -0400

I don't think the problem is related to vmware.

Just now I was able to reproduce the focus problem with evolution and an
xterm.  Evolution was on top, partially obscuring the xterm behind it.
When I moved my mouse pointer from evolution to the xterm, evolution
remained in focus.  I was able to reproduce it a couple times in quick
succession.

> released makes fvwm focus the window that already had the focus.  

I don't understand how this example relates to the evolution/xterm
interaction I described above.  All I did was move my mouse from one
window to the other.  There should be one LeaveNotify and one
EnterNotify.

--Tessa

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 8 May 2003 09:02:18 +0200

> window to the other.  There should be one LeaveNotify and one

Please provide detailed instructions and a stripped down config.

Bye

Dominik ^_^  ^_^

---

From: [email-masked]
Date: Thu, 15 May 2003 20:44:47 -0400

> Please provide detailed instructions and a stripped down config.

Evolution seems to grab the focus away from the window under the cursor.
I can reproduce this with a very minimal config and fvwm 2.5.6.  I've
attached the config to this message.

To reproduce, start up Galeon (I have version 1.3.4) and Evolution (I
have 1.2.4) and an xterm.  Put galeon at the top of the screen and shade
it by double-clicking on its titlebar.  Arrange an xterm in front of the
Evolution.  (See http://ofb.net/~tlau/fvwm-focus.png for a screenshot.)
Move the cursor back and forth between the galeon and the xterm.  After
a few tries, the focus will "stick" to the Evolution window even though
the mouse cursor is actually in the xterm.  On my system, I can
reproduce the failure mode about 10% of the time.

Here's my ~/.fvwm2rc:

Style "*" FocusFollowsMouse

DestroyFunc Shade
AddToFunc   Shade
+ "I" Raise
+ "M" Move
+ "D" WindowShade

Mouse   1       T       A       Shade

--Tessa

---

From: [email-masked]
Date: Sat, 17 May 2003 20:39:14 +0200

> Style "*" FocusFollowsMouse

That sounds more like an Evolution bug (?).

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].

---

From: Tessa Lau <[email-masked]>
Date: Fri, 23 May 2003 21:02:36 -0400

> That sounds more like an Evolution bug (?).

Well, I've been using sawfish for a couple days now and I haven't seen
Evolution grab the focus.  Yet as soon as I switch back to FVWM 2.5.6, I
see it happen almost immediately.  The cursor rolls over the Evolution
window, and just after it leaves, Evolution loses focus, and then
Evolution grabs the focus back, even though the mouse cursor is outside
the Evolution window.

It happens with vmware too, but vmware does its own wacky cursor
grabbing thing so I'm not too surprised.

--Tessa

---

From: Dan Espen <[email-masked]>
Date: Fri, 23 May 2003 21:25:27 -0400

> Evolution grabs the focus back, even though the mouse cursor is outside

I've tried on multiple occasions to reproduce the problem without
success.

What focus settings do you have?

I use:

Style * MouseFocus

Which version of Evolution are you running?

I have 0.13.

Which hint types does your version of Fvwm support (Gnome/EMWH)?

-- 
Dan Espen                           E-mail: [email-masked]

---

From: Tessa Lau <[email-masked]>
Date: Sat, 24 May 2003 11:58:04 -0400

> I've tried on multiple occasions to reproduce the problem without

Thanks for trying.  I know I'm not crazy, even though I may not be able
to prove it. :)

I use:

	Style * MouseFocusClickRaises

However I've also reproduced the problem with the FocusFollowsMouse
style and an otherwise default config.

> Which version of Evolution are you running?

I have Ximian Evolution 1.2.4.

> Which hint types does your version of Fvwm support (Gnome/EMWH)?

fvwm -V reports:

fvwm 2.5.6 compiled on May 10 2003 at 11:15:09
with support for: ReadLine, XPM, PNG, Shape, XShm, SM, Xinerama, XRender, NLS

--Tessa