fix(mac): prevent cursor warps from outside quartz event loop (if active)
This commit is contained in:
parent
c3ecd0b806
commit
44c5c15082
1 changed files with 8 additions and 0 deletions
|
|
@ -262,6 +262,14 @@ uint32_t OSXScreen::activeSides()
|
|||
|
||||
void OSXScreen::warpCursor(int32_t x, int32_t y)
|
||||
{
|
||||
if (m_eventTapRunLoop && CFRunLoopGetCurrent() != m_eventTapRunLoop) {
|
||||
CFRunLoopPerformBlock(m_eventTapRunLoop, kCFRunLoopDefaultMode, ^{
|
||||
warpCursor(x, y);
|
||||
});
|
||||
CFRunLoopWakeUp(m_eventTapRunLoop);
|
||||
return;
|
||||
}
|
||||
|
||||
// move cursor without generating events
|
||||
CGPoint pos;
|
||||
pos.x = x;
|
||||
|
|
|
|||
Loading…
Reference in a new issue