VirtualBox

Changeset 22446 in vbox for trunk/src


Ignore:
Timestamp:
Aug 25, 2009 8:40:15 PM (15 years ago)
Author:
vboxsync
Message:

Additions/WINNT: re-enable the host mouse cursor when the guest requests it

Location:
trunk/src/VBox/Additions/WINNT/Graphics
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/pointer.c

    r22412 r22446  
    116116    else
    117117    {
    118         NewPointerPosition.Column = (SHORT) x - (SHORT) (ppdev->ptlHotSpot.x);
    119         NewPointerPosition.Row    = (SHORT) y - (SHORT) (ppdev->ptlHotSpot.y);
    120 
    121         //
    122         // Call miniport driver to move Pointer.
    123         //
    124 
    125118        if (EngDeviceIoControl(ppdev->hDriver,
    126                                IOCTL_VIDEO_SET_POINTER_POSITION,
    127                                &NewPointerPosition,
    128                                sizeof(VIDEO_POINTER_POSITION),
     119                               IOCTL_VIDEO_ENABLE_POINTER,
     120                               NULL,
     121                               0,
    129122                               NULL,
    130123                               0,
     
    135128            //
    136129
    137             DISPDBG((1, "DISP vMoveHardwarePointer failed IOCTL_VIDEO_SET_POINTER_POSITION\n"));
     130            DISPDBG((1, "DISP vMoveHardwarePointer failed IOCTL_VIDEO_ENABLE_POINTER\n"));
    138131        }
    139132    }
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp

    r22444 r22446  
    15831583            dprintf(("VBoxVideo::VBoxVideoStartIO: IOCTL_VIDEO_ENABLE_POINTER\n"));
    15841584            // find out whether the host wants absolute positioning
    1585             if (vboxQueryHostWantsAbsolute())
     1585            if (   DEV_MOUSE_HIDDEN((PDEVICE_EXTENSION)HwDeviceExtension)
     1586                && vboxQueryHostWantsAbsolute())
    15861587            {
    15871588                // tell the host to use the guest's pointer
     
    15991600#endif /* VBOX_WITH_HGSMI */
    16001601
    1601                 if (!Result)
     1602            if (Result)
     1603                    DEV_SET_MOUSE_SHOWN((PDEVICE_EXTENSION)HwDeviceExtension);
     1604                else
    16021605                    dprintf(("VBoxVideo::VBoxVideoStartIO: Could not hide hardware pointer -> fallback\n"));
     1606
    16031607            } else
    16041608            {
     
    16311635#endif /* VBOX_WITH_HGSMI */
    16321636
    1633                 if (!Result)
     1637                if (Result)
     1638                    DEV_SET_MOUSE_HIDDEN((PDEVICE_EXTENSION)HwDeviceExtension);
     1639                else
    16341640                    dprintf(("VBoxVideo::VBoxVideoStartIO: Could not hide hardware pointer -> fallback\n"));
    16351641            } else
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h

    r22444 r22446  
    127127           ULONG ulMaxFrameBufferSize;         /* The size of the VRAM allocated for the a single framebuffer. */
    128128
     129           BOOLEAN fMouseHidden;               /* Has the mouse cursor been hidden by the guest? */
     130
    129131#ifndef VBOX_WITH_HGSMI
    130132           ULONG ulDisplayInformationSize;     /* The size of the Display information, which is at offset:
     
    162164#endif /* VBOX_WITH_HGSMI */
    163165} DEVICE_EXTENSION, *PDEVICE_EXTENSION;
     166
     167#define DEV_MOUSE_HIDDEN(dev) ((dev)->pPrimary->u.primary.fMouseHidden)
     168#define DEV_SET_MOUSE_HIDDEN(dev)   \
     169do { \
     170    (dev)->pPrimary->u.primary.fMouseHidden = TRUE; \
     171} while (0)
     172#define DEV_SET_MOUSE_SHOWN(dev)   \
     173do { \
     174    (dev)->pPrimary->u.primary.fMouseHidden = FALSE; \
     175} while (0)
    164176
    165177extern "C"
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