Certain windows steal focus

Bug #54127 reported by warjowuch
22
Affects Status Importance Assigned to Milestone
Gaim
Incomplete
Undecided
Unassigned
Pidgin
Invalid
Unknown
banshee (Ubuntu)
Incomplete
Low
Unassigned
Declined for Hardy by Sebastien Bacher
gaim (Ubuntu)
Incomplete
Low
Unassigned
Declined for Hardy by Sebastien Bacher
pidgin (Ubuntu)
Incomplete
Low
Unassigned
Declined for Hardy by Sebastien Bacher

Bug Description

Binary package hint: metacity

Hi there,
When I am watching a fullscreen movie or so, and I receive an instant message, or an email in Wine/Eudora, this pops up a window, but it steals my focus from the movie I was watching...
This also happens in other applications. I think it should not steal focus from fullscreen apps. Also the wine-systemtray continuesly steals focus, this is also irritating in all apps.

Changed in metacity:
status: Unconfirmed → Confirmed
Revision history for this message
Andreas Lloyd (lloydinho) wrote :

This is known upstream with Gaim. Have no idea with regards to Wine and the wine-systemtray.

At the moment, Metacity deals with this as best as it can, but is limited by the way that the individual applications demand attention.

Feel free to give a more detailed bug report upstream:

http://bugs.winehq.org/

Revision history for this message
Luke Schierer (lschiere) wrote :

I still think that as gaim doesn't know anything about what's going on with your desktop, it should be able to simply create a new window and have the WM figure out where it should go. We shouldn't have to do anything special with new windows to avoid metacity issues.

Revision history for this message
warjowuch (lulkoek) wrote : Re: [Bug 54127] Re: Certain windows steal focus

Hi There,
Well, as I may believe a friend of mine, in KDE this is not the case. But well, he does not use gaim. It's also when I start an application and decide to go on working with a still open application window (e.g. working with firefox, wanting to search something in synaptic, opening synaptic, but in the meantime working on firefox. Then I don't mean that the 'administrator' window is stealing, but after that, the syn.-window must still load, when in that time, I go back to firefox, synaptic still hovers over. As does firefox when I am wrking in thunderbird) it steals focus.

Thanks for your reaction, I will look on bugs.winehq.org!

-----Ursprüngliche Nachricht-----
Von: Bug 54127 <email address hidden>
Gesendet: 23.08.06 12:10:13
An: <email address hidden>
Betreff: [Bug 54127] Re: Certain windows steal focus

This is known upstream with Gaim. Have no idea with regards to Wine and
the wine-systemtray.

At the moment, Metacity deals with this as best as it can, but is
limited by the way that the individual applications demand attention.

Feel free to give a more detailed bug report upstream:

http://bugs.winehq.org/

--
Certain windows steal focus
https://launchpad.net/bugs/54127

______________________________________________________________________
XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!
Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130

Changed in gaim:
importance: Undecided → Low
Revision history for this message
Savvas Radevic (medigeek) wrote :

same in banshee, the notification steals focus from fullscreen apps

Revision history for this message
Andrew Conkling (andrewski) wrote :

What notification specifically? Banshee isn't doing anything special.

Changed in banshee:
status: New → Incomplete
Revision history for this message
Savvas Radevic (medigeek) wrote :

well if I select on the tray icon menu to show notifications and I play a game, say enemy territory, it pops up the notification on top, and it somehow steals the focus while I'm playing the game, then the mouse doesn't work.
I don't know if it's banshee-specific or enemy territory-specific though

Revision history for this message
Andrew Conkling (andrewski) wrote :

That would be a notification-daemon bug, if anything; Banshee's just using it. Best way would be to test the very similar functionality in Rhythmbox. You could also test with Pidgin's libnotify popups plugin, gnome-power-manager's battery notifications (if you're on a notebook), or gajim, among others.

Changed in banshee:
status: Incomplete → Invalid
Revision history for this message
Raptor Ramjet (ramjet) wrote :

This has now become a very serious usability issue with Ubuntu as there are far too many applications that have started stealing focus.

This is something that should be absolutely forbidden and it should be a condition of getting an application into the Ubuntu repositories that it does steal focus. In fact this should be enforced in the GUI toolkits and it should not be possible for a developer to make an app steal focus without jumping through hoops.

For instance: I have just installed the "GNU ConvertAudioFile" script so I can convert 200 small WAV soundbytes I have created into mp3 format. Not only does this script popup a progress dialogue (with a single "Cancel" button ) and steal focus it will also pop the bloody thing up on whichever workspace I switch to.

Needless to say this meant that a good percentage of conversion operations were inadvertently cancelled whilst I was trying to type this bug report (the spacebar being accepted as a click on the cancel button) In fact I eventually had to kill X with "Ctrl+Alt+Backspace" to get back to a sane desktop (I couldn't even use a terminal as the focus kept getting stolen) and I had to retype this report in from scratch.

Sorry but it totally UNACCEPTABLE for this bloody awful UI design to continue. This problem has been getting steadily worse for a while now as all sorts of programs (including such things as Update Manager) have started doing it too.

Please fix this behaviour as a matter of utmost priority as it really is totally ruining the Ubuntu desktop experience.

If I wanted this crappy behaviour I'd be sticking to Windows.

Revision history for this message
Andrew Conkling (andrewski) wrote :

Raptor, can you be specific about steps to reproduce and which applications this affects? We can't file specific bugs without specifics.

Revision history for this message
Richard Laager (rlaager) wrote :

Raptor, get a better window manager or file bugs on the one you currently use.

The terminology that's become popular here is just awful. Windows don't *steal* focus. The window manager is *focusing* them.

Revision history for this message
Raptor Ramjet (ramjet) wrote :

Update manage has just stolen the focus 3 times.

The second time it put some sort of message up whilst I was typing a search into Firefox and, as the space bar is accepted as a "press of the highlighted button", I just about saw the window disaapear out of the corner of my eye whilst I was moving on to my next search term.

As I did not even properly see the dialogue this effectively means that Update Manager has asked me a question about some potentially problematic change to my system which I have just unwittingly applied. Alternatively I have must missed an important notification about the update.

This focus stealing behaviour is totally unacceptable Windows 95 style programming. An application that does not have the focus should put up any new windows in the background. I should be able to decide when I wish to give my attention to a program. They are working for me, I am not working for them.

This bug should be allocated the highest prioity as it basically makes Ubuntu as unusable as Windows.

It is not just Update Manager that behaves in this fashion so I shall document each and every instance of this behaviour as it happens. However due to X currently being broken on my machine (see bug #158002) this may take a while as I am currently unable to use my Ubuntu machine as a desktop (screen resolution of 50Hz makes it unusable)

Revision history for this message
Andrew Conkling (andrewski) wrote :

Gaim is just a transition package to Pidgin.

Changed in gaim:
status: Confirmed → Invalid
Changed in pidgin:
status: New → Confirmed
Revision history for this message
Andrew Conkling (andrewski) wrote :

Raptor, since this bug deals with Pidgin, please see bug #35876 which is filed against Update Manager.

Revision history for this message
Savvas Radevic (medigeek) wrote :

Instead of dealing with each application... shouldn't there be a tweak in gnome NOT to allow applications to steal focus?

Revision history for this message
Andrew Conkling (andrewski) wrote :

On Fri, Mar 14, 2008 at 9:26 AM, Savvas Radević <email address hidden> wrote:

> Instead of dealing with each application... shouldn't there be a tweak
> in gnome NOT to allow applications to steal focus?

Bug #35876 is already filed against metacity, GNOME's window manager.

But it would seem the problem is two-fold: something in the window manager
(that bug) but also the fact that applications need to tell metacity how to
handle them. If the latter is done incorrectly, there's not much metacity
can do, and it would be a bug against that application. (I'm talking a bit
over my head here, so take that for what it's worth.)

Revision history for this message
Raptor Ramjet (ramjet) wrote :

In reply to Richard Laager.

> The terminology that's become popular here is just awful.

That's because the behaviour of the GUI is now awful. It's fundamentally irritating to have your work interrupted by another process that decides to "pop up". It's become worse recently (Gutsy) and the Ubuntu "desktop experience" is now starting to mimic a Windows 95 machine where focus would be give to any application that wished to "pop up".

When the user has decided to work on an application that application should remain "focused" until the user decides otherwise. There should be no way whatsoever that another process can interrupt the user and demand attention. No reason whatsoever. No ifs no buts. None. Nada. This behaviour should be enforced at the GUI toolkit level to make it impossible to override (obviously being a computer you can always override anything but you get my drift...).

*Your* applications needs are never more important than *my* work/play.

This is a fundamental UI bug which significantly impacts the Ubuntu desktop and should be addressed at a distribution level. Raising bugs against individual packages is inefficient - or do people expect us to raise a bug against every single application that ever steals focus ?

Savvas Radević is correct as Gnome itself should stop any application stealing focus.

Revision history for this message
Andrew Conkling (andrewski) wrote :

On Sat, Mar 15, 2008 at 6:01 AM, Raptor Ramjet <email address hidden>
wrote:

> This is a fundamental UI bug which significantly impacts the Ubuntu
> desktop and should be addressed at a distribution level. Raising bugs
> against individual packages is inefficient - or do people expect us to
> raise a bug against every single application that ever steals focus ?

This simply isn't how bugs are solved in Ubuntu. There are two potential
types of culprits: those in the window manager, and those in the
applications themselves. I already pointed you to a window manager bug, and
suggested that you file bugs on any applications that are stealing focus,
besides the existing Update Manager bug.

If the problem is really that significant, you'll find that individuals will
be filing bugs left and right, and the amount that anyone needs to do will
be minimal.

> Savvas Radević is correct as Gnome itself should stop any application
> stealing focus.
>

"Gnome itself" is nothing more than a suite of individual applications, all
with individual teams of developers, who do not necessarily work together.
That translates to Ubuntu package maintainers, with a very similar dynamic.
Thus the need to file separate bugs.

Bug reporting takes a little bit of work, but it's a rewarding experience.
There are plenty of volunteers (who are often users just like you, not
developers) who enjoy helping with the process. You can feel free to
subscribe the "Ubuntu Desktop Bugs" (https://launchpad.net/~desktop-bugs) to
any bugs you think impact Ubuntu that much, but please use it sparingly.

Keep in mind the standard response for bugs that are too general:
"You may find it helpful to read "How to report bugs effectively"
(http://www.chiark.greenend.org.uk/~sgtatham/bugs.html<http://www.chiark.greenend.org.uk/%7Esgtatham/bugs.html>).
We'd be grateful if you would then provide a more complete description of
the problem.

At a minimum, we need:
1. the specific steps or actions you took that caused you to encounter the
problem,
2. the behavior you expected, and
3. the behavior you actually encountered (in as much detail as possible)."

Revision history for this message
Raptor Ramjet (ramjet) wrote :

Example 1: Plugging in a USB stick just caused a window to steal focus.

How to reproduce.

1 Open a browser, go to favourite search engine, start typing in search box.
2 Insert USB stick.
3 Continue typing in browsers search box..
4 After a short pause Nautilus is opened and steals focus. Keystrokes go to Nautilus instead of browser search box.

The behaviour I expected.

1 Newly opened Nautilus is opened in a background window and does not steal focus.

The behaviour I encountered.

1 Nautilus stole the focus and my keystrokes were assimilated by its "type ahead" function.

Reproducible:

1 Always

Example 2: Update Manger steals focus.

How to reproduce.

1 Open text editor start typing some text.
2 Run Update Manager, install updates.
3 Return to text editor continue typing.
4 After a short pause Update Manager will steal focus.

The behaviour I expected.

1 Update manager will work in the background and will wait for me to manually return focus to it.

The behaviour I encountered.

1 Update manager stole the focus

Reproducible:

1 Always.

This has become a general problem with Gnome application behaviour that needs addressing as a Gnome wide problem.

Revision history for this message
Raptor Ramjet (ramjet) wrote :

Example 1: Nautilus steals focus when a USB key is inserted.

Steps to reproduce:

1 Start browser, go to favourite search engine, start typing in "search text" box.
2 Insert USB stick.
3 Continue typing in browsers "search ahead" box.
4 Nautilus opens a new window showing contents of USB stick which steals focus. Keyboard strokes that should be going to browser window are assimilated by Nautilus' "type ahead" function.

Expected behaviour:

1 Nautilus is opened in a background window.

Actual behaviour:

1 Nautilus steals focus.

Reproducible:

1 Always.

Example 2: Update manager steals focus.

Steps to reproduce:

1 Launch text editor and start typing some text.
2 Launch update manager.
3 Set update manager going to download updates.
4 Return to text editor and continue typing text.
5 At some point update manager will display a dialogue which will steal focus. If this should happen to be with a prompt then the default action of the prompt will be taken should you press the spacebar (which should be going to text editor)

Expected behaviour:

1 Update manager will stay in the background. Any dialogues will wait for the user to manually return focus to the application.

Actual behaviour:

1 Update manager dialogues steal focus and assimilate keystrokes intended for text editor.

Reproducible:

1 Always.

These are simply the latest two examples but the problem is now endemic in the Gnome desktop.

Revision history for this message
Andrew Conkling (andrewski) wrote :

See bug #67476 and bug #54300. Please refrain from making comments here
about anything other than Pidgin.

Revision history for this message
Savvas Radevic (medigeek) wrote :

If you still see or have noticed this bug, please mark the status of "pidgin (Ubuntu)" as "New"

Changed in gaim:
importance: Unknown → Undecided
status: Unknown → New
status: New → Invalid
Changed in pidgin:
status: Confirmed → Incomplete
Changed in pidgin:
status: Unknown → Invalid
Revision history for this message
Fabus (fabian-gebert-hh) wrote :

It is still present and I actually cannot find any application on my computer which does NOT steal the focus no matter which program I am using. This happens in both metacity and compiz.
And I agree that this really is an issue and should be resolved.
Why not just having the newly opened window flashing in the task bar?
This is even a security issue because it happens quite often that you type a password into a password field and some focus-stealing app takes at least part of it.

Revision history for this message
Savvas Radevic (medigeek) wrote :

> It is still present and I actually cannot find any application on my computer which does NOT steal the focus no matter which program I am using. This happens in both metacity and compiz.
> And I agree that this really is an issue and should be resolved.

I don't have a focus problem in ubuntu 9.04 jaunty alpha 5.
Everything, especially nautilus, isn't focused at all, the open window
lies in the back. :)
1) Try the live cd
2) Create a fresh new user on your release of Ubuntu, and try again.

Revision history for this message
Fabus (fabian-gebert-hh) wrote :

No jaunty does NOT fix this. I tried a fresh live-session.
Launch gedit
Switch to firefox and type sth
Once gedit completed loading it will be focussed.

Expected behaviour:
Since I have intentionally switched to firefox I don't wanna be bothered, just leave gedit open in the back.
I think this can only be resolved on window manager level.

Revision history for this message
Savvas Radevic (medigeek) wrote :

Then I think it's fixed with compiz enabled.
Your steps with open gedit / click on already open firefox keeps focus
on firefox, it doesn't direct it to gedit.
At least it's fixed for me. Your mileage of course may and will vary. :)

security vulnerability: yes → no
Changed in pidgin (Ubuntu):
importance: Undecided → Low
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for the report, it has been some time without any response or feedback in this bug report and we are wondering if this is still an issue for you with the latest release of Ubuntu the Natty Narwhal, May you please test with that version and comment back if you're still having or not the issue? Please have a look at http://www.ubuntu.com/download to know how to install that version.Thanks in advance.

Changed in gaim:
status: Invalid → Incomplete
Changed in pidgin:
status: Invalid → Incomplete
Changed in banshee (Ubuntu):
status: Invalid → Incomplete
Changed in gaim (Ubuntu):
status: Invalid → Incomplete
Changed in pidgin:
status: Incomplete → Invalid
Victor Vargas (kamus)
Changed in banshee (Ubuntu):
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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