Shell – Window with activity in GNOME, notifies but doesn’t show itself after Alt+Tab

gdmgnomegnome-shellwindow-manager

When a process that has an open window is activated, it remains un-focused and hidden underneath other windows but gives a small notification below that there was action. This is particularly evident in these situations:

  • PCManFM File Manager – when it is already open to a folder and is given a new
    one to open into a new tab
  • File-Roller or Archive Manager – when it has a file open already and gets a
    new one and opens in a window.

I use Gnome 3.x primarily. I've scoured to the end and back of dconf 30 times and the closest I could find was focus_mode = click and auto_raise = true but neither had any effect.

I've been at this so long I'm bound to be overlooking something. Feel free to set me straight if you see something blatant I'm missing. Here's the system setup:

  • Ubuntu 14.04 x64 (and Fedora 20)
  • Gnome 3.x (all versions affected)
  • AMD Catalyst 13 drivers for Radeon R9
  • gdm

EDIT #1

nautilus is affected by this as well I just confirmed.

I really need these windows to show up when stuff happens. Especially because I'm the one making the stuff happen, not some random process.

Gladly will post any settings or config files as desired.

EDIT #2

I have narrowed the action responsible down to Alt+Tab (even when re-assigned to a new key mapping AND when another mapping with a similar action is re-assigned to it).

At first I thought it could be the Alternate Tab extension but disabling that did nothing.

To replicate: Open a files window, Alt+Tab to another window and then open another instance of the file manager. It doesn't have to be in a tab; it will occur with a new window as well.

Best Answer

For some apps (e.g. file-roller) this can be fixed by changing the StartupNotify key value from true to false in their respective .desktop files (e.g. /usr/share/applications/file-roller.desktop).

The above doesn't work for all apps (e.g. nautilus) so another way to fix the problem would be a custom shell extension; just to give you an idea, you could easily fix nautilus behavior like this: edit /usr/share/gnome-shell/js/ui/windowAttentionHandler.js and add these three lines of code:

    if (app.get_id() == "nautilus.desktop")
        Main.activateWindow(window);
        return;

after the following line:

    let app = this._tracker.get_window_app(window);

so you end up with something like this:

    let app = this._tracker.get_window_app(window);
    if (app.get_id() == "nautilus.desktop")
        Main.activateWindow(window);
        return;
    let source = new Source(app, window);
    Main.messageTray.add(source);

However, it's not worth writing your own extension unless you want to target only some specific applications. For a global change it looks like there is an extension:

just show the window

that overrides the "notification system" (it works fine here on gnome 3.8).
Keep in mind the two files (extension.js and metadata.json) have to be placed in:
~/.local/share/gnome-shell/extensions/justshowthewindow@ryanlerch.org
Activate the extension via tweak-tool and restart the shell (Alt+F2 then r then Enter).