VirtualBox

Changeset 66278 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 28, 2017 7:23:13 AM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8773: macOS: Workaround for a mouse input events lag.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp

    r65653 r66278  
    688688#endif /* VBOX_WS_MAC */
    689689                case QEvent::MouseMove:
     690                {
     691#ifdef VBOX_WS_MAC
     692                    // WORKAROUND:
     693                    // Since we are handling mouse move/drag events in the same thread
     694                    // where we are painting guest content changes corresponding to those
     695                    // events, we can have input event queue overloaded with the move/drag
     696                    // events, so we should discard current one if there is subsequent already.
     697                    EventTypeSpec list[2];
     698                    list[0].eventClass = kEventClassMouse;
     699                    list[0].eventKind = kEventMouseMoved;
     700                    list[1].eventClass = kEventClassMouse;
     701                    list[1].eventKind = kEventMouseDragged;
     702                    if (AcquireFirstMatchingEventInQueue(GetCurrentEventQueue(), 2, list,
     703                                                         kEventQueueOptionsNone) != NULL)
     704                        return true;
     705#endif /* VBOX_WS_MAC */
     706                }
    690707                case QEvent::MouseButtonRelease:
    691708                {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette