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 occuring. +++ 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: metacity-2.15.34-1.fc6 gtk2-2.10.2-3.fc6 xorg-x11-server-Xorg-1.1.1-30.fc6 kernel-2.6.17-1.2586.fc6 I'm not sure if metacity is the right component for this bug so feel free to reassign if necessary. -- Additional comment from jfrieben 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 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 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 on 2006-09-04 12:53 EST -- *** Bug 205074 has been marked as a duplicate of this bug. *** -- Additional comment from jfrieben 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 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 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 disk. -- Additional comment from mclasen 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 on 2006-09-05 08:48 EST -- Works for me again after upgrading to "metacity-2.16.0-1.fc6". -- Additional comment from mclasen 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 on 2006-09-05 18:38 EST -- I updated to metacity-2.16.0-1.fc6 (via yum) and rebooted (to fixed the NFS problems): 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 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 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 on 2006-09-07 23:56 EST -- Here is an upstream bug that may be relevant: http://bugzilla.gnome.org/show_bug.cgi?id=354422 -- Additional comment from sandmann 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 on 2006-09-08 17:35 EST -- Ubuntu bug: https://launchpad.net/distros/ubuntu/+source/metacity/+bug/57344 -- Additional comment from bugs.michael on 2006-09-08 19:58 EST -- $ gconftool-2 -g /apps/metacity/general/focus_mode sloppy $ gconftool-2 -g /apps/metacity/general/focus_new_windows smart $ gconftool-2 -g /apps/metacity/general/auto_raise true $ gconftool-2 -g /apps/metacity/general/auto_raise_delay 687 Often affected here are Emacs, xterm, Sylpheed, Firefox. -- Additional comment from tmokros on 2006-09-09 03:40 EST -- $ gconftool-2 -g /apps/metacity/general/focus_mode sloppy $ gconftool-2 -g /apps/metacity/general/focus_new_windows smart $ gconftool-2 -g /apps/metacity/general/auto_raise false -- Additional comment from dennis on 2006-09-09 09:02 EST -- focus_mode = click focus_new_windows = smart auto_raise = false -- Additional comment from jfrieben 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 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 on 2006-09-09 16:40 EST -- er, that should be *can't* reproduce very often at all... -- Additional comment from sandmann 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: http://people.freedesktop.org/~sandmann/metacity-2.16.0-2.fc6/ Of course testing is appreciated. And thanks Elijah for providing the patch. -- Additional comment from paul on 2006-09-10 08:44 EST -- I installed 2.16.0-2 from comment #23 and sylpheed no longer suffers from this problem. Thanks. -- Additional comment from bugs.michael 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 on 2006-09-11 12:24 EST -- Alright, thanks for testing. Closing this bug. -- Additional comment from caillon on 2006-09-11 13:42 EST -- I see this for gnome-terminal and firefox still.... % rpm -q firefox gnome-terminal metacity firefox-1.5.0.6-12 gnome-terminal-2.16.0-1.fc6 metacity-2.16.0-1.fc6 -- Additional comment from newren 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 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 tomorrow.
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?
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.
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.
Putting on FC6-blocker. (In the future, please just reopen the bug instead of cloning it).
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).
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.
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.
fixed if/when releng moves the package
Verified in metacity-2.16.0-4.fc6 and works for me.
I looks as if the issue has been fixed upstream anyway. From "NEWS": 2.16.3 ====== - 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.
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.