Firefox window moves to current workspace

Bug #175904 reported by Mark Schouten
98
This bug affects 7 people
Affects Status Importance Assigned to Milestone
GTK+
Fix Released
Medium
Mozilla Firefox
Confirmed
Unknown
firefox (Ubuntu)
Triaged
Medium
Unassigned
firefox-3.0 (Fedora)
Won't Fix
High
gnome-terminal (Ubuntu)
Invalid
Undecided
Unassigned
kdebase (Ubuntu)
Fix Released
Undecided
Unassigned
meta-gnome2 (Ubuntu)
Invalid
Undecided
Unassigned
metacity (Ubuntu)
Fix Released
High
Alexander Sack
ubufox (Ubuntu)
Invalid
Medium
Alexander Sack

Bug Description

Binary package hint: firefox-3.0

FYI: I upgraded to Hardy to be able to point people at bugs, if needed. So I am aware of the pre-alpha status of Hardy.

When Firefox-3.0 is set as the default browser for Gnome (System, Preferences, Preferred Applications) all applications use the correct browser. However, I have my workspaces nicely arranged, and my browser is in workspace 2.

When clicking a link (to open it) in gnome-terminal or Evolution, the Firefox-3.0 window moves to the workspace where I clicked the link. But I don't want the window to move, I want to move to the workspace where I left the window.

IMHO, this is a bug.

Thanks!

Revision history for this message
In , Joe Smith (yasumoto7) wrote :

Running Ubuntu Gutsy Tribe 5, GNOME 2.19.7, Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a8pre) Gecko/2007090304 Minefield/3.0a8pre

This has been happening to me every time I click a link from the gnome-terminal.

Revision history for this message
In , Joe Smith (yasumoto7) wrote :

A bit of clarification:

Gutsy Tribe 5 is the 5th development (alpha) release of Ubuntu 7.10 Gutsy Gibbon.

New pages are set to open in a new tab, and I am not using MOZ_NO_REMOTE/-no-remote

Revision history for this message
In , Myk (myk) wrote :

This is a real pain. I find myself clicking links and quickly switching to the desktop with Firefox on it, hoping I can outrace the request so Firefox comes to the foreground on its proper desktop and I don't have to move it back into place (again). Requesting blocking status.

Revision history for this message
In , L. David Baron (dbaron) wrote :

Sounds like something that could be a regression from bug 295447 (which introduced gtk_window_present calls).

Revision history for this message
In , Bill (bill-redhat-bugs) wrote :

Description of problem:

When I open a new tab (via right click on a terminal, clicking on something in
liferea, whatever), firefox immediately jumps onto the current workspace.

This is irritating.

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

firefox-2.0.0.6-11.fc8

Additional info:

Seems related to the startup notification patch, as it worked ok in 2.0.0.6-8.fc8.

Revision history for this message
In , Adam (adam-redhat-bugs) wrote :

I will second this. Very irritating!

Revision history for this message
In , Christopher (christopher-redhat-bugs) wrote :

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()

Revision history for this message
In , Christopher (christopher-redhat-bugs) wrote :

er, hops workspaces

Revision history for this message
In , Colin (colin-redhat-bugs) wrote :

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

Revision history for this message
In , Bill (bill-redhat-bugs) wrote :

FWIW, commenting out the call to gdk_window_focus() in the patch makes it DTRT
for me.

Revision history for this message
In , Owen (owen-redhat-bugs) wrote :

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.

Revision history for this message
In , Colin (colin-redhat-bugs) wrote :

Bill, what effect does that have in the single-workspace case?

Revision history for this message
In , Colin (colin-redhat-bugs) wrote :

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.

Revision history for this message
In , Bill (bill-redhat-bugs) wrote :

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.

Revision history for this message
In , David (david-redhat-bugs) wrote :

We need to fix this for F8...

Revision history for this message
In , Jeremy (jeremy-redhat-bugs) wrote :

This is also happening in compiz... so more than just metacity at work here.

Revision history for this message
In , Christopher (christopher-redhat-bugs) wrote :

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.

Revision history for this message
In , Matthias (matthias-redhat-bugs) wrote :

The long discussion leading to the current metacity behaviour can be found
here: http://bugzilla.gnome.org/show_bug.cgi?id=166379

Revision history for this message
In , Bill (bill-redhat-bugs) wrote :

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.

Revision history for this message
In , Bill (bill-redhat-bugs) wrote :

Created attachment 225081
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.

Revision history for this message
In , David (david-redhat-bugs) wrote :

"This is not a blocker"

Revision history for this message
In , Jens (jens-redhat-bugs) wrote :

<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

Revision history for this message
In , Bill (bill-redhat-bugs) wrote :

*** Bug 337721 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Colin (colin-redhat-bugs) wrote :

Note there is now a patch for metacity upstream at:
http://bugzilla.gnome.org/show_bug.cgi?id=482354#c2

Revision history for this message
In , Colin (colin-redhat-bugs) wrote :

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).

Revision history for this message
In , Colin (colin-redhat-bugs) wrote :

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.

Revision history for this message
In , Bill (bill-redhat-bugs) wrote :

(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.

Revision history for this message
In , Jens (jens-redhat-bugs) wrote :

(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. :)

Revision history for this message
In , Colin (colin-redhat-bugs) wrote :

(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.

Revision history for this message
In , Colin (colin-redhat-bugs) wrote :

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.

Revision history for this message
In , Christopher (christopher-redhat-bugs) wrote :

We'll probably want this metacity fix for FC7 too before Firefox's support makes
it there.

Revision history for this message
In , Matthias (matthias-redhat-bugs) wrote :

Fixed in F8, moving off blocker

Revision history for this message
In , Mauricio (mauricio-redhat-bugs) wrote :

Its fixed for me after last update in F8
Cheers

Revision history for this message
Mark Schouten (mark-prevented) wrote : Firefox-3.0 window moves to current workspace

Binary package hint: firefox-3.0

FYI: I upgraded to Hardy to be able to point people at bugs, if needed. So I am aware of the pre-alpha status of Hardy.

When Firefox-3.0 is set as the default browser for Gnome (System, Preferences, Preferred Applications) all applications use the correct browser. However, I have my workspaces nicely arranged, and my browser is in workspace 2.

When clicking a link (to open it) in gnome-terminal or Evolution, the Firefox-3.0 window moves to the workspace where I clicked the link. But I don't want the window to move, I want to move to the workspace where I left the window.

IMHO, this is a bug.

Thanks!

Changed in firefox-3.0:
importance: Undecided → Low
Revision history for this message
Fabien Tassin (fta) wrote :

What did you use as "Command" ? (in Preferred Applications)

Try "firefox-3.0 %s", works for me.

Revision history for this message
Mark Schouten (mark-prevented) wrote :

Fabien:

The command is '/usr/bin/firefox-3.0 %s'. Please note that Firefor starts ok, but it changes workspace.

Revision history for this message
Fabien Tassin (fta) wrote :

Strange, it's working fine for me, I also hate to see windows moving against my will.

Could you try manually, i.e.:

1/ open a shell in workspace 1
2/ open firefox 3 in workspace 2
3/ in the shell, type : firefox-3.0 about:plugins

do you see the firefox moved in workspace 1 ?

Also, in Firefox preferences / Tabs, do you open new pages in new windows or in new tabs ? (i do tabs)

Another question, when the window is moved, do you see the requested page opened somewhere (either visible or last tab) ? or do you see a blank tab instead (about:blank) ?

Revision history for this message
Mark Schouten (mark-prevented) wrote :

When I follow the steps you gave me, the ff-window is moved to workspace 1.

I open new pages in new tabs.

It opens the right page, in a new tab. So no about:blank pages.

Revision history for this message
In , Raúl Porcel (armin76) wrote :

http://bugzilla.gnome.org/show_bug.cgi?id=482354 thanks to Mart Raudsepp for the link

Revision history for this message
Martin Pitt (pitti) wrote : Re: Firefox-3.0 window moves to current workspace

I confirm this behavior, it happens to me, too. It is highly annoying.

Changed in firefox-3.0:
importance: Low → Medium
status: New → Confirmed
Revision history for this message
In , Alexander Sack (asac) wrote :

 1. new-window : makes sense to open on current desktop
 2. new-tab: moving all tabs to current desktop is annoying; but opening new tab on other desktop is probably too confusing.

Thus: if new-tab is selected as open mode, use new-window if there is no firefox window on current desktop. optionally, we could add a pref to disable this auto-new-window feature for power users that want the ffox 2 behaviour.

(fwiw gedit behaves in a similar fashion)

Revision history for this message
Colin Watson (cjwatson) wrote : Re: Firefox-3.0 window moves to current workspace

The same thing happens to me when Firefox pops up a dialog (e.g. password for HTTP basic auth); the whole window teleports to my current workspace.

Changed in gtk:
status: Unknown → New
Changed in firefox:
status: Unknown → Confirmed
Revision history for this message
In , Jruderman (jruderman) wrote :

*** Bug 414879 has been marked as a duplicate of this bug. ***

Revision history for this message
ubunturox (ubuntu-rox) wrote : Re: Firefox-3.0 window moves to current workspace

I have the same Problem with Firefox Version 2.0.0.12 in Ubuntu 7.10.
It just happend short while ago - can't say exactly when though - maybe since 7.10 because I upgraded only a while ago...
I too like my Firefox on desktop 2 and when I click on a link in a mail in evolution on desktop 1 it used to open on desktop 2.

Revision history for this message
ubunturox (ubuntu-rox) wrote :

I just discovered that the problem does not exist if I doubleclick an *.htm file in nautilus and click view.
Those files get opened correctly in the last active Firefox window and that stays on it's current workspace.
So it's probably a gnome problem?

Revision history for this message
Simos Xenitellis  (simosx) wrote :

It appears to be a Firefox feature.

Can you try to
1. bring up about:config
2. set browser.tabs.loadDivertedInBackground to True

Revision history for this message
Martin Pitt (pitti) wrote :

For the record, this even seems to behave differently on my two boxes; on the desktop (metacity) Firefox moves to the current workspace when clicking a link, whereas on the laptop (compiz) the current workspace is switched to the one where Firefox resides. The is a more sane behaviour, and I think it's an acceptable default if it can be switched off.

Revision history for this message
Mark Schouten (mark-prevented) wrote :

Thanks! This kindof fixes the problem. Although it really isn't the same thing.

The option you mention make the tab open up in the background. It SHOULD NOT have anything to do with where the window goes, IMHO.

So, appearantly where you open the tab also defines where your window travels. :/

Revision history for this message
Martin Pitt (pitti) wrote :

I confirm that setting browser.tabs.loadDivertedInBackground to True disables this behavior with metacity at least. I didn't check compiz yet.

Revision history for this message
Simos Xenitellis  (simosx) wrote :

Ahem, the real source of the bug is the window manager,
http://bugzilla.gnome.org/show_bug.cgi?id=482354

It is already marked above in the bug report.

Revision history for this message
ubunturox (ubuntu-rox) wrote :

yes - this seems to fix it - thank you!

For the record I use gnome with xfwm4.

Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote : Re: [Bug 175904] Re: Firefox-3.0 window moves to current workspace

Simos Xenitellis wrote:
> 2. set browser.tabs.loadDivertedInBackground to True

awesome. this is still a workaround though, since this makes the tab not to be
focused and that means if you have many tabs opened (so many that they take all
the tab bar) the new tab won't be shown and you may not notice it's been opened.

But this is indeed better that the previous behaviour.

Revision history for this message
In , Myk (myk) wrote :

*** Bug 420186 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Rimas Kudelis (rq) wrote :

(In reply to comment #6)
> 1. new-window : makes sense to open on current desktop
> 2. new-tab: moving all tabs to current desktop is annoying; but opening new
> tab on other desktop is probably too confusing.

What about opening new tab on other desktop and flashing the window title button?

> Thus: if new-tab is selected as open mode, use new-window if there is no
> firefox window on current desktop. optionally, we could add a pref to disable
> this auto-new-window feature for power users that want the ffox 2 behaviour.

I would certainly make use of that pref. :)

Revision history for this message
In , Caillon (caillon) wrote :

This isn't a bug in Firefox, it is a bug in metacity which Colin Walters at Red Hat reported and supplied a patch for.

http://bugzilla.gnome.org/show_bug.cgi?id=482354

If you see this bug on Linux, you're probably not running Fedora Rawhide/9. But, I recommend you forward this to your distro and ask that they temporarily take the metacity patch until the upstream metacity developers decide this bug is important enough to warrant their attention.

Revision history for this message
In , Caillon (caillon) wrote :

Alternatively, switching window managers to something other than metacity is a workaround.

Revision history for this message
In , Jakub 'Livio' Rusinek (liviopl-pl) wrote :

> Alternatively, switching window managers to something other than metacity is a
workaround.

I could say "lie". It's simply not true :P . I had this issue with Compiz running.

> If you see this bug on Linux, you're probably not running Fedora Rawhide/9.

Fedora is innovative ^^ .

Revision history for this message
In , Caillon (caillon) wrote :

Compiz in Fedora 8 certainly doesn't have that problem. If compiz regressed, that's unfortunate, and I'd suggest filing a bug against compiz.

Revision history for this message
In , Jakub 'Livio' Rusinek (liviopl-pl) wrote :

Until I set an option in about:config I saw this bug. Now everything from other apps is opened in background tabs. That is great and doesn't require fixing anything.

Revision history for this message
In , Myk (myk) wrote :

(In reply to comment #14)
> Until I set an option in about:config I saw this bug. Now everything from other
> apps is opened in background tabs. That is great and doesn't require fixing
> anything.

Which option did you set, and what did you set it to?

Revision history for this message
In , Jakub 'Livio' Rusinek (liviopl-pl) wrote :

browser.tabs.loadDivertedInBackground = true

Revision history for this message
In , Caillon (caillon) wrote :

I just tried every compiz version from F8 onward, and metacity from F8 onward. No compiz version features this bug. Metacity didn't get the fix until 2.21.5 and had it except for a day when it got accidentally removed around 2.21.8. It's been fine ever since.

Revision history for this message
In , Myk (myk) wrote :

(In reply to comment #16)
> browser.tabs.loadDivertedInBackground = true

Hmm, indeed, that prevents the window from moving, although it doesn't duplicate the behavior that has regressed, since it doesn't throb the browser's taskbar button nor open the link in a foreground tab.

Revision history for this message
Alexander Sack (asac) wrote : Re: Firefox-3.0 window moves to current workspace

fwiw, there is a metacity fix in the gnome bug. we should take it for hardy.

Revision history for this message
In , Aleksej (aleksejrs) wrote :

*** Bug 406167 has been marked as a duplicate of this bug. ***

Changed in gtk:
status: New → Confirmed
Revision history for this message
Alexander Sack (asac) wrote : Re: Firefox-3.0 window moves to current workspace

in case we cannot find a fix, we should consider to use the |open external links in window| rather than |in new tab| for the release.

Changed in firefox-3.0:
milestone: none → ubuntu-8.04
Alexander Sack (asac)
Changed in firefox-3.0:
assignee: nobody → asac
Revision history for this message
Michael Rooney (mrooney) wrote :

I experienced this as well and found it highly annoying. However when I enabled compositing via Appearances, the problem went away. Compiz must be doing something to disallow this. This may be a difference between people experiencing and not experiencing this bug. I would agree this is a bug and should be fixed for non-composited desktops as well.

Revision history for this message
Mark Schouten (mark-prevented) wrote : Re: [Bug 175904] Re: Firefox-3.0 window moves to current workspace

On Mon, 2008-03-10 at 12:14 +0000, Alexander Sack wrote:
> in case we cannot find a fix, we should consider to use the |open
> external links in window| rather than |in new tab| for the release.
>
> ** Changed in: firefox-3.0 (Ubuntu)
> Target: None => ubuntu-8.04

That would not be a usable fix for me. That would only open up more
windows, also on the wrong workspace.

I don't have a feeling that this bug (I've seen some duplicates btw
(#204927, #197761)) really has the attention it needs. I still prefer
ff2 for usability over ff3, this bug only makes it much worse. Has this
issue made it on any 'critical release buglist' yet?

Mark

Revision history for this message
Manuel McLure (manuel-mclure) wrote : Re: Firefox-3.0 window moves to current workspace

This is not just a metacity bug - it also happens in KDE with kwin, and the workaround does not work in that environment.

Revision history for this message
Colin Walters (walters) wrote :

Just a note, Fedora is currently using the patch from the GNOME bug for Fedora 9.

Revision history for this message
Alexander Sack (asac) wrote :

as a short term measure, ubufox can help to improve the behaviour for default installs by using "open link in new window" instead of "new tab" by default. This should be better for normal users anyway.

milestoning for final to make this bug less annoying.

Changed in ubufox:
importance: Undecided → Medium
milestone: none → ubuntu-8.04
status: New → Triaged
assignee: nobody → asac
Revision history for this message
Colin Walters (walters) wrote :

I would really appreciate if Hardy and Fedora 9 both used the same behavior, as it reduces user confusion.

Your suggestion would change the behavior of the single-workspace case. The reason I chose to patch Metacity is simple - it makes Firefox match the behavior it has on both Windows and MacOS X (and how IE works on Windows, and I'd bet Safari on OS X).

Please consider the Metacity patch. Thanks!

Changed in firefox-3.0:
status: Unknown → In Progress
Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 175904] Re: Firefox-3.0 window moves to current workspace

Alexander Sack [2008-03-31 20:56 -0000]:
> as a short term measure, ubufox can help to improve the behaviour for
> default installs by using "open link in new window" instead of "new tab"
> by default. This should be better for normal users anyway.

Argh, argh, do you really think so? I always found using tabs sooo
helpful to reduce confusion and clutter on my desktop. Not selecting
new tabs is bad as a workaround, but opening new windows is worse
FWIW.

What do other people think?

Revision history for this message
Mark Schouten (mark-prevented) wrote :

On Tue, 2008-04-01 at 06:48 +0000, Martin Pitt wrote:
> Alexander Sack [2008-03-31 20:56 -0000]:
> > as a short term measure, ubufox can help to improve the behaviour for
> > default installs by using "open link in new window" instead of "new tab"
> > by default. This should be better for normal users anyway.
>
> Argh, argh, do you really think so? I always found using tabs sooo
> helpful to reduce confusion and clutter on my desktop. Not selecting
> new tabs is bad as a workaround, but opening new windows is worse
> FWIW.
>
> What do other people think?

FAR worse. I love tab's, and workspaces. Why is it so hard to fix this
bug the right way? (I know it's easy to talk if you can't code, but the
bug has been here long enough).

Mark

Revision history for this message
Michael Rooney (mrooney) wrote : Re: Firefox-3.0 window moves to current workspace

I really agree that opening links in new windows is a very suboptimal solution. What about the fix that Colin Walters is suggesting? Also what is Compiz doing that Metacity isn't? Can we just patch that behavior?

Revision history for this message
Manuel McLure (manuel-mclure) wrote :

I'm feeling a little frustrated in that everyone is concentrating on metacity when the exact same problem happens on kwin, and the workaround doesn't work correctly on that platform. IMHO, if Firefox works badly on more than one window manager, that is evidence that the Firefox behavior is wrong, even if it is technically "right."

Revision history for this message
Francis J. Lacoste (flacoste) wrote :

I also have this problem in KDE 3.5.9, and changing the property doesn't seem to work around the annoying problem.

Changed in kdebase:
status: New → Confirmed
Revision history for this message
Alexander Sack (asac) wrote :

we will try http://bugzilla.gnome.org/show_bug.cgi?id=482354 attachment 104591 ("... take 2") to fix this on metacity side.

Changed in metacity:
status: New → In Progress
Revision history for this message
Alexander Sack (asac) wrote :

the fix works fine here so far. will do a bit more testing and upload later today.

Changed in metacity:
assignee: nobody → asac
importance: Undecided → High
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package metacity - 1:2.22.0-0ubuntu3

---------------
metacity (1:2.22.0-0ubuntu3) hardy; urgency=low

  * fix firefox-3.0 bug (LP: #175904) - "Firefox-3.0 window moves to
    current workspace" by applying patch for metacity bug (gnome: #482354) -
    "gtk_window_present() causes full applications to move workspaces"
    - add debian/patches/011_gnome_482354_attachment_104591.patch

 -- Alexander Sack <email address hidden> Fri, 04 Apr 2008 01:36:04 +0200

Changed in metacity:
status: Fix Committed → Fix Released
Revision history for this message
Alexander Sack (asac) wrote :

now we have the metacity fix. no need for a workaround in ubufox.

Changed in ubufox:
status: Triaged → Invalid
Revision history for this message
Alexander Sack (asac) wrote :

moving firefox milestone to later as the behaviour has been normalized in metacity.

Changed in firefox-3.0:
milestone: ubuntu-8.04 → later
Alexander Sack (asac)
Changed in firefox-3.0:
milestone: later → none
Revision history for this message
Manuel McLure (manuel-mclure) wrote :

How about people who are seeing this bug under KDE/kwin? The metacity fix does nothing for us.

Revision history for this message
James Westby (james-w) wrote :

Hi,

There's still a kdebase task open for this bug, so that
indicates it still needs fixing there.

There's no upstream bug report link for kdebase in
launchpad, has a bug been reported upstream
about this issue?

Thanks,

James

Revision history for this message
Manuel McLure (manuel-mclure) wrote :

Something in my last Hardy update seems to have fixed this - FF3 seems to work correctly under kwin now.

Revision history for this message
Alexander Sack (asac) wrote : Re: [Bug 175904] Re: Firefox-3.0 window moves to current workspace

On Sat, Apr 05, 2008 at 08:01:59PM -0000, Manuel McLure wrote:
> Something in my last Hardy update seems to have fixed this - FF3 seems
> to work correctly under kwin now.
>

isn't kde using metacity (sorry for my ignorance here :))?

 - Alexander

Revision history for this message
Manuel McLure (manuel-mclure) wrote : Re: Firefox-3.0 window moves to current workspace

No, metacity is specifically Gnome's window manager. KDE uses its own window manager named kwin.

Revision history for this message
In , Matti-mversen (matti-mversen) wrote :

*** Bug 429901 has been marked as a duplicate of this bug. ***

Revision history for this message
Edwin Mons (ubuntu-edwinm) wrote : Re: Firefox-3.0 window moves to current workspace

Although this behaviour should have been fixed in 1:2.22.0-0ubuntu3, I still experience this with 8.04 RELEASE, 1:2.22.0-0ubuntu4. It appears to occur mainly when starting Firefox (or Thunderbird) in maximized view.

Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote : Re: [Bug 175904] Re: Firefox-3.0 window moves to current workspace

Edwin Mons wrote:
> Although this behaviour should have been fixed in 1:2.22.0-0ubuntu3, I
> still experience this with 8.04 RELEASE, 1:2.22.0-0ubuntu4. It appears
> to occur mainly when starting Firefox (or Thunderbird) in maximized
> view.

If you are starting it, how should it start in a different workspace, and how
will it be moving from one to another? It doesn't make any sense to me...

Revision history for this message
x (xk2c-deactivatedaccount) wrote : Re: Firefox-3.0 window moves to current workspace

> If you are starting it, how should it start in a different workspace, and

close all FF, start xchat, click on a link. Happens here with kde 3.5.9 quite often.....

> how will it be moving from one to another?

well that's the question that opened this bugreport i guess

> It doesn't make any sense to me...

to me either. but that doesn't mean it doesn't happen.

Revision history for this message
x (xk2c-deactivatedaccount) wrote :

> close all FF

well that really does not make sense in this context....

open FF on lets says workspace 4, open xchat on workspace 2 (kde) and click on an link inside xchat.
FF moves to the current workspace.

I just tested the same with Thunderbird and Akregator - it doesn't happen from inside those apps.
so maybe it is more xchat related... ?

Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote : Re: [Bug 175904] Re: Firefox-3.0 window moves to current workspace

Thilo Six wrote:
>> If you are starting it, how should it start in a different workspace,
> and
>
> close all FF, start xchat, click on a link. Happens here with kde 3.5.9
> quite often.....
>
>> how will it be moving from one to another?
>
> well that's the question that opened this bugreport i guess
>
>> It doesn't make any sense to me...
>
> to me either. but that doesn't mean it doesn't happen.
>

I was replying to 'It appears to occur mainly when starting Firefox'

If Firefox is closed and you start it, it will start in the current workspace...
I know what's this bug as I had it (but I workarounded it in firefox's
about:config as said in a comment above)

Revision history for this message
Edwin Mons (ubuntu-edwinm) wrote : Re: Firefox-3.0 window moves to current workspace

@Emilio:
I notice I was a bit incomplete in my description in my previous posting. What I meant to say is that this indeed happens across workspaces, but also across monitors. If I start Firefox maximized on my second screen (mouse pointer on that screen, patiently waiting for the window to appear), it starts on the desired monitor, but it'll move to the first screen after about half a second, even if my pointer is still on the second screen. The screens are both attached to my NVidia card, configured in TwinView.

Revision history for this message
Manuel McLure (manuel-mclure) wrote :

So much for this working. I updated my laptop to Hardy and am seeing the same problem. FF3, KDE 3.5.9, kwin.

Revision history for this message
Francis J. Lacoste (flacoste) wrote :

I've found a nice workaround for kwin. Use the 'Advanced -> Special Application Settings' menu item when middle clicking on the firefox titlebar. In that window, I 'Force' the 'Desktop' to my 'Web' desktop.

Firefox has been sitting at its proper place ever since.

Revision history for this message
In , Bug (bug-redhat-bugs) wrote :

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

Revision history for this message
In , Peter (peter-redhat-bugs) wrote :

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.

Changed in firefox-3.0:
status: In Progress → Invalid
Revision history for this message
In , Cowider (cowider) wrote :

Hi, I have the same problem with stumpwm, although Firefox's window doesn't get moved to the current Group, I think that's stumpwm's term for a workspace, but I get switched to the group where firefox is.

Revision history for this message
Jonathan Thomas (echidnaman) wrote : Re: Firefox-3.0 window moves to current workspace

I can't reproduce this in KDE4's KWin, which is shipping with Intrepid.
Marking fix released for kdebase.

Changed in kdebase:
status: Confirmed → Fix Released
Revision history for this message
Manuel McLure (manuel-mclure) wrote :

Is the KDE4 KWin included in Intrepid the same as the one that's in the KDE 4.1 repositories for Gutsy? If so, then it does not work correctly for me. The Firefox window still moves desktops.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Yeah, it is the same as in Intrepid. I guess I'm just lucky.

Changed in kdebase:
status: Fix Released → Confirmed
Changed in gtk:
status: Confirmed → In Progress
Revision history for this message
Bismark (bismark-foofus) wrote :

I'm getting email from this bug and hundreds others because I'm subscribed to the whole 8.04 package somehow.

"You received this bug notification because you are subscribed to Ubuntu: ubuntu-8.04."

I cannot find anywhere to unsubscribe from this and I can't unsubscribe from individual bugs because I'm not subscribed to them directly.

Help!

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 175904] Re: Firefox-3.0 window moves to current workspace

Bismark [2008-07-15 18:14 -0000]:
> I cannot find anywhere to unsubscribe from this and I can't unsubscribe
> from individual bugs because I'm not subscribed to them directly.

You can unsubscribe from the milestone on the milestone page:

  https://bugs.launchpad.net/ubuntu/+milestone/ubuntu-8.04

Revision history for this message
In , Rimas Kudelis (rq) wrote :

(In reply to comment #6)
> 1. new-window : makes sense to open on current desktop
> 2. new-tab: moving all tabs to current desktop is annoying; but opening new
> tab on other desktop is probably too confusing.
>
> Thus: if new-tab is selected as open mode, use new-window if there is no
> firefox window on current desktop. optionally, we could add a pref to disable
> this auto-new-window feature for power users that want the ffox 2 behaviour.
>
> (fwiw gedit behaves in a similar fashion)

Maybe there need more options in multi-workspace environments?
E.g.:
1. new window unconditionally
2. new window if none on an active workspace, new tab otherwise [hidden in Windows]
3. new tab unconditionally

and also a checkbox to focus the window when link has been opened (having it checked would probably move the user to another workspace in case 3). Probably, the same preference mentioned in Comment #0 could be reused here.

Revision history for this message
Jonathan Thomas (echidnaman) wrote : Re: Firefox-3.0 window moves to current workspace

Whoops, my bad. KDE 4.1 isn't in included at all in Gutsy. It has KDE 4.0.

Changed in kdebase:
status: Confirmed → Fix Released
Revision history for this message
In , Mozilla-bugs-trk (mozilla-bugs-trk) wrote :

Created an attachment (id=343829)
Shell script to open a URL strictly in a new firefox tab on the current workspace

As a substitute for a fix of this bug, I've worked around it with a shell script that uses wmctrl to get the ideal behavior. It'll check to see if there's an existing firefox window open on the current workspace, and if so, (optionally) focus it, and load a url in a new tab there. If there's no such window, it'll simply open it in a new window on the current workspace.

Revision history for this message
Jeremy Nickurak (nickurak) wrote : Re: Firefox-3.0 window moves to current workspace

I wrote up a script that I call on opening URL's instead of calling firefox directly. It checks to see if there's a firefox window on the current desktop. If there is one, it'll focus it, and open the URL in a new tab there. If there isn't one, it'll just open a new window right where you are.

Hopefully this'll be useful to somebody.

It requires wmctrl to be installed. (sudo apt-get install wmctrl)

Alexander Sack (asac)
Changed in firefox-3.0:
status: Confirmed → Triaged
Revision history for this message
Jamin W. Collins (jcollins) wrote :

Not quite sure how to properly list it in the affects area of the bug report, but I'm seeing this same behavior under Intrepid with firefox and openbox.

Revision history for this message
Alexander Sack (asac) wrote : Re: [Bug 175904] Re: Firefox-3.0 window moves to current workspace

On Thu, Dec 11, 2008 at 01:41:12PM -0000, Jamin W. Collins wrote:
> Not quite sure how to properly list it in the affects area of the bug
> report, but I'm seeing this same behavior under Intrepid with firefox
> and openbox.
>

You think you can come up with a regression window for openbox? doesn
hardy openbox work?

 - Alexander

Changed in gtk:
status: In Progress → Fix Released
Changed in firefox-3.0:
status: Invalid → Fix Released
Revision history for this message
Jamin W. Collins (jcollins) wrote : Re: Firefox-3.0 window moves to current workspace

@Alexander, sorry I'm not following your question...

Changed in kdebase (Ubuntu):
assignee: nobody → Alexander Sack (asac)
Changed in meta-gnome2 (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
Changed in gnome-terminal (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
Revision history for this message
Micah Gersten (micahg) wrote :

Please do not set tasks/assignment without a reason.

Changed in kdebase (Ubuntu):
assignee: Alexander Sack (asac) → nobody
Changed in meta-gnome2 (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
status: New → Invalid
Changed in gnome-terminal (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
status: New → Invalid
Revision history for this message
schnittchen (schnittchen) wrote :

This bug affects me (working with kwin) on Ubuntu 9.10, backports enabled.

The symptoms are EXACTLY as described in comment #14 of bug #204927, so I'm not retelling that story ;-)

Packages, for the record:
firefox: 3.5.8+build1+nobinonly-0ubuntu0.9.10.1
kde-window-manager: 4:4.3.5-0ubuntu1~karmic1

Revision history for this message
In , Bugzilla-mozilla-org-pobox (bugzilla-mozilla-org-pobox) wrote :

First, how does this bug report relate to Mozilla bug #263553? Isn't it a duplicate?

I just posted the following to http://bugs.debian.org/486570, but I found no way to update this bug report.

After reading what James wrote[0], I went to investigate this a bit.

0. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=486570#15

First, I found the single call to gtk_window_present in the Firefox
source and disabled it:

  --- a/widget/src/gtk2/nsWindow.cpp
  +++ b/widget/src/gtk2/nsWindow.cpp
  @@ -1406,7 +1406,7 @@ nsWindow::SetFocus(PRBool aRaise)
          owningWindow->mContainerBlockFocus = PR_TRUE;

          // Set focus to the window
  - if (gRaiseWindows && aRaise && toplevelWidget &&
  + if (0 && gRaiseWindows && aRaise && toplevelWidget &&
              !GTK_WIDGET_HAS_FOCUS(toplevelWidget) &&
              owningWindow->mIsShown && GTK_IS_WINDOW(owningWindow->mShell))
            gtk_window_present(GTK_WINDOW(owningWindow->mShell));

and built new packages, but the problem remained. However, I found
a couple of curiousities. I have three heads one two graphics cards,
and I use Zaphod mode to put them all next to each other. head 0 is
on GPU 0, and heads 1&2 are on GPU 1.

  1. the focus is never stolen when the Firefox window is on heads
     1&2, not even if the link is clicked on another head.

  2. if I move the window from head 0 to head 1 and back, then it no
     longer steals focus, not even if the click is on a separate head.

  3. if I move the window from head 0 to head 1, click a link, and
     move it back to head 0, then the focus stealing happens again.

I then went back to investigate these three points with the original
Firefox packages, i.e. without the above patch, and the behaviour is
identical.

Then I investigated the urgency hint, using xprop -spy: I started it
in a terminal, then X-pasted a link into that terminal and clicked
it. I did this to avoid changing focus with the mouse while testing.
There was nothing in the output of xprop -spy mentioning an urgency
hint. I did verify that xprop -spy shows the urgency hint, using
URxvt.urgentOnBell and echo -e '\a'.

This is starting to feel a bit like a riddle. For me, (2.) above is
an okay workaround at the moment, but it really seems like the
Firefox code needs some cleaning.

Changed in gtk:
importance: Unknown → Medium
Changed in firefox:
importance: Unknown → Medium
Alexander Sack (asac)
Changed in firefox-3.0 (Ubuntu):
assignee: Alexander Sack (asac) → Chris Coulson (chrisccoulson)
Martin Pitt (pitti)
Changed in firefox-3.0 (Ubuntu):
assignee: Chris Coulson (chrisccoulson) → nobody
Revision history for this message
Thomas Hotz (thotz-deactivatedaccount) wrote : Re: Firefox-3.0 window moves to current workspace

So can we get the fix from Fedora into Ubuntu?

affects: firefox-3.0 (Ubuntu) → firefox (Ubuntu)
summary: - Firefox-3.0 window moves to current workspace
+ Firefox window moves to current workspace
Revision history for this message
In , David Faure (faure) wrote :

(In reply to Jeremy Nickurak from comment #23)
> Created attachment 343829
> Shell script to open a URL strictly in a new firefox tab on the current
> workspace
>
> As a substitute for a fix of this bug, I've worked around it with a shell
> script that uses wmctrl to get the ideal behavior. It'll check to see if
> there's an existing firefox window open on the current workspace, and if so,
> (optionally) focus it, and load a url in a new tab there. If there's no such
> window, it'll simply open it in a new window on the current workspace.

Thanks for that script, it works very well.
This is the behavior I wish Firefox could have out of the box (Reuse-window-in-current-desktop otherwise create-new-in-current-desktop). Much better than jumping to another desktop or opening tabs hidden into another desktop. Any chance for this to happen?

Changed in firefox-3.0 (Fedora):
importance: Unknown → High
status: Fix Released → Won't Fix
Changed in firefox:
status: Confirmed → Unknown
Changed in firefox:
status: Unknown → Confirmed
Changed in firefox:
importance: Medium → Unknown
Revision history for this message
In , Release-mgmt-account-bot (release-mgmt-account-bot) wrote :

The severity field for this bug is relatively low, S3. However, the bug has 4 duplicates.
:Amir, could you consider increasing the bug severity?

For more information, please visit [auto_nag documentation](https://wiki.mozilla.org/Release_Management/autonag#severity_underestimated.py).

Revision history for this message
In , Autonag-nomail-bot (autonag-nomail-bot) wrote :

The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.