GNOME Bugzilla – Bug 149276
new windows don't get the first plan, focus is removed -> 2.8.2 is not usable
Last modified: 2004-12-22 21:47:04 UTC
* Open a window and maximize it (say a gnome-terminal) * Start an app (launcher on the panel, alt+f2...) * You loose the focus on the window you were using and don't see the app you have just launched in fact the app is hidden behind the current one. There are 2 severes issue here: * the new window should be displayed on the first plan, you don't even now that it has been opened if you don't look on the window_list applet in the current state, really annoying * the current app or the new open one should get the focus ... if I'm using a gnome-terminal and I open a new one you just loose what you are entering (it's not in the first and not in the second)
I have metacity 2.8.2 and it works as expected here... I think you need to upgrade libwnck and gnome-panel as well (they need to interact somehow for the good focus to be set)
I'm using libwnck 2.7.90 and gnome-panel 2.7.4.1 which are the last releases ...
I bet you also have startup-notification 0.7 ? I'm trying to understand how it could work as expected on my setup...
This sounds like the behavior that would happen with the new metacity before bug 136278 and bug 144897 were fixed/worked-around. Did you update gtk+ & gnome-desktop & startup-notification & gnome-panel & nautilus & libwnck, in addition to metacity? (Things won't work correctly unless ALL of those have been updated). I believe releases have been made of all of those, but I could be wrong. If you have updated all of those, please provide the exact tarball numbers so that I can try it, because it works fine for me on a HEAD build. One final question: Do you interact with the maximized window after launching the other app but before that other app appears? If so, this is NOTABUG. If not, we'll track down the problem.
The versions I'm using: gtk+ 2.4.4 gnome-desktop 2.7.90 libstartup-notification 0.7 gnome-panel 2.7.4.1 libwnck 2.7.90 nautilus 2.7.2 I've an epiphany maximized here. If I click on my gnome-terminal launcher in the panel it opens it behind the epiphany window. Apparently the problem doesn't happen with all the app (I've just noticed it). With totem/rhythmbox/gedit/gnumeric/devhelp it works fine, but if I start epiphany or gnome-terminal I've the problem
Created attachment 30208 [details] [review] disable the prevention of focus stealing logic Ah, yes, that's the "we need to do startup-notification-timestamp-forwarding" problem. Sorry for the inconvenience. We're working on it. Here's a patch that will disable the prevention of focus stealing logic until we can get it fixed.
*** This bug has been marked as a duplicate of 149028 ***
thanks for the patch, it fixes the issue
the patch doesn't apply with 2.8.3 anymore and the problem is still here ... any solution ?
Please see Bug 149028
Created attachment 30575 [details] [review] Disable focus-stealing logic for specific applications Here's a different way to avoid the focus-stealing bugs. This patch turns of the focus-stealing stuff _only_ for the apps that it appears to be breaking on. It'll apply against Metacity 2.8.3 and CVS HEAD.
Actually, let me clarify that. The patch from comment 11 only turns off focusing-stealing-prevention for apps that focus-stealing-prevention appears to be breaking on *when _NET_WM_USER_TIME is already set* (i.e. for the second or later window of the app). There's no reason to turn it off for the first window since that already works.
I think I had a bug open once for a blacklist/whitelist feature... hardcoding it in the WM is pretty bad, you really want to load a directory full of files (including a systemwide dir and a per-user dir, may as well use freedesktop.org basedir spec). The reason it needs to be files is that you can then give customers and individual users the ability to work around local problems. I don't really think we should do this hack, if we can't fix the apps let's just turn off the feature for 2.8. Anyway, my basic idea on the black/whitelist feature is to have a bunch of flags for each app: <define wmclass="foo" title="bar"> <!-- this is a match rule that can have various attributes --> <flag name="net_wm_user_time_broken"/> <flag name="needs_alt_key_passed_through"/> </define> Then in metacity we would have: if (meta_bwlist_window_has_flag (window, "net_wm_user_time_broken")) /* blah blah */ ; Anyway, this design discussion probably belongs on a separate bug.
Yeah, I think turning it off altogether would be better, but I was hoping that by providing this hack people might report other problems we were previously unaware of instead of just turning focus-stealing-prevention off. The whitelist/blacklist files sound like an interesting job...for someone else to do. ;-)