mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-06 06:53:59 +00:00
Linux: When creating a window don't loop waiting for the MapNotify event. Instead, make sure we don't immediately go from fullscreen to minimized by checking if the window has been focused at least once before minimizing (and resetting display mode).
This commit is contained in:
parent
a5c8a3d6af
commit
4bf4a385f3
2 changed files with 4 additions and 9 deletions
|
|
@ -110,6 +110,7 @@ final class LinuxDisplay implements DisplayImplementation {
|
|||
private boolean minimized;
|
||||
private boolean dirty;
|
||||
private boolean close_requested;
|
||||
private boolean focused_at_least_once;
|
||||
private long current_cursor;
|
||||
private long blank_cursor;
|
||||
|
||||
|
|
@ -398,6 +399,7 @@ final class LinuxDisplay implements DisplayImplementation {
|
|||
pointer_grabbed = false;
|
||||
keyboard_grabbed = false;
|
||||
close_requested = false;
|
||||
focused_at_least_once = false;
|
||||
grab = false;
|
||||
minimized = false;
|
||||
dirty = true;
|
||||
|
|
@ -750,8 +752,9 @@ final class LinuxDisplay implements DisplayImplementation {
|
|||
private void checkInput() {
|
||||
focused = nGetInputFocus(getDisplay()) == getWindow();
|
||||
if (focused) {
|
||||
focused_at_least_once = true;
|
||||
acquireInput();
|
||||
} else {
|
||||
} else if (focused_at_least_once) {
|
||||
releaseInput();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue