Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 206263 - Weird desktop wide application focusing/cursor problem
Weird desktop wide application focusing/cursor problem
Product: Fedora
Classification: Fedora
Component: metacity (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Søren Sandmann Pedersen
Depends On:
  Show dependency treegraph
Reported: 2006-09-13 07:16 EDT by Steven Haigh
Modified: 2014-06-18 05:08 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-09-25 19:11:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Steven Haigh 2006-09-13 07:16:11 EDT
I'm not 100% sure that this is fixed. After installing this new update, I still
see this issue happen - however nowhere near as often. Today after a full 8-10
hours use, it happened 3-4 times. Clicking on the top window bar (ie to move the
window around the screen) on a gnome-terminal session restored keyboard controls.

I believe it may be premature to label this as fixed yet as the issue is still

+++ This bug was initially created as a clone of Bug #204519 +++

Since I fully resynced with yesterdays rawhide I now regulary lose the
cursor/ability to type in *any* application on the desktop. I can still focus a
window (ie the title bar changes it's color) but I cannot type anything in the
terminal or in gedit. Also when focusing a window I don't get any cursor (in
gedit it completely disappears, in the terminal the cursor is displayed as
"unfocused" i.e. as an unfilled rectangle). Also the menus can be selected and
get highlighted but the actual menu popup doesn't appear. Opera is affected too
so this doesn't seem to be limited to gtk2 apps.

Risizing a window (or at least clicking a border) fixes the problem until it
reappears a while later.

These are the package versions I have installed right now:

I'm not sure if metacity is the right component for this bug so feel free to
reassign if necessary.

-- Additional comment from jfrieben@hotmail.com on 2006-09-01 04:07 EST --
Right, the same here. In general, one manages to recover focus by
closing some window by clicking the [x] button or by opening a new
windows. Even menu buttons often get only highlighted, but no menu
opens. This happens on a current "rawhide" desktop. The issue is
probably 2-3 days old.
Btw, I have tried a current "Ubuntu" development live CD, and the
issue there shows up identically. So, it's not "Fedora" specific.

-- Additional comment from mclasen@redhat.com on 2006-09-01 11:21 EST --
sounds like either the X server or metacity is getting confused about the
keyboard focus, probably metacity.

-- Additional comment from redhat-bugzilla@camperquake.de on 2006-09-04 03:47 EST --
Me too.
My current "fix" is to hit Alt-Tab twice (which will select a different window,
and then back) to restore focus.

-- Additional comment from zaitcev@redhat.com on 2006-09-04 12:53 EST --
*** Bug 205074 has been marked as a duplicate of this bug. ***

-- Additional comment from jfrieben@hotmail.com on 2006-09-04 14:11 EST --
(In reply to comment #2)
After downgrading to "metacity-2.15.5-6.1" of "FC6T2", all focus
weirdness stops. It is thus clearly not the "X" server but rather
the window manager which is to blame.

-- Additional comment from zaitcev@redhat.com on 2006-09-04 15:40 EST --
No need to go that far. I verified that 2.15.21-1.fc6 works (I lifted the
old binary RPM from Brew archive). Unfortunately, no releases between
.21 and .34 were packaged, so I cannot bisect further.

-- Additional comment from jfrieben@hotmail.com on 2006-09-05 02:21 EST --
Sure, but in general, older "rawhide" packages are not accessible in most
cases once they have got supplanted by the latest version - in this case
the broken one. A clear advantage for Red Hat employees ;) I guess the best
is to simply archive all packages released between test releases on my hard

-- Additional comment from mclasen@redhat.com on 2006-09-05 02:37 EST --
Pete, there were no releases between 2.15.21 and 2.15.34. Metacity does not
believe in consecutive release numbers.

-- Additional comment from jfrieben@hotmail.com on 2006-09-05 08:48 EST --
Works for me again after upgrading to "metacity-2.16.0-1.fc6".

-- Additional comment from mclasen@redhat.com on 2006-09-05 09:53 EST --
Thats odd, since there were no relevant changes between 2.15.34 and 2.16.0

-- Additional comment from paul@permanentmail.com on 2006-09-05 18:38 EST --
I updated to metacity-2.16.0-1.fc6 (via yum) and rebooted (to fixed the NFS

The problems seems more prevalent.  I hit it with the first use of
gnome-terminal.  It's still happening with Sylpheed (although double-clicking
does work).  Sylpheed seems to be hardest hit because of multiple windows
(possibly being created anew when switch message folders).

-- Additional comment from paul@permanentmail.com on 2006-09-05 19:40 EST --
The problem with gnome-terminal happens when gnome-session starts gnome-terminal
sessions.  Once you work around the focusing problem by clicking the blue drag
bar at the top, none of the remaining gnome-terminal windows have the problem.

-- Additional comment from redhat-bugzilla@camperquake.de on 2006-09-06 07:34 EST --
I can confirm that the problem gets worse with metacity-2.16.0-1.fc6

-- Additional comment from mclasen@redhat.com on 2006-09-07 23:56 EST --
Here is an upstream bug that may be relevant: 

-- Additional comment from sandmann@redhat.com on 2006-09-08 16:11 EST --
Question for people who have seen this: what settings do you use?
focus-follows-mouse, raise-on-click, etc?

-- Additional comment from sandmann@redhat.com on 2006-09-08 17:35 EST --
Ubuntu bug:


-- Additional comment from bugs.michael@gmx.net on 2006-09-08 19:58 EST --
$ gconftool-2 -g /apps/metacity/general/focus_mode
$ gconftool-2 -g /apps/metacity/general/focus_new_windows
$ gconftool-2 -g /apps/metacity/general/auto_raise
$ gconftool-2 -g /apps/metacity/general/auto_raise_delay

Often affected here are Emacs, xterm, Sylpheed, Firefox.

-- Additional comment from tmokros@tmokros.net on 2006-09-09 03:40 EST --
$ gconftool-2 -g /apps/metacity/general/focus_mode
$ gconftool-2 -g /apps/metacity/general/focus_new_windows
$ gconftool-2 -g /apps/metacity/general/auto_raise

-- Additional comment from dennis@conversis.de on 2006-09-09 09:02 EST --
focus_mode = click
focus_new_windows = smart
auto_raise = false

-- Additional comment from jfrieben@hotmail.com on 2006-09-09 10:22 EST --
Actually using the same troublesome settings as in comment #18:
focus_mode: sloppy, focus_new_windows: smart, auto_raise false.

-- Additional comment from newren@gmail.com on 2006-09-09 16:27 EST --
There's a patch in http://bugzilla.gnome.org/show_bug.cgi?id=354422 that should
fix this; it was a race condition that always existed in metacity but became
much easier to trigger with the patch applied for upstream 126497.  Could people
test with that patch applied and verify whether that fixes the bug or whether
there might be more than one bug here?  It seems to fix it for me, but I can
reproduce very often at all...

-- Additional comment from newren@gmail.com on 2006-09-09 16:40 EST --
er, that should be *can't* reproduce very often at all...

-- Additional comment from sandmann@redhat.com on 2006-09-09 18:52 EST --
I ahve applied that patch to rawhide - it should show up tomorrow. In the
meantime I have put up the new packages here:


Of course testing is appreciated. And thanks Elijah for providing the patch.

-- Additional comment from paul@permanentmail.com on 2006-09-10 08:44 EST --
I installed 2.16.0-2 from comment #23 and sylpheed no longer suffers from this


-- Additional comment from bugs.michael@gmx.net on 2006-09-10 10:52 EST --
So far it seems as if 2.16.0-2 fixes the problem indeed. I haven't seen the
symptoms since I installed it.

-- Additional comment from sandmann@redhat.com on 2006-09-11 12:24 EST --
Alright, thanks for testing. Closing this bug.

-- Additional comment from caillon@redhat.com on 2006-09-11 13:42 EST --
I see this for gnome-terminal and firefox still....

% rpm -q firefox gnome-terminal metacity

-- Additional comment from newren@gmail.com on 2006-09-11 13:49 EST --
caillon: Upgrade, dude.  See comment 23-25, which says it seems to be fixed in
metacity version 2.16.0-*****2*****.fc6 (well, minus the stars used for
emphasis).  ;-)

-- Additional comment from sandmann@redhat.com on 2006-09-11 15:20 EST --
I had forgotten about the freeze, so the packages didn't actually show up in
rawhide. I have asked rel-eng to move them now though, so they should show up
Comment 1 Elijah Newren 2006-09-13 12:17:47 EDT
Steven: If you run metacity in a terminal (or restart it with 'metacity
--restart') and then duplicate the bug, are there any warning messages printed out?
Comment 2 Paul Dickson 2006-09-13 12:59:36 EDT
You describe how you work around the bug but not how you cause it.  Please
describe what are you doing when the focus is misplaced, so others can attempt
it too.
Comment 3 Steven Haigh 2006-09-13 19:12:48 EDT
I'll be trying it again today as I need to do a ton of provisioning for VoIP
devices which means I'll be on this machine all day.. 

I notice that when I use gnome-terminal, if I copy/paste a lot between say
Firefox and the terminal it seems to trigger more often. It also sometimes
triggers when I'm using multiple tabs within a single gnome-terminal window. I
have remapped the terminal settings to use Ctrl + Shift + 1/2/3/4 etc to switch
between terminals so I can still use Ctrl + 1/2/3/4 etc for terminal programs. I
usually have 3-4 tabs within the terminal window and am constantly switching
between them using the above shortcuts.

As I said, it's only 3-4 times a day now, so it's not an easy thing to
reproduce, but I can confirm that it does indeed still happen.
Comment 4 Søren Sandmann Pedersen 2006-09-14 14:05:32 EDT
Putting on FC6-blocker.

(In the future, please just reopen the bug instead of cloning it).
Comment 5 Elijah Newren 2006-09-14 22:40:41 EDT
Since I can't duplicate and many others seem to not have the problem anymore,
this may be really hard to get fixed.  I imagine that it's a really rare race
condition, possibly needing certain hardware to be able to trigger.  (Some mice
are just easier to get ButtonPress and ButtonRelease events in faster; load on
the CPU and other such factors can matter too).

If others are interested in looking further, the problem can probably be found
in the hints at http://bugzilla.gnome.org/show_bug.cgi?id=355180 (and might even
be fixed by the patch I just attached there).
Comment 6 Steven Haigh 2006-09-15 00:09:55 EDT
It looks as though I haven't suffered this issue since - this would mean that
re-producing this issue on a constant basis may be very very difficult.

This being said, I agree with Elijah's comments above and believe that we should
try to fix the root cause of the issue before FC6 ships.

It may have just been chance that it happened to me 4 times in one day after the
update, however anything we can do before shipping to reduce that possibility
further should be considered.
Comment 7 Søren Sandmann Pedersen 2006-09-21 15:19:59 EDT
I am adding this patch since it is clearly safe and may possible help this bug. 

It looks like the bug occurs extremely rare (if at all) now, so I think we can
ship FC6.
Comment 8 Søren Sandmann Pedersen 2006-09-25 19:11:33 EDT
fixed if/when releng moves the package
Comment 9 Xiaohong Wang 2006-10-15 05:54:58 EDT
Verified in metacity-2.16.0-4.fc6 and works for me.
Comment 10 Joachim Frieben 2006-10-15 10:13:57 EDT
I looks as if the issue has been fixed upstream anyway. From "NEWS":

  - fix longstanding focus bug with mouse focus (not sloppy focus) and
    popup override redirect windows, such as mozilla's/firefox's
    location bar autocompletion, causing nasty flickering and lost
    keystrokes (Elijah) [#357695]

I have rebuilt the "metacity" package based upon 2.6.13, and no issues
have been observed.
Comment 11 Elijah Newren 2006-10-15 19:32:58 EDT
Joachim: upstream #357695 was an issue that's completely unrelated to this bug
report.  The related upstream bugs (that I know of, and I'm in charge of
upstream) are bug 354422 and bug 355180.

Note You need to log in before you can comment on or make changes to this bug.