- Timestamp:
- Dec 6, 2010 2:40:03 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VMMDev.h
r34438 r34754 266 266 #define VMMDEV_MOUSE_HOST_CANNOT_HWPOINTER RT_BIT(3) 267 267 /** The guest can read VMMDev events to find out about pointer movement */ 268 #define VMMDEV_MOUSE_ GUEST_USES_EVENTRT_BIT(4)268 #define VMMDEV_MOUSE_NEW_PROTOCOL RT_BIT(4) 269 269 /** If the guest changes the status of the 270 270 * VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR bit, the host will honour this */ … … 281 281 /** The mask of all capabilities which the guest can legitimately change */ 282 282 #define VMMDEV_MOUSE_GUEST_MASK \ 283 (VMMDEV_MOUSE_NOTIFY_HOST_MASK | VMMDEV_MOUSE_ GUEST_USES_EVENT)283 (VMMDEV_MOUSE_NOTIFY_HOST_MASK | VMMDEV_MOUSE_NEW_PROTOCOL) 284 284 /** The mask of host capability changes for which notification events should 285 285 * be sent */ -
trunk/src/VBox/Additions/x11/vboxmouse/vboxmouse_15.c
r32831 r34754 177 177 rc = VbglR3SetMouseStatus( fFeatures 178 178 | VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE 179 | VMMDEV_MOUSE_ GUEST_USES_EVENT);179 | VMMDEV_MOUSE_NEW_PROTOCOL); 180 180 if (!RT_SUCCESS(rc)) { 181 181 xf86Msg(X_ERROR, "%s: Failed to switch guest mouse into absolute mode\n", … … 194 194 rc = VbglR3SetMouseStatus( fFeatures 195 195 & ~VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE 196 & ~VMMDEV_MOUSE_ GUEST_USES_EVENT);196 & ~VMMDEV_MOUSE_NEW_PROTOCOL); 197 197 xf86RemoveEnabledDevice(pInfo); 198 198 device->public.on = FALSE; -
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp
r33540 r34754 210 210 *aBitsPerPixel = getBitsPerPixel(); 211 211 return S_OK; 212 } 213 214 void Display::getFramebufferDimensions(int32_t *px1, int32_t *py1, 215 int32_t *px2, int32_t *py2) 216 { 217 AssertPtrReturnVoid(px1); 218 AssertPtrReturnVoid(py1); 219 AssertPtrReturnVoid(px2); 220 AssertPtrReturnVoid(py2); 221 *px1 = 0; 222 *py1 = 0; 223 *px2 = getWidth(); 224 *py2 = getHeight(); 212 225 } 213 226 -
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.h
r28800 r34754 55 55 STDMETHODIMP ResizeCompleted(); 56 56 STDMETHODIMP GetScreenResolution(ULONG aScreenId, ULONG *aWidth, ULONG *aHeight, ULONG *aBitsPerPixel); 57 void getFramebufferDimensions(int32_t *px1, int32_t *py1, int32_t *px2, 58 int32_t *py2); 57 59 58 60 void resetFramebuffer(); -
trunk/src/VBox/Main/DisplayImpl.cpp
r34739 r34754 930 930 mParent->consoleVRDPServer()->SendUpdateBitmap(uScreenId, x, y, w, h); 931 931 } 932 } 933 934 void Display::getFramebufferDimensions(int32_t *px1, int32_t *py1, 935 int32_t *px2, int32_t *py2) 936 { 937 AssertPtrReturnVoid(px1); 938 AssertPtrReturnVoid(py1); 939 AssertPtrReturnVoid(px2); 940 AssertPtrReturnVoid(py2); 941 int32_t x1 = 0, y1 = 0, x2 = 0, y2 = 0; 942 for (unsigned i = 0; i < mcMonitors; ++i) 943 { 944 x1 = RT_MIN(x1, maFramebuffers[i].xOrigin); 945 y1 = RT_MIN(y1, maFramebuffers[i].yOrigin); 946 x2 = RT_MAX(x2, maFramebuffers[i].xOrigin + (int32_t)maFramebuffers[i].w); 947 y2 = RT_MAX(y2, maFramebuffers[i].yOrigin + (int32_t)maFramebuffers[i].h); 948 } 949 *px1 = x1; 950 *py1 = y1; 951 *px2 = x2; 952 *py2 = y2; 932 953 } 933 954 -
trunk/src/VBox/Main/MouseImpl.cpp
r34395 r34754 453 453 ComAssertRet(pDisplay, E_FAIL); 454 454 455 ULONG displayWidth, displayHeight; 456 /* Takes the display lock */ 457 HRESULT rc = pDisplay->GetScreenResolution (0, &displayWidth, &displayHeight, 458 NULL); 459 if (FAILED(rc)) 460 return rc; 461 462 *pcX = displayWidth ? ((x - 1) * 0xFFFF) / displayWidth: 0; 463 *pcY = displayHeight ? ((y - 1) * 0xFFFF) / displayHeight: 0; 455 if (!(mfVMMDevGuestCaps & VMMDEV_MOUSE_NEW_PROTOCOL)) 456 { 457 ULONG displayWidth, displayHeight; 458 /* Takes the display lock */ 459 HRESULT rc = pDisplay->GetScreenResolution(0, &displayWidth, &displayHeight, 460 NULL); 461 if (FAILED(rc)) 462 return rc; 463 464 *pcX = displayWidth ? ((x - 1) * 0xFFFF) / displayWidth: 0; 465 *pcY = displayHeight ? ((y - 1) * 0xFFFF) / displayHeight: 0; 466 } 467 else 468 { 469 int32_t x1, y1, x2, y2; 470 pDisplay->getFramebufferDimensions(&x1, &y1, &x2, &y2); 471 *pcX = x1 != x2 ? (x - 1 - x1) * 0xFFFF / (x2 - x1) : 0; 472 *pcY = y1 != y2 ? (y - 1 - y1) * 0xFFFF / (y2 - y1) : 0; 473 } 464 474 return S_OK; 465 475 } … … 512 522 rc = reportAbsEvent(mouseXAbs, mouseYAbs, dz, dw, fButtons, 513 523 RT_BOOL( mfVMMDevGuestCaps 514 & VMMDEV_MOUSE_ GUEST_USES_EVENT));524 & VMMDEV_MOUSE_NEW_PROTOCOL)); 515 525 516 526 #ifndef VBOXBFE_WITHOUT_COM -
trunk/src/VBox/Main/include/DisplayImpl.h
r34739 r34754 139 139 return maFramebuffers[VBOX_VIDEO_PRIMARY_SCREEN].pFramebuffer; 140 140 } 141 void getFramebufferDimensions(int32_t *px1, int32_t *py1, int32_t *px2, 142 int32_t *py2); 141 143 #ifdef MMSEAMLESS 142 144 int handleSetVisibleRegion(uint32_t cRect, PRTRECT pRect);
Note:
See TracChangeset
for help on using the changeset viewer.