mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-218792 Skip minimised and fullscreen windows in Activate Next Window action
GitOrigin-RevId: a3f6963bdefbb9b0aef698617f3177a308c8eec5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cb6a705173
commit
ef186195cc
@@ -31,6 +31,7 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.openapi.wm.IdeFrame;
|
||||
import com.intellij.openapi.wm.WindowManager;
|
||||
import com.intellij.openapi.wm.ex.IdeFrameEx;
|
||||
import com.intellij.openapi.wm.ex.WindowManagerEx;
|
||||
import com.intellij.openapi.wm.impl.FocusManagerImpl;
|
||||
import com.intellij.ui.ComponentUtil;
|
||||
@@ -81,11 +82,17 @@ public final class IdeEventQueue extends EventQueue {
|
||||
private static void updateActivatedWindowSet() {
|
||||
for (Iterator<Window> iter = activatedWindows.iterator(); iter.hasNext(); ) {
|
||||
Window window = iter.next();
|
||||
if (!window.isVisible()) {
|
||||
if (!window.isVisible() || UIUtil.isMinimized(window) || isInFullscreen(window)) {
|
||||
iter.remove();
|
||||
}
|
||||
}
|
||||
assert !activatedWindows.isEmpty();
|
||||
// The list can be empty if all windows are in fullscreen or minimized state
|
||||
}
|
||||
|
||||
private static boolean isInFullscreen (Window window) {
|
||||
if (!(window instanceof IdeFrameEx)) return false;
|
||||
IdeFrameEx ideFrameEx = (IdeFrameEx) window;
|
||||
return ideFrameEx.isInFullScreen();
|
||||
}
|
||||
|
||||
public Window nextWindowAfter (@NotNull Window w) {
|
||||
|
||||
@@ -252,6 +252,12 @@ public final class UIUtil extends StartupUiUtil {
|
||||
return GrayFilter.namedFilter("text.grayFilter", new GrayFilter(20, 0, 100));
|
||||
}
|
||||
|
||||
public static boolean isMinimized(Window window) {
|
||||
if (!(window instanceof Frame)) return false;
|
||||
Frame frame = (Frame)window;
|
||||
return frame.getExtendedState() == Frame.ICONIFIED;
|
||||
}
|
||||
|
||||
@ApiStatus.Experimental
|
||||
public static class GrayFilter extends RGBImageFilter {
|
||||
private float brightness;
|
||||
|
||||
Reference in New Issue
Block a user