Fix for sticky <Win> key when <Win+1>, <Win+2> are used by Linux window manager (as a windows switcher).

This commit is contained in:
Vassiliy.Kudryashov
2016-05-30 16:49:44 +03:00
committed by Aleksey Pivovarov
parent 263e2926c1
commit bf245a5625
@@ -506,7 +506,10 @@ public class IdeEventQueue extends EventQueue {
private AWTEvent mapMetaState(AWTEvent e) {
if (myWinMetaPressed) {
Application app = ApplicationManager.getApplication();
if (app == null || !app.isActive()) {
boolean weAreNotActive = app == null || !app.isActive();
weAreNotActive |=(e instanceof FocusEvent && ((FocusEvent)e).getOppositeComponent() == null);
if (weAreNotActive) {
myWinMetaPressed = false;
return e;
}