Keep mouse cursor state sane on focus change in Quartz driver.
Fixes Bugzilla #12. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401564
This commit is contained in:
parent
625655e271
commit
8e0454b5e9
1 changed files with 6 additions and 0 deletions
|
@ -627,6 +627,12 @@ static void QZ_DoActivate (_THIS)
|
||||||
QZ_PrivateWarpCursor (this, cursor_loc.x, cursor_loc.y);
|
QZ_PrivateWarpCursor (this, cursor_loc.x, cursor_loc.y);
|
||||||
QZ_ChangeGrabState (this, QZ_ENABLE_GRAB);
|
QZ_ChangeGrabState (this, QZ_ENABLE_GRAB);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
/* Update SDL's mouse location */
|
||||||
|
NSPoint p;
|
||||||
|
QZ_GetMouseLocation (this, &p);
|
||||||
|
SDL_PrivateMouseMotion (0, 0, p.x, p.y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void QZ_DoDeactivate (_THIS) {
|
static void QZ_DoDeactivate (_THIS) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue