mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-07 07:24:20 +00:00
Windows: Make sure AWTInputAdapter is not reporting events twice after a grab change
This commit is contained in:
parent
5d6ae4138a
commit
d75d00666a
4 changed files with 86 additions and 20 deletions
|
|
@ -115,9 +115,15 @@ final class WindowsAWTInput extends AbstractAWTInput {
|
|||
private void grab(boolean grab) {
|
||||
if (has_grabbed != grab) {
|
||||
cached_mouse.grab(grab);
|
||||
cached_keyboard.grab(grab);
|
||||
has_grabbed = grab;
|
||||
if (!grab)
|
||||
cached_mouse.flush();
|
||||
cached_keyboard.flush();
|
||||
getMouseEventQueue().clearEvents();
|
||||
getKeyboardEventQueue().clearEvents();
|
||||
if (!grab) {
|
||||
getCanvas().setCursor(cached_cursor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue