diff --git a/editor/src/main/java/io/github/rosemoe/sora/widget/base/EditorPopupWindow.java b/editor/src/main/java/io/github/rosemoe/sora/widget/base/EditorPopupWindow.java index 62a22a8c6..a9ece3bb4 100644 --- a/editor/src/main/java/io/github/rosemoe/sora/widget/base/EditorPopupWindow.java +++ b/editor/src/main/java/io/github/rosemoe/sora/widget/base/EditorPopupWindow.java @@ -63,7 +63,6 @@ public class EditorPopupWindow { private final int features; private final int[] locationBuffer = new int[2]; private final EventReceiver scrollListener; - private boolean showState; private boolean registerFlag; private boolean registered; private View parentView; @@ -154,7 +153,7 @@ public void unregister() { } public boolean isShowing() { - return showState; + return getPopup().isShowing(); } /** @@ -269,19 +268,17 @@ public void setLocationAbsolutely(int x, int y) { * Show the window if appropriate */ public void show() { - if (showState) { + if (isShowing()) { return; } applyWindowAttributes(true); - showState = true; } /** * Dismiss the window */ public void dismiss() { - if (showState) { - showState = false; + if (isShowing()) { window.dismiss(); } }