mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 06:25:46 +00:00
Mac OS X: Synchronized access to grabbed state
This commit is contained in:
parent
710d56fe55
commit
52b5958191
1 changed files with 5 additions and 1 deletions
|
|
@ -62,12 +62,16 @@ final class MacOSXMouseEventQueue extends MouseEventQueue {
|
|||
public void setGrabbed(boolean grab) {
|
||||
super.setGrabbed(grab);
|
||||
warpCursor();
|
||||
grabMouse(grab);
|
||||
}
|
||||
|
||||
private static synchronized void grabMouse(boolean grab) {
|
||||
if (is_grabbed != grab) {
|
||||
is_grabbed = grab;
|
||||
nGrabMouse(grab);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void resetCursorToCenter() {
|
||||
super.resetCursorToCenter();
|
||||
/* Clear accumulated deltas */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue