~ubuntu-branches/ubuntu/precise/virtualbox/precise-updates

« back to all changes in this revision

Viewing changes to src/VBox/Additions/x11/vboxmouse/VBoxUtils_68.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-10-17 23:23:09 UTC
  • mfrom: (3.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20111017232309-kzm6841lzk61ranj
Tags: 4.1.4-dfsg-1
* New upstream release.
  - Fixes missing icons when using pt_BR locale. (Closes: #507188)
  - Fixes guest additions download url. (Closes: #637349; LP: #840668)
* Refresh patches.
* Drop the vboxmouse x11 driver. The mouse integration is now completely
  handled by the kernel module.
* Restrict dh_pycentral to the virtualbox binary package.
* Merge changes from the Ubuntu package but use them only when built
  on Ubuntu:
  - Add an Apport hook.
  - Add vboxguest modalias to the package control field.
* Pass KBUILD_VERBOSE=2 to kmk.
* Add 36-fix-text-mode.patch to fix text mode when using the vboxvideo driver.

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
 */
90
90
int VBoxMouseInit(void)
91
91
{
92
 
    VMMDevReqMouseStatus req;
 
92
    uint32_t fFeatures;
93
93
 
94
94
    /* return immediately if already initialized */
95
95
    if (g_vboxguestHandle != -1)
114
114
    vmmdevInitRequest((VMMDevRequestHeader*)g_vmmreqMouseStatus, VMMDevReq_GetMouseStatus);
115
115
 
116
116
    /* tell the host that we want absolute coordinates */
117
 
    vmmdevInitRequest((VMMDevRequestHeader*)&req, VMMDevReq_SetMouseStatus);
118
 
    req.mouseFeatures = VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE | VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR;
119
 
    req.pointerXPos = 0;
120
 
    req.pointerYPos = 0;
 
117
    fFeatures = VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE;
121
118
/** @todo r=bird: Michael, I thought we decided a long time ago that all these should be replaced by VbglR3. I assume this is just a leftover... */
122
 
    if (ioctl(g_vboxguestHandle, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(req)), (void*)&req) < 0)
 
119
    if (ioctl(g_vboxguestHandle, VBOXGUEST_IOCTL_SET_MOUSE_STATUS, &fFeatures)
 
120
        < 0)
123
121
    {
124
122
        ErrorF("Error sending mouse pointer capabilities to VMM! rc = %d (%s)\n",
125
123
               errno, strerror(errno));
174
172
    /* If we are not initialised, there is nothing to do */
175
173
    if (g_vboxguestHandle < 0)
176
174
        return 0;
177
 
    /* tell VMM that we no longer support absolute mouse handling */
178
 
    vmmdevInitRequest((VMMDevRequestHeader*)&req, VMMDevReq_SetMouseStatus);
179
 
    req.mouseFeatures = 0;
180
 
    req.pointerXPos = 0;
181
 
    req.pointerYPos = 0;
182
 
/** @todo r=bird: Michael, ditto. */
183
 
    if (ioctl(g_vboxguestHandle, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(req)), (void*)&req) < 0)
184
 
    {
185
 
        ErrorF("ioctl to vboxguest module failed, rc = %d (%s)\n",
186
 
               errno, strerror(errno));
187
 
    }
188
 
 
 
175
    /* Tell VMM that we no longer support absolute mouse handling - done
 
176
     * automatically when we close the handle. */
189
177
    free(g_vmmreqMouseStatus);
190
178
    g_vmmreqMouseStatus = NULL;
191
179
    close(g_vboxguestHandle);