Community
Participate
Working Groups
Not sure if this is an eclipse or gnome problem. I've tried both 1.4.1 jdk and 1.5 so I don't think its a java issue. It is easily reproducable on my machine but may not be on other systems. I have eclipse 3.1.1 on fedora 4 with gnome 2.10.0 I am using focus follows mouse. If I hit Ctrl-Shift-R and open the open resource window, if I then cross the open resource window boundry with the mouse before hitting enter on the resource I am opening, when the open resource window closes, focus jumps to my other monitor. I don't know if this is an eclipse bug, but any pointers as to how to figure out the cause of this or how to fix it would be great since it's driving me nuts. Thanks, Alex. Ps. maybe my multi desktop setting have something to do with it? In xorg.conf I have : Section "ServerLayout" Identifier "Multihead layout" Screen 0 "Screen0" LeftOf "Screen1" Screen 1 "Screen1" 0 0 InputDevice "Mouse0" "CorePointer" InputDevice "Keyboard0" "CoreKeyboard" Option "Xinerama" "off" Option "Clone" "on"
metacity in 2.10 has some focus-stealing prevention code which is tricky, so this is likely related. Presumably it does not happen in click-to-focus mode :)
I cannot reproduce any weirdness here with the open-resource dialog and focus-follows-mouse mode. On my FC4 machine, I have metacity-2.10.3-1. Which version do you have installed? Also, can you give clearer steps regarding the problem? What exactly is the sequence of events that triggers this? When your mouse leaves the open resource window, where does it go? Is it still above Eclipse? When you say that focus jumps to your other monitor, where on the other monitor does it go, exactly?
I appear to have metacity-2.10.0-2.fc4 To reproduce I have eclipse in java perspective. I am editing a file and the eclipse window and editor have focus. I hit Ctrl-Shift-R, locate another file, hit return and when the window goes away my focus instead of going to the editor with the new file, jumps to the other monitor and firefox or whatever window is on my second screen becomes active. The mouse pointer stays in the eclipse editor but my keystrokes go to the firefox window. Originally I thought this was occasionally happening. Then I figured out that the trick for my system to get it to happen was to make sure that my mouse pointer was in the editor but not overlapping with the open resource window when it pops up. Then after it pops up I move the mouse into the open resource window ( like when I have to select which resource of a bunch named the same with the mouse) then when I hit return I lose the focus. If my mouse does not cross the window boundry, before closing the window, things work fine. It's like the follow focus triggers some event which gets suppressed because the open resource window already has focus but then when it closes something weird happens. Alex.
Please get the latest update for metacity from FC4, I cannot reproduce this here and I am pretty sure it is a bug in 2.10.0 that is fixed in 2.10.3.
Created attachment 226400 [details] Dual monitor setup screenshot
I realize that this is several years after the fact, but I'm experiencing the same issue. My setup consists of Ubuntu 12.04.1 LTS and Eclipse Juno build 20121004-1855. Similar to Alex, I'm running a dual monitor setup with the main editor window on one monitor and several views on the other (see attachment). The cursor and focus is in the main editor window, however, when I open a resource (Ctrl + Shift + R) and hit enter, the resource is opened, but the focus moves from the editor to a different view (in the case of screenshot, to the package explorer). If you need any additional information, please let me know, and I would be happy to provide it.
Regarding my last comment, if it helps to note, this is a recent Ubuntu installation, so aside from Eclipse, it is a standard, vanilla setup.
I'm experiencing the same issue with Kepler on a fresh Ubuntu Trusty install. The Eclipse window loses focus after closing any dialog (e.g. "Open Resource", "Open Type", etc.). I've turned "focus prevention level" to off in Compiz, but it doesn't fix the situation.
Actually, I think my issue may be being caused by the Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1125442
Eric, I am experiencing exactly the same issue as you with Eclipse 4.4 on a fresh install of Ubuntu Trusty, did you find a workaround? Apparently the issue goes away if I set the focus prevention level to "Very High" but the side effects make the rest of the environment unusable (e.g. when you launch a new application, it does not get the focus!). The Launchpad issue you are referring to does not seem related for me: it concerns focus stealing when switching workspaces, which is not the case here. I think the main issue is that when you detach a view in Eclipse, it becomes a (non-modal) dialog, and dialogs are always on top of their main window. BTW this is also annoying when you disconnect your secondary screen: the detached views come above the main window, so you have to hide them or move them around if you want to see the main window again (I have observed this on both Ubuntu and Windows).
Didier, Are you, by chance, using the Google Chrome Hangouts extension? I believe I worked around the issue by unchecking the "Keep hangouts on top of other windows" checkbox.
No I'm not, but this issue does not seem to be related to other running applications…
This issue can be reproduced by the following steps: 1. Open Eclipse 2. Open another application window (e.g. gnome-terminal) 3. Set the other application window as "Always on top" 4. Switch back to Eclipse 5. Open a modal dialog in Eclipse (e.g. 'Open Type') 6. Close the modal dialog Expected behavior: Focus is returned to the parent Eclipse window Actual behavior: Focus is shifted to the "Always on top" window (gnome-terminal in my example)
OK I'm figuring my issue is similar but a little bit different though. Actually it is more like Bryan Parker's in comment #6 (maybe I made a mistake in my first comment). I don't know whether those 2 issues are related, maybe a separate bug report should be created. Anyway, here are the steps to reproduce it: 1) detach any view (e.g. the console) from the main eclipse window 2) hit ctrl+shift+r to open the resource dialog 3) select any resource and validate the dialog (with the keyboard) Expected result: focus goes to the newly open editor Actual result: focus goes to the detached view, and you have to press F12 to give it to the new editor Also, the detached views are always shown on top of the main window, which is really annoying when you change the screen configuration or when you want to move windows around.
(In reply to Didier Loiseau from comment #14) > OK I'm figuring my issue is similar but a little bit different though. > Actually it is more like Bryan Parker's in comment #6 (maybe I made a > mistake in my first comment). I don't know whether those 2 issues are > related, maybe a separate bug report should be created. > > Anyway, here are the steps to reproduce it: > 1) detach any view (e.g. the console) from the main eclipse window > 2) hit ctrl+shift+r to open the resource dialog > 3) select any resource and validate the dialog (with the keyboard) > > Expected result: focus goes to the newly open editor > > Actual result: focus goes to the detached view, and you have to press F12 to > give it to the new editor > > Also, the detached views are always shown on top of the main window, which > is really annoying when you change the screen configuration or when you want > to move windows around. I get this same odd behaviour. Focus always go the detached view instead of editor after a dialog is closed.
As I suspect this may be a Unity bug (I could not reproduce it on Gnome 3, KDE, LXDE), I reported a bug on launchpad: https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1459671, please vote it up if it affects you.
(In reply to Guilherme Melo from comment #16) > As I suspect this may be a Unity bug (I could not reproduce it on Gnome 3, > KDE, LXDE), I reported a bug on launchpad: > https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1459671, please vote it > up if it affects you. Thanks Guilherme. It may be a unity bug, however, I've yet to experience this behavior in any other multi-window application -- just Eclipse.
(In reply to Eric Sirianni from comment #17) > (In reply to Guilherme Melo from comment #16) > > As I suspect this may be a Unity bug (I could not reproduce it on Gnome 3, > > KDE, LXDE), I reported a bug on launchpad: > > https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1459671, please vote it > > up if it affects you. > > Thanks Guilherme. It may be a unity bug, however, I've yet to experience > this behavior in any other multi-window application -- just Eclipse. Well, I just tested it with gimp alone, and the same problem occurs on Unity only.
It's not a Unity bug. I'm experiencing the same behavior on Ubuntu Gnome 16.04 (Gnome Shell version = 3.18).
(In reply to Noam Cohen from comment #19) > It's not a Unity bug. I'm experiencing the same behavior on Ubuntu Gnome > 16.04 (Gnome Shell version = 3.18). Hi Noam, as I detailed on the bug report, I found a line of code on compiz which is responsible for this wrong behaviour. It seems this code is only executed when not using compiz' window manager. Unity has its own window manager and I guess that now Gnome3 has one two. Unfortunately I got no response on the bug report and could not contact any compiz developer to find out what would be the right fix. I think that if eclipse used normal windows instead of floating docks this problem would not happen. So maybe an option on eclipse to change the type of the docks would be a workaround
I have the very same issue with Ubuntu 16.10 (GTK 3) and eclipse Neon. As a workaround I've configure eclipse to use GTK 2 as below: ``` openFile --launcher.GTK_version 2 ``` Hope it helps.
I'm having the same issue running Slackware64 14.2, i3wm and eclipse on gtk3. I'm also using two monitors.
(In reply to Hugo Eustáquio from comment #22) > I'm having the same issue running Slackware64 14.2, i3wm and eclipse on gtk3. > I'm also using two monitors. I forgot, my eclipse is Oxygen.2, recently updated.
(In reply to Hugo Eustáquio from comment #23) > (In reply to Hugo Eustáquio from comment #22) > > I'm having the same issue running Slackware64 14.2, i3wm and eclipse on gtk3. > > I'm also using two monitors. > > I forgot, my eclipse is Oxygen.2, recently updated. Also, it's not happening with every editor. It works correctly opening '.java' files. This bug is affecting xhtml, html, jsp, properties and xml editors.
I cannot reproduce the issue on Fedora 28. Please reopen this ticket if the issue reoccurs. Version: 4.9 Build id: I20180712-2000 OS: Linux, v.4.17.3-200.fc28.x86_64, x86_64 / gtk 3.22.30, WebKit 2.20.3 Java version: 1.8.0_172
Same issue. XUbuntu 18 Oxygen.2 Most obvious on dialog like preferences. Forcing GTK2 seems to solve it.