Added calls to nUpdate() before querying window state
This commit is contained in:
parent
456a948195
commit
4d8c6ea421
|
@ -406,6 +406,7 @@ public final class Display {
|
||||||
public static boolean isCloseRequested() {
|
public static boolean isCloseRequested() {
|
||||||
if (!isCreated())
|
if (!isCreated())
|
||||||
throw new IllegalStateException("Cannot determine close requested state of uncreated window");
|
throw new IllegalStateException("Cannot determine close requested state of uncreated window");
|
||||||
|
nUpdate();
|
||||||
return nIsCloseRequested();
|
return nIsCloseRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -417,6 +418,7 @@ public final class Display {
|
||||||
public static boolean isVisible() {
|
public static boolean isVisible() {
|
||||||
if (!isCreated())
|
if (!isCreated())
|
||||||
throw new IllegalStateException("Cannot determine minimized state of uncreated window");
|
throw new IllegalStateException("Cannot determine minimized state of uncreated window");
|
||||||
|
nUpdate();
|
||||||
return nIsVisible();
|
return nIsVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -428,6 +430,7 @@ public final class Display {
|
||||||
public static boolean isActive() {
|
public static boolean isActive() {
|
||||||
if (!isCreated())
|
if (!isCreated())
|
||||||
throw new IllegalStateException("Cannot determine focused state of uncreated window");
|
throw new IllegalStateException("Cannot determine focused state of uncreated window");
|
||||||
|
nUpdate();
|
||||||
return nIsActive();
|
return nIsActive();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -446,6 +449,7 @@ public final class Display {
|
||||||
public static boolean isDirty() {
|
public static boolean isDirty() {
|
||||||
if (!isCreated())
|
if (!isCreated())
|
||||||
throw new IllegalStateException("Cannot determine dirty state of uncreated window");
|
throw new IllegalStateException("Cannot determine dirty state of uncreated window");
|
||||||
|
nUpdate();
|
||||||
return nIsDirty();
|
return nIsDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -642,7 +646,8 @@ public final class Display {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reset display mode if fullscreen. This method is also called from the shutdown hook added in Sys
|
* Reset display mode if fullscreen. This method is also called from the shutdown hook added
|
||||||
|
* in the static constructor
|
||||||
*/
|
*/
|
||||||
private static void reset() {
|
private static void reset() {
|
||||||
if (fullscreen)
|
if (fullscreen)
|
||||||
|
|
Loading…
Reference in New Issue