Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question New application windows sometimes not coming up in the foreground?


    It happens pretty often that when you issue a command that calls a GUI application (or typically when you select an icon that calls this command or press a shortcut key that is assigned to it), the new window doesn't come to the foreground, but instead it just blinks in the taskbar. (It's called "requesting attention", I guess.) Then you have to press alt-tab once to bring the window to the foreground.

    After a while this phenomenon goes away (new windows start really popping up), but sometimes comes back. (Right after starting the system it almost always is there.) I haven't been able to spot any deterministic logic behind this behavior.

    I have experienced this with all three major GUI systems: KDE, Xfce and now with Gnome 2 more or less to the same extent, so I presume it must be something more fundamental in the underlying system (Xorg or whatever the name is). (Although in Xfce with the "focus stealing prevention" option it was as if the situation could have been improved, but maybe it was just an impression--it didn't make it go away entirely, that's for sure.)

    Does anyone know a remedy to this? Or at least what might be causing this?


    P.S.: Yes, I have googled several times, but it seems that this must disturb surprisingly few people, because I haven't really found anything.

  2. #2
    Linux Enthusiast
    Join Date
    Dec 2011
    Turtle Island West
    Yes. I know the answer.

    This is why Windows has only one workspace: to avoid this confusion.

    The app that is handling the file is requesting your attention, and probably on another workspace, but you can ignore it and continue what you were doing. When you are done, you ALT-TAB to the requesting app. It's not a big deal. It's actually quite sensible and friendly. Perhaps could be a configuration option, but I like this feature.

    It has to do with the window manager and the specific app that handles whatever file you are trying to open.

    For example: I use opera as a web browser. She lives on workspace 2. I've told her to open everything in new tabs, not new windows. If I'm on workspace 7 and hit enter on an html file, taskbar flashes, ALT-TAB takes me to workspace 2 and I see the file.

    However, other programs are not like this. Gimp doesn't care. It will make as many instances as you want on as many different workspaces as you want. Most programs don't care. Some do.

  3. #3
    Then if I understand you correctly, the application that doesn't come up when it is started, but just flashes its icon in the taskbar is actually opened on another workspace.

    However, I have changed my workspace settings such that there's only 1 of them now, and I'm still experiencing the same problem.

    I remember that there's some settings regarding this in Xfce (although I don't remember them having any noticeable effect on this issue), but currently I'm working with Gnome 2 (on Red Hat EL6), and I haven't found any window manager (i.e., Metacity) relevant settings there.

    Any further ideas?

  4. $spacer_open
  5. #4
    Linux Enthusiast
    Join Date
    Dec 2011
    Turtle Island West
    Can you offer a few explicit examples of this behavior. What kind of files cause this? Which apps are set up to handle them? That kind of thing.

  6. #5
    Quote Originally Posted by Miven View Post
    Can you offer a few explicit examples of this behavior. What kind of files cause this? Which apps are set up to handle them? That kind of thing.
    Why, of course! But please realize that this is a more general problem, it has nothing to do directly with opening files with applications.

    Example 1:
    - global keyboard shortcut added: window+F ==> "firefox"
    - press window+F ==>
    a) firefox icon on the taskbar flashes, if you press alt-tab, it changes to it, but only then, OR
    b) the new firefox window pops up in the foreground
    (like I wrote, it's non-deterministic, but at the beginning it tends to be a), then after a while b) )

    Example 2:
    - press ctrl+N in firefox (open new window) ==> same behavior as above

    Example 3:
    (just so that you have one of these, too )
    - in a file manager (I use Krusader) press enter on a text file ==> the text editor (kwrite in my case) opens with the file, but with the behavior described above

    Example 4:
    - enter "firefox" on the command line ==> guess what happens (same as in Example 1)

    (In all cases, when a) is the case, the window active at the time stays active.)

    P.S.: Strangely enough, I have just noticed that on my Xfce at home I don't really seem to experience this. But I do remember having this earlier on another (maybe an earlier version?) Xfce as well!

  7. #6
    Apparently it's not possible to turn off focus stealing prevention in Gnome 2. (Which is the root cause of the problem.)

    It's discussed in this forum:
    Ubuntu Forums
    Unfortunately only registered users can see it (how stupid is that?), but the gist of the story is:

    "From what I read elsewhere on the Net, it seems that its not possible to make that change in Gnome [...]"
    (And I haven't found any key either in the configuration editor or in the Gnome setup with which it could be turned off either.)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts