VirtualBox

Ignore:
Timestamp:
Aug 29, 2012 3:18:10 PM (12 years ago)
Author:
vboxsync
Message:

Additions/x11/vboxvideo: notify the Solaris mouse driver when we change the virtual resolution.

File:
1 edited

Legend:

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

    r43081 r43082  
    5050
    5151#ifdef XORG_7X
     52/* We include <unistd.h> for Solaris below, and the ANSI C emulation layer
     53 * interferes with that. */
     54# define _XF86_ANSIC_H
     55# define XF86_LIBC_H
    5256# include "xorg-server.h"
    5357# include <string.h>
     
    6064/* VGA hardware functions for setting and restoring text mode */
    6165#include "vgaHW.h"
     66
     67#ifdef RT_OS_SOLARIS
     68# include <sys/vuid_event.h>
     69# include <sys/msio.h>
     70# include <errno.h>
     71# include <fcntl.h>
     72# include <unistd.h>
     73#endif
    6274
    6375/** Clear the virtual framebuffer in VRAM.  Optionally also clear up to the
     
    178190    }
    179191#endif
     192#ifdef RT_OS_SOLARIS
     193    /* Tell the virtual mouse device about the new virtual desktop size. */
     194    {
     195        int rc;
     196        int hMouse = open("/dev/mouse", O_RDWR);
     197        if (hMouse >= 0)
     198        {
     199            do {
     200                Ms_screen_resolution Res = { height, width };
     201                rc = ioctl(hMouse, MSIOSRESOLUTION, &Res);
     202            } while ((rc != 0) && (errno == EINTR));
     203            close(hMouse);
     204        }
     205    }
     206#endif
    180207    return TRUE;
    181208}
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