![]() ![]() So you'll only see the problem on Linux systems. See Patches.REQUEST_FOCUS_MAY_ACTIVATE_APP your operating system name starts with "linux" - I mean that quite literally.the IDEA app is currently inactive (!appImpl.isActive()) - this is a bit of IDEA's application state set by IdeEventQueue that basically tracks if it has focus or not - this is obviously the case if you have just been looking at a non-JVM window, Nautilus, etc.the Window that lost activation is unknown to Swing (getOppositeWindow() = null) - for instance, if the window was the Nautilus file browser or Firefox, any non-JVM window.the event passed to it is a WindowEvent of type WINDOW_GAINED_FOCUS (id=207) - precisely the kind we're interested in.The conditions for the processAppActivationEvents() method returning true (and therefore swallowing the event) are: If the method returns true, the method returns and the event never gets dispatched to the rest of the app - so the focus is not given to the editor in the newly activated window, and you get the irritating focus-is-in-the-other-intellij-window problem. If (processAppActivationEvents(e)) return I've checked out the IDEA source code and done some digging -it turns out the correct WINDOW_GAINED_FOCUS event is getting generated and placed onto the IdeEventQueue, but there's code that's been explicitly added to the processAppActivationEvents() method that specifically swallows this event! The line of code is this: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |