VirtualBox

Changeset 77668 in vbox for trunk


Ignore:
Timestamp:
Mar 12, 2019 4:09:20 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
129302
Message:

FE/Qt: Send pointer out of range events to Main.
bugref:9376: Complete hardware cursor implementation in VMSVGA
When the host pointer leaves the GUI window tell Main that it is out of range,
so that the device can hide the cursor if appropriate and if it is drawing it
in software.

File:
1 edited

Legend:

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

    r76606 r77668  
    632632                    break;
    633633                }
     634#endif /* VBOX_WS_MAC */
     635#ifdef VBOX_WS_MAC
     636                case QEvent::Enter:
     637                {
     638                    /* Disable mouse event compression if we enter the VM view.
     639                     * So all mouse events are registered in the VM.
     640                     * Only do this if the keyboard/mouse is grabbed
     641                     * (this is when we have a valid event handler): */
     642                    if (machineLogic()->keyboardHandler()->isKeyboardGrabbed())
     643                        darwinSetMouseCoalescingEnabled(false);
     644                    break;
     645                }
     646#endif /* VBOX_WS_MAC */
     647                case QEvent::Leave:
     648#ifdef VBOX_WS_MAC
     649                {
     650                    /* Enable mouse event compression if we leave the VM view.
     651                     * This is necessary for having smooth resizing of the VM/other windows: */
     652                    ::darwinSetMouseCoalescingEnabled(true);
     653
     654                    /* This event should be also processed using next 'case': */
     655                }
     656                RT_FALL_THRU();
    634657#endif /* VBOX_WS_MAC */
    635658                case QEvent::MouseMove:
     
    713736                    }
    714737
     738                    /* Send a pointer-out-of-range event if necessary: */
     739                    if (!pHoveredWidget &&
     740                        uisession()->isMouseSupportsAbsolute() &&
     741                        uisession()->isMouseIntegrated())
     742                    {
     743                        mouse().PutMouseEventAbsolute(0x7FFFFFFF, 0x7FFFFFFF, 0, 0, 0);
     744                        break;
     745                    }
     746
    715747                    /* This event should be also processed using next 'case': */
    716748                }
     
    773805                    break;
    774806                }
    775 #ifdef VBOX_WS_MAC
    776                 case QEvent::Leave:
    777                 {
    778                     /* Enable mouse event compression if we leave the VM view.
    779                      * This is necessary for having smooth resizing of the VM/other windows: */
    780                     ::darwinSetMouseCoalescingEnabled(true);
    781                     break;
    782                 }
    783                 case QEvent::Enter:
    784                 {
    785                     /* Disable mouse event compression if we enter the VM view.
    786                      * So all mouse events are registered in the VM.
    787                      * Only do this if the keyboard/mouse is grabbed
    788                      * (this is when we have a valid event handler): */
    789                     if (machineLogic()->keyboardHandler()->isKeyboardGrabbed())
    790                         darwinSetMouseCoalescingEnabled(false);
    791                     break;
    792                 }
    793 #endif /* VBOX_WS_MAC */
    794807#ifdef VBOX_WS_WIN
    795808                case QEvent::Resize:
Note: See TracChangeset for help on using the changeset viewer.

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