Index: /trunk/src/VBox/Additions/x11/vboxvideo/setmode.c
===================================================================
--- /trunk/src/VBox/Additions/x11/vboxvideo/setmode.c	(revision 55203)
+++ /trunk/src/VBox/Additions/x11/vboxvideo/setmode.c	(revision 55204)
@@ -201,19 +201,25 @@
         FatalError("Failed to update the input mapping.\n");
 #endif
+    vbvxSetSolarisMouseRange(width, height);
+    return TRUE;
+}
+
+/** Tell the virtual mouse device about the new virtual desktop size. */
+void vbvxSetSolarisMouseRange(int width, int height)
+{
 #ifdef RT_OS_SOLARIS
-    /* Tell the virtual mouse device about the new virtual desktop size. */
-    {
-        int rc;
-        int hMouse = open("/dev/mouse", O_RDWR);
-        if (hMouse >= 0)
-        {
-            do {
-                Ms_screen_resolution Res = { height, width };
-                rc = ioctl(hMouse, MSIOSRESOLUTION, &Res);
-            } while ((rc != 0) && (errno == EINTR));
-            close(hMouse);
-        }
-    }
-#endif
-    return TRUE;
-}
+    int rc;
+    int hMouse = open("/dev/mouse", O_RDWR);
+
+    if (hMouse >= 0)
+    {
+        do {
+            Ms_screen_resolution Res = { height, width };
+            rc = ioctl(hMouse, MSIOSRESOLUTION, &Res);
+        } while ((rc != 0) && (errno == EINTR));
+        close(hMouse);
+    }
+#else
+    (void)width; (void)height;
+#endif
+}
Index: /trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.h
===================================================================
--- /trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.h	(revision 55203)
+++ /trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.h	(revision 55204)
@@ -247,4 +247,6 @@
 
 /* setmode.c */
+extern void vbvxSetSolarisMouseRange(int width, int height);
+
 extern Bool vbox_cursor_init (ScreenPtr pScreen);
 extern void vbox_open (ScrnInfoPtr pScrn, ScreenPtr pScreen, VBOXPtr pVBox);
