Changeset 4637 in vbox
- Timestamp:
- Sep 9, 2007 8:42:06 AM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxSDL
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp
r4071 r4637 128 128 } 129 129 #endif 130 #ifdef RT_OS_LINUX130 #ifdef VBOXSDL_WITH_X11 131 131 /* On some X servers the mouse is stuck inside the bottom right corner. 132 132 * See http://wiki.clug.org.za/wiki/QEMU_mouse_not_working */ … … 140 140 } 141 141 142 #ifdef RT_OS_LINUX142 #ifdef VBOXSDL_WITH_X11 143 143 /* NOTE: we still want Ctrl-C to work, so we undo the SDL redirections */ 144 144 signal(SIGINT, SIG_DFL); … … 398 398 x, y, w, h)); 399 399 400 #ifdef RT_OS_LINUX400 #ifdef VBOXSDL_WITH_X11 401 401 /* 402 402 * SDL does not allow us to make this call from any other thread than … … 412 412 event.user.data2 = (void*)(w << 16 | h); 413 413 PushNotifyUpdateEvent(&event); 414 #else /* ! RT_OS_LINUX*/414 #else /* !VBOXSDL_WITH_X11 */ 415 415 update(x, y, w, h, true /* fGuestRelative */); 416 #endif /* ! RT_OS_LINUX*/416 #endif /* !VBOXSDL_WITH_X11 */ 417 417 418 418 /* … … 712 712 */ 713 713 int sdlFlags = SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL; 714 #ifndef RT_OS_OS2 /* doesn't seem to work for some reason... */ 714 715 if (mfResizable) 715 716 sdlFlags |= SDL_RESIZABLE; 717 #endif 716 718 if (mfFullscreen) 717 719 sdlFlags |= SDL_FULLSCREEN; … … 832 834 void VBoxSDLFB::update(int x, int y, int w, int h, bool fGuestRelative) 833 835 { 834 #ifdef RT_OS_LINUX836 #ifdef VBOXSDL_WITH_X11 835 837 AssertMsg(mSdlNativeThread == RTThreadNativeSelf(), ("Wrong thread! SDL is not threadsafe!\n")); 836 838 #endif … … 1031 1033 void VBoxSDLFB::paintSecureLabel(int x, int y, int w, int h, bool fForce) 1032 1034 { 1033 #ifdef RT_OS_LINUX1035 #ifdef VBOXSDL_WITH_X11 1034 1036 AssertMsg(mSdlNativeThread == RTThreadNativeSelf(), ("Wrong thread! SDL is not threadsafe!\n")); 1035 1037 #endif -
trunk/src/VBox/Frontends/VBoxSDL/Makefile.kmk
r4071 r4637 44 44 VBoxSDL_DEFS += VBOX_VRDP 45 45 endif 46 VBoxSDL_DEFS.linux = _GNU_SOURCE 46 VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11 47 VBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11 48 VBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11 47 49 ifdef VBOX_OPENGL 48 50 #VBoxSDL_DEFS.linux += VBOX_OPENGL -
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r4486 r4637 30 30 using namespace com; 31 31 32 #if defined ( RT_OS_LINUX)32 #if defined (VBOXSDL_WITH_X11) 33 33 #include <X11/Xlib.h> 34 34 #include <X11/cursorfont.h> /* for XC_left_ptr */ … … 181 181 static VBoxSDLFB *gpFrameBuffer = NULL; 182 182 static SDL_Cursor *gpDefaultCursor = NULL; 183 #ifdef RT_OS_LINUX183 #ifdef VBOXSDL_WITH_X11 184 184 static Cursor gpDefaultOrigX11Cursor; 185 185 #endif … … 189 189 static SDL_TimerID gSdlResizeTimer = NULL; 190 190 191 #ifdef RT_OS_LINUX191 #ifdef VBOXSDL_WITH_X11 192 192 static SDL_SysWMinfo gSdlInfo; 193 193 #endif … … 569 569 if (SDL_GetWMInfo(&info)) 570 570 { 571 #if defined ( RT_OS_LINUX)571 #if defined (VBOXSDL_WITH_X11) 572 572 *winId = (ULONG64) info.info.x11.wmwindow; 573 573 #elif defined (RT_OS_WIN) … … 688 688 } 689 689 690 #ifdef RT_OS_LINUX690 #ifdef VBOXSDL_WITH_X11 691 691 /** 692 692 * Custom signal handler. Currently it is only used to release modifier … … 705 705 } 706 706 } 707 #endif /* RT_OS_LINUX*/707 #endif /* VBOXSDL_WITH_X11 */ 708 708 709 709 /** entry point */ … … 720 720 } 721 721 722 #ifdef RT_OS_LINUX722 #ifdef VBOXSDL_WITH_X11 723 723 /* 724 724 * Lock keys on SDL behave different from normal keys: A KeyPress event is generated … … 1822 1822 gpDefaultCursor = SDL_GetCursor(); 1823 1823 1824 #ifdef RT_OS_LINUX1824 #ifdef VBOXSDL_WITH_X11 1825 1825 /* Get Window Manager info. We only need the X11 display. */ 1826 1826 SDL_VERSION(&gSdlInfo.version); … … 1836 1836 *(Cursor*)gpDefaultCursor->wm_cursor = XCreateFontCursor(gSdlInfo.info.x11.display, XC_left_ptr); 1837 1837 SDL_SetCursor(gpDefaultCursor); 1838 #endif /* RT_OS_LINUX*/1838 #endif /* VBOXSDL_WITH_X11 */ 1839 1839 1840 1840 /* create a fake empty cursor */ … … 1849 1849 * Register our user signal handler. 1850 1850 */ 1851 #ifdef RT_OS_LINUX1851 #ifdef VBOXSDL_WITH_X11 1852 1852 struct sigaction sa; 1853 1853 sa.sa_sigaction = signal_handler; … … 1855 1855 sa.sa_flags = SA_RESTART | SA_SIGINFO; 1856 1856 sigaction (SIGUSR1, &sa, NULL); 1857 #endif /* RT_OS_LINUX*/1857 #endif /* VBOXSDL_WITH_X11 */ 1858 1858 1859 1859 /* … … 2495 2495 if (gpDefaultCursor) 2496 2496 { 2497 #ifdef RT_OS_LINUX2497 #ifdef VBOXSDL_WITH_X11 2498 2498 Cursor pDefaultTempX11Cursor = *(Cursor*)gpDefaultCursor->wm_cursor; 2499 2499 *(Cursor*)gpDefaultCursor->wm_cursor = gpDefaultOrigX11Cursor; 2500 #endif /* RT_OS_LINUX*/2500 #endif /* VBOXSDL_WITH_X11 */ 2501 2501 SDL_SetCursor(gpDefaultCursor); 2502 #ifdef RT_OS_LINUX2502 #ifdef VBOXSDL_WITH_X11 2503 2503 XFreeCursor(gSdlInfo.info.x11.display, pDefaultTempX11Cursor); 2504 #endif /* RT_OS_LINUX*/2504 #endif /* VBOXSDL_WITH_X11 */ 2505 2505 } 2506 2506 … … 2514 2514 #if defined (RT_OS_WINDOWS) 2515 2515 ::DestroyCursor(*(HCURSOR *) pCustomTempWMCursor); 2516 #elif defined ( RT_OS_LINUX)2516 #elif defined (VBOXSDL_WITH_X11) 2517 2517 XFreeCursor(gSdlInfo.info.x11.display, *(Cursor *) pCustomTempWMCursor); 2518 2518 #endif … … 2752 2752 int keycode = ev->keysym.scancode; 2753 2753 2754 #ifdef RT_OS_LINUX2754 #ifdef VBOXSDL_WITH_X11 2755 2755 // workaround for SDL keyboard translation issues on Linux 2756 2756 // keycodes > 0x100 are sent as 0xe0 keycode … … 4003 4003 ::DeleteObject (hBitmap); 4004 4004 4005 #elif defined ( RT_OS_LINUX)4005 #elif defined (VBOXSDL_WITH_X11) 4006 4006 4007 4007 XcursorImage *img = XcursorImageCreate (data->width, data->height); … … 4381 4381 } 4382 4382 4383 #ifdef RT_OS_LINUX4383 #ifdef VBOXSDL_WITH_X11 4384 4384 /** 4385 4385 * Special SDL_PushEvent function for NotifyUpdate events. These events may occur in bursts … … 4406 4406 RTThreadYield(); 4407 4407 } 4408 #endif /* RT_OS_LINUX*/4408 #endif /* VBOXSDL_WITH_X11 */ -
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.h
r4071 r4637 68 68 #endif /* VBOX_WIN32_UI */ 69 69 70 #ifdef RT_OS_LINUX70 #ifdef VBOXSDL_WITH_X11 71 71 void PushNotifyUpdateEvent(SDL_Event *event); 72 72 #endif
Note:
See TracChangeset
for help on using the changeset viewer.