Changeset 26782 in vbox for trunk/src/VBox/Frontends/VBoxSDL
- Timestamp:
- Feb 25, 2010 11:17:30 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 58047
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r26603 r26782 185 185 static BOOL gfAbsoluteMouseHost = FALSE; 186 186 static BOOL gfAbsoluteMouseGuest = FALSE; 187 static BOOL gfRelativeMouseGuest = TRUE; 187 188 static BOOL gfGuestNeedsHostCursor = FALSE; 188 189 static BOOL gfOffCursorActive = FALSE; … … 430 431 } 431 432 432 STDMETHOD(OnMouseCapabilityChange)(BOOL supportsAbsolute, BOOL needsHostCursor) 433 { 434 LogFlow(("OnMouseCapabilityChange: supportsAbsolute = %d\n", supportsAbsolute)); 433 STDMETHOD(OnMouseCapabilityChange)(BOOL supportsAbsolute, BOOL supportsRelative, BOOL needsHostCursor) 434 { 435 LogFlow(("OnMouseCapabilityChange: supportsAbsolute = %d, supportsRelative = %d, needsHostCursor = %d\n", 436 supportsAbsolute, supportsRelative, needsHostCursor)); 435 437 gfAbsoluteMouseGuest = supportsAbsolute; 438 gfRelativeMouseGuest = supportsRelative; 436 439 gfGuestNeedsHostCursor = needsHostCursor; 437 440 … … 3879 3882 DisableGlobalHotKeys(true); 3880 3883 #endif 3881 if (!gfGuestNeedsHostCursor )3884 if (!gfGuestNeedsHostCursor && gfRelativeMouseGuest) 3882 3885 SDL_ShowCursor(SDL_DISABLE); 3883 3886 SDL_WM_GrabInput(SDL_GRAB_ON); … … 3898 3901 { 3899 3902 SDL_WM_GrabInput(SDL_GRAB_OFF); 3900 if (!gfGuestNeedsHostCursor )3903 if (!gfGuestNeedsHostCursor && gfRelativeMouseGuest) 3901 3904 SDL_ShowCursor(SDL_ENABLE); 3902 3905 #ifdef RT_OS_DARWIN … … 3931 3934 * If supported and we're not in grabbed mode, we'll use the absolute mouse. 3932 3935 * If we are in grabbed mode and the guest is not able to draw the mouse cursor 3933 * itself, we have to use absolute coordinates, otherwise the host cursor and 3936 * itself, or can't handle relative reporting, we have to use absolute 3937 * coordinates, otherwise the host cursor and 3934 3938 * the coordinates the guest thinks the mouse is at could get out-of-sync. From 3935 3939 * the SDL mailing list: … … 3939 3943 * call SDL_GetMouseState, the "button" is already up." 3940 3944 */ 3941 abs = (UseAbsoluteMouse() && !gfGrabbed) || gfGuestNeedsHostCursor; 3945 abs = (UseAbsoluteMouse() && !gfGrabbed) 3946 || gfGuestNeedsHostCursor 3947 || !gfRelativeMouseGuest; 3942 3948 3943 3949 /* only used if abs == TRUE */
Note:
See TracChangeset
for help on using the changeset viewer.