New windows sometimes open in the background [$180]
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Gala |
Confirmed
|
High
|
Unassigned | |
| | elementary OS |
Confirmed
|
High
|
Unassigned | |
Bug Description
Excpected behavior: When I launch a second instance of an app I expect it to pop up to the foreground and take focus.
What happens instead: This behavior is not consistent.
Let's say you have your web browser open and then open a terminal (using Ctrl-Alt-T or whatever method). It opens to the foreground and takes focus as it should. Then when you open another terminal it also pops up to the foreground and takes focus. This behavior is expected, no complaints here, BUT here comes the bug:
While having your browser open (I use Firefox), open a terminal (which takes focus in the foreground as it should) and then put focus back to the browser and from there fire up a new terminal, it opens in the background (red bounch animation in the dock)! This is very annoying and can hardly be a feature?
This bug is also SOMETIMES present when having Firefox open and firing up Chromium. Sometimes Chromium pops to the foreground as it should, sometimes it doesn't. Don't have any more detailed info off the top of my head but can't seem to recall any other app pair behaving like this, at least often enough to annoy me.
Note: I have my dock on autohide (which doesn't seem to matter, I just reproduced the bug with "hide on maximize").
Summary:
open terminal -> open another terminal = WORKS (the second terminal takes focus)
open terminal -> open another app -> open another terminal = DOESN'T (the second terminal opens in background)
Related branches
- Rico Tzschichholz: Needs Fixing on 2016-05-21
-
Diff: 12 lines (+3/-0)1 file modifiedsrc/WindowListener.vala (+3/-0)
- Gala developers: Pending requested 2016-11-21
-
Diff: 18 lines (+8/-0)1 file modifiedsrc/WindowManager.vala (+8/-0)
| oscarfroberg (oscarfroberg) wrote : | #1 |
| Oktay Acikalin (oktay-acikalin) wrote : | #2 |
Problem is, that I can reproduce this bug with every app which can handle multiple windows and open them using shortcuts or other means. For example open Sublime Text 3, open a terminal and run subl -n ~/.bashrc. This opens a second window of sublime but does not pull it to the front. It just opens the window in the background. I like the idea and it would perhaps make sense in some ways, but by default its kind of annoying.
| Diego Castro (diego-castro) wrote : | #3 |
This bug happens with with every app. It is very annoying to open an app and have to click on it on plank.
| goroskob (goroskob) wrote : | #4 |
It also happens when restoring application from tray icon.
| Niclas Åhdén (niclas-c) wrote : | #5 |
| summary: |
- New windows sometimes open in the background + New windows sometimes open in the background [$50] |
| Changed in elementaryos: | |
| status: | New → Confirmed |
| Changed in gala: | |
| status: | New → Confirmed |
The user watching_cat added another $15 to the bounty making it $65.
| summary: |
- New windows sometimes open in the background [$50] + New windows sometimes open in the background [$65] |
This issue also occurs with particular programs that switch to a running process when started. e.g. Transmission will stay minimized when it is started while already running.
Midori also shows strange behavior when started while minimized; It will bring the minimized instance to the foreground, then start a new browser window, and then minimize both browser windows.
| oscarfroberg (oscarfroberg) wrote : | #8 |
Unfortunately this behavior was so annoying that I switched from eOS a week or two after posting this bug. The priorities of the dev team aren't exactly in order if they are working on new features for the next release instead of tweaking the current one that has huge bugs like these, which shouldn't even be hard to fix.
On the other hand, yes, they are a small team with limited resources, but I will not look forwards to nor can I recommend this or the next release to my Linux noob friends (or anyone else for that matter) if the quality of support for current releases is going to be like this.
By the way, is it known if this affects all users or just some?
| Tom Beckmann (tombeckmann) wrote : | #9 |
Sorry for your inconvenience. Unfortunately the source of this bug are very deep in gtk code, it's not actually related to gala. Thanks to the guys over at GNOME it looks like we got this fixed in gtk now or soon https:/
| Changed in gala: | |
| status: | Confirmed → In Progress |
| Niclas Åhdén (niclas-c) wrote : | #10 |
Thanks Tom, it's really great that you're working on it.
| marianitn (marianitn) wrote : | #11 |
Just FYI, this bug is still present on freya-beta1 with GTK 3.12.2. Will this bug be targeted for freya?
| PerfectCarl (name-is-carl) wrote : | #12 |
This issue may be the root cause of https:/
The noise bug must be retested once this issue is fixed.
| Oktay Acikalin (oktay-acikalin) wrote : | #13 |
Tom, do you mind knocking at the GNOME peoples door again? I don't understand why the bug report over there has been marked as resolved and invalid...
| Brandon Taylor (raisonbran648) wrote : | #14 |
I can recreate this error with all applications.
Step 1: Maximize a window.
Step 2: Minimize a different window.
Step 3: Open a window of the same grouping that is currently minimized.
The new window will open minimized.
The desired action is the new window opening to the very front, on top of the maximized window.
| Ash (ash1991) wrote : | #15 |
Just to make reproducing steps more accurate:
Step 1: Maximize a window.
Step 2: Minimize a different window.(make sure it's not maximized first -> unmaximize it first)
Step 3: Open a window of the same grouping that is currently minimized.
The new window will open minimized.
The desired action is the new window opening to the very front, on top of the maximized window.
| Robert Orzanna (orschiro) wrote : | #16 |
I can confirm this issue.
For example, if I click on an email address (mailto link) in Chromium, then my Thunderbird compose window opens behind Chromium but not in the foreground. I believe this is not the desired behaviour.
Something similar is happening with Terminal windows. They sometimes open in the very background and I have to use Super + W to find them.
I am using Freya Beta 2 with the latest installed updates from unstable.
| Ruchir (ruchir-brahmbhatt) wrote : | #17 |
I can confirm this too. Most apps always opens in background. Usually I have chromium running maximized. When I need to access file manager, terminal, skype or other apps from plank, they mostly open in background and then I have click respective icon again to bring the app to foreground.
| roberto (robbbbye) wrote : | #18 |
(freya stable) I have a similar error:
When I download a thing in chrome and I click on "show in folder" it'll open the window/tab in background, so I get a red dot under Files icon in Plank and only if I open it I can see the file.
I guess that is related to this two too:
1.(When Files is opened but it's minimized) Click with the right button of the mouse on Files > "new tab". This time I don't get a red dot but it'll open the new tab again in backgrond
2.(When Files is opened but it's minimized) Click with the right button of the mouse on System Settings > click on one of the things available (for example let's say "personal" > "application") again, It'll open in background the "application" tab but in background!
| roberto (robbbbye) wrote : | #19 |
In the previous comment at the "2." point I wanted to write -> (when System Settings is opened but it's minimized)
| Xander (xander-deseyn) wrote : | #20 |
Can confirm this is still happening, on a fresh install. I saw that the bug in GTK was fixed in the remote bug tracker, any idea when we will get the fix?
| Espen Hovlandsdal (a-espen) wrote : | #21 |
This bug is really annoying - anything we can do to get this fix in elementary? Contributed to the bounty on this, in case that helps.
| davidak (davidak) wrote : | #22 |
I still have this bug with the Screenshot app and Chromium.
| Dave (dav666666) wrote : | #23 |
I can't believe this is still open, it's been two years since the original bug report. I can confirm Chromium is still affected by this issue, as it's the reason I came here in the first place.
| Jasper St. Pierre (jstpierre) wrote : | #24 |
Hi. I'm the developer of mutter. Can anybody give me *concrete* steps to reproduce this issue? I tried the terminal shortcut steps above and it worked fine.
I unfortunately can't test on actual Elementary OS, but I can see if the same steps break on upstream mutter or GNOME. If they don't, it might be fixed in the latest upstream mutter, and would be fixed by a rebase to mutter 3.16.
| Jasper St. Pierre (jstpierre) wrote : | #25 |
Managed to reproduce this. Ugh. It's a complicated issue going back for years.
The best technical explanation I can find is https:/
I'll talk to Owen, Ryan and Alex about this on Monday to see if we can come up with some ideas about this. Perhaps "any windows launched from within a GtkApplication command_line / open / activate handler shouldn't get a global user timestamp" is acceptable.
| Jasper St. Pierre (jstpierre) wrote : | #26 |
A new bug and temporary patches have been filed at https:/
| Dave (dav666666) wrote : | #27 |
Thank you for looking into this ! Don't forget to remind them about the bounty, it is currently at $100 on bountysource ! ;-)
| Luke Berner (lukeber4) wrote : | #28 |
Hi all. I don't know if this 'solves' the issue, but worked for me:
http://
Maybe it can help you with a true solution.
Cheers,
L.
| Jasper St. Pierre (jstpierre) wrote : | #29 |
The GTK+ side of the bug has been fixed. This does *not* guarantee that all cases of this are fixed, simply that the one that I investigated: Chromium launching other apps.
If you guys are still seeing this after the GTK+ patch has landed, *please* give me a set of step-by-step instructions to reproduce it.
| Changed in elementaryos: | |
| milestone: | none → loki-beta1 |
| Changed in gala: | |
| milestone: | none → loki-beta1 |
| Changed in elementaryos: | |
| importance: | Undecided → High |
| Changed in gala: | |
| importance: | Undecided → High |
| Adrián Carreño (adriancarreno-d) wrote : | #30 |
Hello everybody.
It's been more than 2 years since this bug was reported and I can confirm it still persists. I have elementary OS 0.3.1 Freya (64-bit), and almost every time I open Geary from Plank or the notification area while other program is maximized and focused (I tried with Chrome, Wolfram Mathematica, Pantheon Files and many others), it opens in background. Same thing when trying to open Spotify from tray.
The funny thing is that when Geary wasn't maximized on last execution, it launches on foreground even with other programs maximized and focused.
Any ideas on how to fix that?
| Changed in gala: | |
| status: | In Progress → Confirmed |
| Zisu Andrei (matzipan) wrote : | #31 |
This issue still manifests in Loki.
| Jakub Klos (9v-ka2ub-3y) wrote : | #32 |
I can also confirm it still occurs on Elementary 0.3.2
Reproduction is simple
1. Using Pantheon terminal
- start terminal
- run gedit
- focus some other window
- start another tab or window of the terminal
- run gedit
it opens a new tab but does not focus the gedit app
(if you however run gedit from the Applications menu it works)
2. Using Applications menu and Chrome
- start Chrome from Applications menu
- focus another window
- start Chrome again
the new window stays in the background
I love elementary but this is becoming really serious
Thank you
| summary: |
- New windows sometimes open in the background [$65] + New windows sometimes open in the background [$130] |
| tags: | added: bounty |
| Changed in gala: | |
| milestone: | loki-beta1 → none |
| Changed in elementaryos: | |
| milestone: | loki-beta1 → loki+1-beta1 |
| summary: |
- New windows sometimes open in the background [$130] + New windows sometimes open in the background [$140] |
Does Loki+1 mean this has been triaged?
| summary: |
- New windows sometimes open in the background [$140] + New windows sometimes open in the background [$160] |
Running the new Loki release and the problem exists.
But I have only reproduced the problem with the App center and Pantheon Terminal.
Basically if you have another window open before you open the pantheon-terminal or app center
the focus is still on the previously open window/application.
However if there are no other windows/apps open or if all other windows are minimized to Plank the focus works.
| summary: |
- New windows sometimes open in the background [$160] + New windows sometimes open in the background [$175] |
I can't reproduce any of these scenarios on Loki 0.4 (x64).
1. Open Terminal (Super + T).
2. Focus on another window.
3. Open another Terminal (Super + T)
= Second Terminal window opens in foreground.
1. Open Terminal (Super + T).
2. Run gedit.
3. Focus on another window.
4. Open new Terminal window or add new tab to existing Terminal window.
5. Run gedit.
= New tab in gedit opens, and gedit is brought to foreground.
I've reproduced these and all the others on this page, but none of them result the same behavior. Bug fixed?
| Zisu Andrei (matzipan) wrote : | #36 |
Joshua, this issue is still present.
| hotovo (hotovo) wrote : | #37 |
Any yupdate on this? It's bug with most heat, with bounty and here for years and it is still not fixed? What is a problem?
| Adam Bieńkowski (donadigo) wrote : | #38 |
hotovo: there is some discussion going on right now in our private Slack channel. This is the current branch that gets discussed: https:/
| hotovo (hotovo) wrote : | #39 |
Hi Adam , thank you for a quick response. So does it mean it should be fixed soon rather then in OS juno-beta1?
| summary: |
- New windows sometimes open in the background [$175] + New windows sometimes open in the background [$180] |
| Justin T (teetron9k) wrote : | #40 |
I can confirm this bug (4 years old) still persists in the latest release (0.4.1).
The overall impact on user experience... if you haven't personally experienced it, then, frankly: you are not able to comprehend how uniquely maddening it is.
I have an (unusually) high tolerance for terrible user interfaces -- I'm a long-time Linux user, after all -- but this...
Somehow, this "minor" (and I mean it: in the grand scheme of things, I really would call this minor) bug causes unending existential dismay in the hearts of all who experience it. (I'm not a psychologist, but I imagine it must involve the perverse, inexplicable differences between the expected and actual outcomes.)
Any fix? ETA?
| Jasper St. Pierre (jstpierre) wrote : | #41 |
Just to double check, you are launching the terminal with the proper launch API (g_app_launch with a GdkAppLaunchCon


I installed gnome-terminal yesterday and set it as the default terminal, which made the problem go away. It would seem that the behavior is directly related to pantheon-terminal.