Changeset 17154 in vbox for trunk/src/VBox
- Timestamp:
- Feb 26, 2009 11:09:36 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/vboxvideo/vboxutils.c
r16995 r17154 846 846 ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; 847 847 VBOXPtr pVBox = pScrn->driverPrivate; 848 xf86CursorInfoPtr pCurs ;849 Bool rc ;848 xf86CursorInfoPtr pCurs = NULL; 849 Bool rc = TRUE; 850 850 851 851 TRACE_ENTRY(); … … 853 853 return FALSE; 854 854 pVBox->pCurs = pCurs = xf86CreateCursorInfoRec(); 855 if (!pCurs) 856 RETERROR(pScrn->scrnIndex, FALSE, 857 "Failed to create X Window cursor information structures for virtual mouse.\n"); 858 859 pCurs->MaxWidth = VBOX_MAX_CURSOR_WIDTH; 860 pCurs->MaxHeight = VBOX_MAX_CURSOR_HEIGHT; 861 pCurs->Flags = HARDWARE_CURSOR_TRUECOLOR_AT_8BPP 862 | HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1 863 | HARDWARE_CURSOR_BIT_ORDER_MSBFIRST; 864 865 pCurs->SetCursorColors = vbox_set_cursor_colors; 866 pCurs->SetCursorPosition = vbox_set_cursor_position; 867 pCurs->LoadCursorImage = vbox_load_cursor_image; 868 pCurs->HideCursor = vbox_hide_cursor; 869 pCurs->ShowCursor = vbox_show_cursor; 870 pCurs->UseHWCursor = vbox_use_hw_cursor; 871 pCurs->RealizeCursor = vbox_realize_cursor; 855 if (!pCurs) { 856 xf86DrvMsg(pScrn->scrnIndex, X_ERROR, 857 "Failed to create X Window cursor information structures for virtual mouse.\n"); 858 rc = FALSE; 859 } 860 if (rc) { 861 pCurs->MaxWidth = VBOX_MAX_CURSOR_WIDTH; 862 pCurs->MaxHeight = VBOX_MAX_CURSOR_HEIGHT; 863 pCurs->Flags = HARDWARE_CURSOR_TRUECOLOR_AT_8BPP 864 | HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1 865 | HARDWARE_CURSOR_BIT_ORDER_MSBFIRST; 866 867 pCurs->SetCursorColors = vbox_set_cursor_colors; 868 pCurs->SetCursorPosition = vbox_set_cursor_position; 869 pCurs->LoadCursorImage = vbox_load_cursor_image; 870 pCurs->HideCursor = vbox_hide_cursor; 871 pCurs->ShowCursor = vbox_show_cursor; 872 pCurs->UseHWCursor = vbox_use_hw_cursor; 873 pCurs->RealizeCursor = vbox_realize_cursor; 872 874 873 875 #ifdef ARGB_CURSOR 874 pCurs->UseHWCursorARGB = vbox_use_hw_cursor_argb;875 pCurs->LoadCursorARGB = vbox_load_cursor_argb;876 pCurs->UseHWCursorARGB = vbox_use_hw_cursor_argb; 877 pCurs->LoadCursorARGB = vbox_load_cursor_argb; 876 878 #endif 877 879 878 rc = xf86InitCursor(pScreen, pCurs); 879 if (rc == TRUE) 880 return TRUE; 881 RETERROR(pScrn->scrnIndex, FALSE, "Failed to enable mouse pointer integration.\n"); 880 /* Hide the host cursor before we initialise if we wish to use a 881 * software cursor. */ 882 if (pVBox->forceSWCursor) 883 vbox_vmm_hide_cursor(pScrn, pVBox); 884 rc = xf86InitCursor(pScreen, pCurs); 885 } 886 if (!rc) 887 xf86DrvMsg(pScrn->scrnIndex, X_ERROR, 888 "Failed to enable mouse pointer integration.\n"); 889 if (!rc && (pCurs != NULL)) 890 xf86DestroyCursorInfoRec(pCurs); 891 return rc; 882 892 } 883 893
Note:
See TracChangeset
for help on using the changeset viewer.