! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Firefox does not follow "New window focus", "Raise on focus", "Activate focus...
Status:
RESOLVED: INVALID

Comments

Description Jarno Suni 2009-01-25 16:22:02 CET
I tested this for Xfce 4.6 beta3, Firefox 3.0.5 official, ubuntu 8.10 otherwise.

In Window Manager Settings / focus /
-New window focus: unchecked
-Raise on focus: unchecked
In Window Manager Tweaks / Focus /
Activate focus stealing prevention: checked

Even then when I start a Firefox session, a window of it raises and steals focus. Fortunately other windows of the session do not raise and steal focus again.

Is this a bug in Firefox or in Xfce or both?

https://bugs.launchpad.net/ubuntu/+source/xfce4/+bug/211533
Comment 1 Olivier Fourdan editbugs 2009-01-25 20:40:49 CET
Firefox tends to do such things, indeed.
Comment 2 Olivier Fourdan editbugs 2009-01-25 20:43:19 CET
Though I do not see this here, it works fine on Fedora.
Comment 3 Jarno Suni 2009-01-25 23:31:12 CET
Could there be a patch for Firefox in Fedora? Could you try official Firefox? I am unable to make official Firefox not to raise and steal focus in startup in Xubuntu, if I stay in one workspace. (If I launch it in one workspace and then switch to different one, it doesn't steal focus in the current workspace, if I have "Do nothing" in Window Manager Tweaks / Focus, though.)
Comment 4 Jarno Suni 2009-01-26 19:31:58 CET
Same thing with Gimp 2.6.3 here BTW. It doesn't get into users way, if it is started in a separate workspace, but if you start it in same workspace that you are working on, it pops up and steals focus.
Comment 5 Olivier Fourdan editbugs 2009-01-27 21:59:35 CET
This bug was about Firefox, why are you talking about the gimp now? How do you start your apps, do you have startup notification enabled?

FF in Fedora is identical to the upstream version.
Comment 6 Olivier Fourdan editbugs 2009-01-27 22:21:04 CET
Btw, I checked once again and it works.

1) Make sure the panel launcher has "Startup notification" enabled. As explained before, focus stealing prevention relies on startup notification to get the initial timestamp,

2) Make sure you use "firefox" as the command for the launcher,

3) Make sure you have "Focus stealing prevention" enabled in wmtweaks,

4) Click on the launcher,

5) Focus and type in some other gtk application such as Terminal,

And when the firefox window gets mapped, focus stealing prevention does its job, the window is not focused and placed just below the focused window as expected.
Comment 7 Jarno Suni 2009-01-27 22:52:35 CET
(In reply to comment #5)
> This bug was about Firefox, why are you talking about the gimp now? How do you
> start your apps, do you have startup notification enabled?

Well, they might have a common method of stealing focus.
Comment 8 Jarno Suni 2009-01-27 22:58:03 CET
(In reply to comment #6)
> Btw, I checked once again and it works.

> And when the firefox window gets mapped, focus stealing prevention does its
> job, the window is not focused and placed just below the focused window as
> expected.

I don't see it happening here even if I did 1 to 5.
Comment 9 Jarno Suni 2009-01-27 23:01:30 CET
(In reply to comment #5)
> How do you
> start your apps, do you have startup notification enabled?

I frequently start apps from the Xfce menu. For that method startup notifications seems to be disabled here and I don't see a way to change the setting there.
Comment 10 Olivier Fourdan editbugs 2009-01-28 08:53:23 CET
The menu uses desktop files that should have a field for startup notification, but that out of the control of the window manager.
Comment 11 Jarno Suni 2009-01-31 10:33:32 CET
I suppose this is bug in Firefox or in Xubuntu so marking as invalid.
Comment 12 Olivier Fourdan editbugs 2009-01-31 11:07:39 CET
Not necessarily invalid, I do not know if the menu sets the timestamp correctly, but this does not look like a bug in the window manager.
Comment 13 Jarno Suni 2009-03-16 19:18:18 CET
(In reply to comment #6)

> Btw, I checked once again and it works.
[...]

Did you set Firefox to remember windows and tabs from last session?
Comment 14 Jarno Suni 2009-03-16 21:01:01 CET
If I start Firefox the way explained in Comment #6, and have Firefox configured to show windows and tabs from last time, Firefox pops up, if I don't use another gtk application repetitively i.e. e.g. keep a key pressed in Mousepad, until all Firefox windows have started. This is what happens in Xubuntu 8.10 + Xfce 4.6 + Firefox 3.0.7 official build.
Comment 15 Olivier Fourdan editbugs 2009-03-17 12:01:32 CET
(In reply to comment #14)
> If I start Firefox the way explained in Comment #6, and have Firefox configured
> to show windows and tabs from last time, Firefox pops up, if I don't use
> another gtk application repetitively i.e. e.g. keep a key pressed in Mousepad,
> until all Firefox windows have started. This is what happens in Xubuntu 8.10 +
> Xfce 4.6 + Firefox 3.0.7 official build.

Sorry I do not understand you last comment :) Can you clarify, based on that comment, what is the expected behavior and whet is the observed behavior?

I am asking this because if there is no other interaction with other applications in the mean time, then there is no reason got focus stealing prevention to do anything.
Comment 16 Jarno Suni 2009-03-17 12:35:16 CET
(In reply to comment #15)

> Sorry I do not understand you last comment :) Can you clarify, based on that
> comment, what is the expected behavior and whet is the observed behavior?

If I type only say one letter in Mousepad after launching Firefox, Firefox pops up and steals focus. I would expect Firefox to open windows in background and not steal focus, even if I don't use Mousepad very intensively. Single key press or mouse click on Mousepad should suffice.
Comment 17 Olivier Fourdan editbugs 2009-03-17 12:39:54 CET
(In reply to comment #16)
> If I type only say one letter in Mousepad after launching Firefox, Firefox pops
> up and steals focus. I would expect Firefox to open windows in background and
> not steal focus, even if I don't use Mousepad very intensively. Single key
> press or mouse click on Mousepad should suffice.

Well that's how focus prevention works, by comparing timestamps updated by user events so that all looks fine.
Comment 18 Jarno Suni 2009-03-17 12:54:52 CET
(In reply to comment #17)

> Well that's how focus prevention works, by comparing timestamps updated by user
> events so that all looks fine.

I don't think so. If I type a letter in Mousepad after launching Firefox, Mousepad should have later timestamp, consequently Firefox should neither pop up nor steal focus from Mousepad, right?
Comment 19 Olivier Fourdan editbugs 2009-03-17 13:32:05 CET
(In reply to comment #18)
> I don't think so. If I type a letter in Mousepad after launching Firefox,
> Mousepad should have later timestamp, consequently Firefox should neither pop
> up nor steal focus from Mousepad, right?

But in anycase, this is not something that depends on the window manager, each application updates its timestamp the way it wants, this is why I say that from a window manager point of view, it looks fine.
Comment 20 Jarno Suni 2009-03-18 17:45:48 CET
(In reply to comment #19)
 
> But in anycase, this is not something that depends on the window manager, each
> application updates its timestamp the way it wants, this is why I say that from
> a window manager point of view, it looks fine.

When I started the same Firefox from menu in Gnome session, starting the same saved session, Firefox did not pop up, if I e.g. typed a letter in xfce4-terminal after launching Firefox and before a Firefox window opened. For the issue to not be too clear, I could make Firefox break this behavior even in Gnome, but with another saved session, which I don't remember exactly.
Comment 21 Jarno Suni 2009-03-19 06:01:06 CET
I use Metacity as window manager in Gnome. Maybe you are right in that this is not a window manager bug, but I am sorry I can't see what else makes the difference.
Comment 22 Olivier Fourdan editbugs 2009-03-19 10:25:44 CET
Metacity will deny an application the right to raise itself if the current focused window is not from the same group, maybe that explain the difference. 

Unfortunately, that tend to break with some application (see gnome bug 567528, 166395, 164675, 445447,305882) so I don't think this is suitable in xfwm4.

Bug #4854

Reported by:
Jarno Suni
Reported on: 2009-01-25
Last modified on: 2009-07-14

People

Assignee:
Olivier Fourdan
CC List:
0 users

Version

Version:
4.5.93 (4.6 beta 3)

Attachments

Additional information