VirtualBox

Changeset 55204 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 13, 2015 10:50:07 AM (10 years ago)
Author:
vboxsync
Message:

Additions/x11/vboxvideo: separate Solaris absolute mouse calibration when setting the frame-buffer dimensions into a separate function.

Location:
trunk/src/VBox/Additions/x11/vboxvideo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxvideo/setmode.c

    r55191 r55204  
    201201        FatalError("Failed to update the input mapping.\n");
    202202#endif
     203    vbvxSetSolarisMouseRange(width, height);
     204    return TRUE;
     205}
     206
     207/** Tell the virtual mouse device about the new virtual desktop size. */
     208void vbvxSetSolarisMouseRange(int width, int height)
     209{
    203210#ifdef RT_OS_SOLARIS
    204     /* Tell the virtual mouse device about the new virtual desktop size. */
    205     {
    206         int rc;
    207         int hMouse = open("/dev/mouse", O_RDWR);
    208         if (hMouse >= 0)
    209         {
    210             do {
    211                 Ms_screen_resolution Res = { height, width };
    212                 rc = ioctl(hMouse, MSIOSRESOLUTION, &Res);
    213             } while ((rc != 0) && (errno == EINTR));
    214             close(hMouse);
    215         }
    216     }
    217 #endif
    218     return TRUE;
    219 }
     211    int rc;
     212    int hMouse = open("/dev/mouse", O_RDWR);
     213
     214    if (hMouse >= 0)
     215    {
     216        do {
     217            Ms_screen_resolution Res = { height, width };
     218            rc = ioctl(hMouse, MSIOSRESOLUTION, &Res);
     219        } while ((rc != 0) && (errno == EINTR));
     220        close(hMouse);
     221    }
     222#else
     223    (void)width; (void)height;
     224#endif
     225}
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.h

    r55196 r55204  
    247247
    248248/* setmode.c */
     249extern void vbvxSetSolarisMouseRange(int width, int height);
     250
    249251extern Bool vbox_cursor_init (ScreenPtr pScreen);
    250252extern void vbox_open (ScrnInfoPtr pScrn, ScreenPtr pScreen, VBOXPtr pVBox);
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