Changeset 6241 in vbox
- Timestamp:
- Jan 4, 2008 4:25:30 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r6230 r6241 2671 2671 TEMPLATE_VBOXGUESTR3EXE_DEFS += IN_RT_R3 2672 2672 TEMPLATE_VBOXGUESTR3EXE_LDFLAGS = $(TEMPLATE_VBOXR3EXE_LDFLAGS) -static 2673 else if1of ($(BUILD_TARGET),solaris) 2674 TEMPLATE_VBOXGUESTR3EXE_DEFS += PIC 2675 TEMPLATE_VBOXGUESTR3EXE_CFLAGS = $(TEMPLATE_VBOXR3EXE_CFLAGS) -fPIC 2676 TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS) -fPIC 2673 2677 endif 2674 2678 -
trunk/include/VBox/VBoxGuest.h
r6232 r6241 1375 1375 VBGLR3DECL(int) VbglR3SeamlessSendRects(uint32_t cRects, PRTRECT pRects); 1376 1376 1377 /* Mouse */ 1378 1379 VBGLR3DECL(int) VbglR3GetMouseStatus(uint32_t *pu32Features, uint32_t *pu32PointerX, uint32_t *pu32PointerY); 1380 VBGLR3DECL(int) VbglR3SetMouseStatus(uint32_t u32Features); 1381 1377 1382 /* Backdoor logging */ 1378 1383 -
trunk/src/VBox/Additions/Makefile.kmk
r6181 r6241 86 86 endif 87 87 endif 88 endif 89 90 # Solaris additions 91 ifeq ($(BUILD_TARGET),solaris) 92 SUBDIRS += x11 88 93 endif 89 94 -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c
r6154 r6241 499 499 LogFlow((DEVICE_NAME ":VBoxAddSolarisOpen\n")); 500 500 501 /* 502 * Verify we are being opened as a character device 503 */ 504 if (fType != OTYP_CHR) 505 return EINVAL; 506 501 507 #ifndef USE_SESSION_HASH 502 508 VBoxAddDevState *pState = NULL; … … 565 571 } 566 572 #endif 567 LogRel((DEVICE_NAME " VBoxAddSolarisOpen: VBoxGuestCreateUserSession failed. rc=%d\n", rc));573 LogRel((DEVICE_NAME ":VBoxAddSolarisOpen: VBoxGuestCreateUserSession failed. rc=%d\n", rc)); 568 574 return rc; 569 575 } -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
r6236 r6241 217 217 218 218 219 VBGLR3DECL(int) VbglR3GetMouseStatus(uint32_t *pu32Features, uint32_t *pu32PointerX, uint32_t *pu32PointerY) 220 { 221 VMMDevReqMouseStatus Req; 222 vmmdevInitRequest(&Req.header, VMMDevReq_GetMouseStatus); 223 Req.mouseFeatures = 0; 224 Req.pointerXPos = 0; 225 Req.pointerYPos = 0; 226 int rc = VbglR3GRPerform(&Req.header); 227 if (RT_SUCCESS(rc)) 228 { 229 if (pu32Features) 230 *pu32Features = Req.mouseFeatures; 231 if (pu32PointerX) 232 *pu32PointerX = Req.pointerXPos; 233 if (pu32PointerY) 234 *pu32PointerY = Req.pointerYPos; 235 } 236 return rc; 237 } 238 239 240 VBGLR3DECL(int) VbglR3SetMouseStatus(uint32_t u32Features) 241 { 242 VMMDevReqMouseStatus Req; 243 vmmdevInitRequest(&Req.header, VMMDevReq_SetMouseStatus); 244 Req.mouseFeatures = u32Features; 245 Req.pointerXPos = 0; 246 Req.pointerYPos = 0; 247 return VbglR3GRPerform(&Req.header); 248 } 249 250 219 251 /** 220 252 * Cause any pending WaitEvent calls (VBOXGUEST_IOCTL_WAITEVENT) to return -
trunk/src/VBox/Additions/x11/Makefile.kmk
r6202 r6241 28 28 endif 29 29 30 ifeq ($(BUILD_TARGET),solaris) 31 SUBDIRS += xmouse 32 endif 33 30 34 include $(PATH_KBUILD)/subfooter.kmk 31 35 -
trunk/src/VBox/Additions/x11/xmouse/Makefile.kmk
r6202 r6241 19 19 include $(PATH_KBUILD)/header.kmk 20 20 21 if1of ($(BUILD_TARGET),linux l4) 21 22 SYSMODS = vboxmouse_drv 22 23 DLLS = vboxmouse_drv_70 vboxmouse_drv_71 vboxmouse_drv_14 … … 100 101 xorg14/pnp.c \ 101 102 VBoxUtils.c 103 endif 102 104 105 ifeq ($(BUILD_TARGET),solaris) 106 DLLS = vboxmouse_drv 107 108 vboxmouse_drv_TEMPLATE = VBOXGUESTR3EXE 109 vboxmouse_drv_DEFS = \ 110 XFree86Server IN_MODULE XFree86Module XFree86LOADER XINPUT \ 111 IN_RING3 VBOX XORG_7X PIC 112 vboxmouse_drv_INCS = \ 113 /usr/X11/include/xorg \ 114 $(PATH_SUB_CURRENT) 115 vboxmouse_drv_SOURCES = \ 116 xorg71/mouse.c \ 117 xorg71/pnp.c \ 118 VBoxUtils.c 119 vboxmouse_drv_LIBS = \ 120 $(VBOX_LIB_VBGL_R3) \ 121 $(VBOX_LIB_IPRT_GUEST_R3) 122 endif 103 123 104 124 include $(PATH_KBUILD)/footer.kmk -
trunk/src/VBox/Additions/x11/xmouse/VBoxUtils.c
r6202 r6241 16 16 */ 17 17 18 #include <iprt/assert.h> 18 19 #include <VBox/VBoxGuest.h> 19 20 #include "VBoxUtils.h" … … 24 25 #include "compiler.h" 25 26 27 #ifndef RT_OS_SOLARIS 26 28 #include <asm/ioctl.h> 29 #endif 27 30 31 #ifdef RT_OS_SOLARIS /** @todo later Linux should also use R3 lib for this */ 32 int VBoxMouseInit(void) 33 { 34 int rc = VbglR3Init(); 35 if (RT_FAILURE(rc)) 36 { 37 ErrorF("VbglR3Init failed.\n"); 38 return 1; 39 } 40 41 rc = VbglR3SetMouseStatus(VBOXGUEST_MOUSE_GUEST_CAN_ABSOLUTE | VBOXGUEST_MOUSE_GUEST_NEEDS_HOST_CURSOR); 42 if (VBOX_FAILURE(rc)) 43 { 44 ErrorF("Error sending mouse pointer capabilities to VMM! rc = %d (%s)\n", 45 errno, strerror(errno)); 46 return 1; 47 } 48 xf86Msg(X_INFO, "VirtualBox mouse pointer integration available.\n"); 49 return 0; 50 } 51 52 53 int VBoxMouseQueryPosition(unsigned int *puAbsXPos, unsigned int *puAbsYPos) 54 { 55 int rc; 56 uint32_t pointerXPos; 57 uint32_t pointerYPos; 58 59 AssertPtrReturn(puAbsXPos, VERR_INVALID_PARAMETER); 60 AssertPtrReturn(puAbsYPos, VERR_INVALID_PARAMETER); 61 rc = VbglR3GetMouseStatus(NULL, &pointerXPos, &pointerYPos); 62 if (VBOX_SUCCESS(rc)) 63 { 64 *puAbsXPos = pointerXPos; 65 *puAbsYPos = pointerYPos; 66 xf86Msg(X_INFO, "VBoxMouseQueryPosition x=%u y=%u\n", *puAbsXPos, *puAbsYPos); 67 return 0; 68 } 69 ErrorF("Error querying host mouse position! rc = %d\n", rc); 70 return 2; 71 } 72 73 74 int VBoxMouseFini(void) 75 { 76 int rc = VbglR3SetMouseStatus(0); 77 VbglR3Term(); 78 return rc; 79 } 80 #else 28 81 /* the vboxadd module file handle */ 29 82 static int g_vboxaddHandle = -1; … … 141 194 return 0; 142 195 } 196 #endif /* !RT_OS_SOLARIS */ 197 -
trunk/src/VBox/Additions/x11/xmouse/xorg71/mouse.c
r6202 r6241 81 81 #include <X11/Xproto.h> 82 82 83 #if defined(VBOX) && defined(RT_OS_SOLARIS) 84 # undef RANDR 85 #endif 83 86 #include "xf86.h" 84 87
Note:
See TracChangeset
for help on using the changeset viewer.