Bug 307581
Summary: | apps jump workspaces when urls opened | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Bill Nottingham <notting> | ||||
Component: | metacity | Assignee: | Søren Sandmann Pedersen <sandmann> | ||||
Status: | CLOSED UPSTREAM | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 7 | CC: | adam, cra, davidz, gecko-bugs-nobody, jturner, kem, lmacken, mauricio, me, petersen, p.van.egdom, rstrode, rvokal, triage, walters, xgl-maint | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2008-06-02 19:17:23 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Bill Nottingham
2007-09-26 18:09:57 UTC
I will second this. Very irritating! Owen says this is a metacity bug. The following program also hops windows. #!/bin/env python import gtk import gobject w = gtk.Window() w.set_title("Foo") w.show() def on_timeout(): w.present() return False gobject.timeout_add(5000, on_timeout) gtk.main() er, hops workspaces To give some background on this issue, Firefox now supports startup notification: https://bugzilla.mozilla.org/show_bug.cgi?id=223492 The issue in this bug only occurs when there are multiple workspaces. Removing this Firefox patch would be a regression in the single workspace case because it would require clicking on a flashing browser entry in the task list after activating an external link. From IRC: <owen> walters: metacity could look at the window role and alter the behavior based on that FWIW, commenting out the call to gdk_window_focus() in the patch makes it DTRT for me. Actually, what I meant was that based on the "type" of the window application vs. dialog, you could do different things. A application never, under any circumstances, should be moved between desktops. Bill, what effect does that have in the single-workspace case? Also, I've filed this bug upstream here: http://bugzilla.gnome.org/show_bug.cgi?id=482354 Since there seems to be agreement this is an upstream Metacity issue, please continue discussion there. Colin: when it's on the same workspace, I get the throbbing entry in the panel. When it's on the other workspace, I don't. We need to fix this for F8... This is also happening in compiz... so more than just metacity at work here. Jeremy: not quite... in metacity, the _window_ switches to the current workspace. In compiz, the _active workspace_ switches. This is about the metacity issue, which everyone agrees is clearly wrong. The compiz behavior seems more or less sane. While different, i've already gotten used to it. The long discussion leading to the current metacity behaviour can be found here: http://bugzilla.gnome.org/show_bug.cgi?id=166379 So, going back to the beginning. The original patch (for firefox) has the following comments usptream from Elijah (https://bugzilla.mozilla.org/show_bug.cgi?id=223492#c31): ************ >+ if (desktopStartupID.IsEmpty()) { >+ PRUint32 timestamp = GTKToolkit->GetFocusTimestamp(); >+ if (timestamp) { >+ gdk_window_focus(aWindow->window, timestamp); >+ GTKToolkit->SetFocusTimestamp(0); >+ } >+ return; >+ } This block of SetUserTimeAndStartupIDForActivatedWindow() is a little confusing. It doesn't set the user time or the startup id for the activated window. Instead, it sends an "activate me, please" message to the window manager. I understand it's just a workaround when no startup id is available (because either firefox wasn't launched with startup-notification or wasn't built with MOZ_ENABLE_STARTUP_NOTIFICATION), but it'd be nice to have it documented as such. It'd also be good to verify in testing that this block of code isn't being executed (i.e. that startup id is non-empty), since it is just a workaround. ***************** I find it odd that the supposed 'workaround' part of the code is what's causing the problem in my testing. Created attachment 225081 [details]
partial fix for firefox
Note that due to missing changes to the configury, we aren't even *building*
the SN support at the moment - this patch fixes that.
Doesn't change the behavior, though.
"This is not a blocker" <notting> halfline: why not just take the patch out of ff, since we're not even applying it in a way that works <juhp> notting: exactly <halfline> notting: that's not a horrible idea notting: might be worth talking to stransky about or caillon if he pops on *** Bug 337721 has been marked as a duplicate of this bug. *** Note there is now a patch for metacity upstream at: http://bugzilla.gnome.org/show_bug.cgi?id=482354#c2 Also in response to: <notting> halfline: why not just take the patch out of ff, since we're not even applying it in a way that works The patch does function as expected in the single workspace case, even if it may be entering into a fallback section of the code (will investigate). I have built a new version of metacity with the patch: http://koji.fedoraproject.org/koji/buildinfo?buildID=21629 Please test, if it works well then we can reable to re-enable the Firefox fix. (In reply to comment #20) > Also in response to: > > <notting> halfline: why not just take the patch out of ff, since we're not even > applying it in a way that works > > The patch does function as expected in the single workspace case, even if it may > be entering into a fallback section of the code (will investigate). The patch adds configury for using libstartupnotification, and ifdef'd code to use libsn. We then build moz without sn support. If it's functioning, it's completely by accident. (In reply to comment #21) > I have built a new version of metacity with the patch: > http://koji.fedoraproject.org/koji/buildinfo?buildID=21629 > > Please test, if it works well then we can reable to re-enable the Firefox fix. Thanks, Colin! Yes, that works well for me so far. :) (In reply to comment #22) > > The patch adds configury for using libstartupnotification, and ifdef'd code to > use libsn. We then build moz without sn support. If it's functioning, it's > completely by accident. Ok, I'm at home so I can't actually test this with my rawhide computer, but from looking at the patch again, the section you identified earlier (which calls gdk_window_focus which ultimately causes the focus event) is the source of the behavior under discussion. The startup notification specification if supported correctly would make Firefox display a progress status on first launch, but this (to me) is not the most useful part of the patch. The most useful part is the behavior that when one clicks on a link in an external program, the web browser appears and displays the link. Some people feel that behavior wasn't right for multiple desktops (and the metacity patch addresses this), but please when testing things, try the single workspace case. The expected behavior is that the browser appears; it should not pulse as in comment #9. This is the way clicking on links works on other platforms, and is the most sensible thing I believe for most situations in the single-workspace case. There might be some more special cases such as feed readers (liferea?) where one wants to click a number of links to "queue" urls; I am open to discussion around those. Probably the right solution for them will be to have the ability at link-click time whether or not you want to see it. I meant to mention above; the reason the patch still has effect is because the gdk_window_focus call is outside the #ifdef MOZ_ENABLE_STARTUP_NOTIFICATION. Also, bear in mind this patch is already upstreamed and will be in the Firefox 3 release; I am not yet sure whether it will be in the 2.0.0.7 stream. We'll probably want this metacity fix for FC7 too before Firefox's support makes it there. Fixed in F8, moving off blocker Its fixed for me after last update in F8 Cheers This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists. Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs: http://docs.fedoraproject.org/release-notes/ The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping Thank you for the bug report. Closing bug as per comment #27 and comment #28. If you still experience this problem after updating to our latest Fedora release, reopen this bug against that version if this bug exists there. |