Bug 107155

Summary: metacity does not focus window under mouse when changing workspace
Product: [Fedora] Fedora Reporter: Dams <anvil>
Component: metacityAssignee: Havoc Pennington <hp>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: anvil
Target Milestone: ---Keywords: MoveUpstream, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-10-16 02:55:39 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Dams 2003-10-15 11:00:09 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031009

Description of problem:
When i move the mouse and change current workspace (using keyboard) at the same
time, the focused window in the new-current workspace is not always the one
under the mouse cursor. 
It seems the focused window is where the mouse cursors *was* at the moment i
pressed the 'move-workspace' keyboard shortcut but the mouse keeped moving and
left this window. Metacity didnt "see" the mouse leaving the window and/or
entering another one..

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Change workspace using keyboard shortcut while moving mouse
2. Stop moving mouse

Actual Results:  The focused window is not the one under the mouse cursor

Additional info:

I'm using C-tab to move to right workspace and S-tab to move to left workspace.
I'm using 3 workspaces, the 3 of them in the same row in the workspace applet..
'click-to-focus' option is disabled.
Comment 1 Havoc Pennington 2003-10-16 02:55:39 EDT
This is intentional, because otherwise if the mouse does not move, when you
switch to another workspace and back it can change which window is active by
causing a pointer enter notify event on the window containing the mouse.

Mouse focus simply doesn't work right with keyboard navigation, unless you warp
the mouse pointer around to maintain the pointer-always-inside-focus-window
invariant; but warping the mouse pointer around will certainly screw up your
attempts to use the mouse and keyboard at the same time just as much as this 
sort of thing will.

So the way it works is to have some faulty heuristics for when to break the
invariant. If you want sanity, use click to focus.

In any case, should be discussed on bugzilla.gnome.org rather than here as it
isn't Red Hat specific and isn't a target/blocker.