VirtualBox

Changeset 4637 in vbox


Ignore:
Timestamp:
Sep 9, 2007 8:42:06 AM (17 years ago)
Author:
vboxsync
Message:

most RT_OS_LINUX -> VBOXSDL_WITH_X11. On e OS/2 workaround.

Location:
trunk/src/VBox/Frontends/VBoxSDL
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp

    r4071 r4637  
    128128    }
    129129#endif
    130 #ifdef RT_OS_LINUX
     130#ifdef VBOXSDL_WITH_X11
    131131    /* On some X servers the mouse is stuck inside the bottom right corner.
    132132     * See http://wiki.clug.org.za/wiki/QEMU_mouse_not_working */
     
    140140    }
    141141
    142 #ifdef RT_OS_LINUX
     142#ifdef VBOXSDL_WITH_X11
    143143    /* NOTE: we still want Ctrl-C to work, so we undo the SDL redirections */
    144144    signal(SIGINT, SIG_DFL);
     
    398398             x, y, w, h));
    399399
    400 #ifdef RT_OS_LINUX
     400#ifdef VBOXSDL_WITH_X11
    401401    /*
    402402     * SDL does not allow us to make this call from any other thread than
     
    412412    event.user.data2 = (void*)(w << 16 | h);
    413413    PushNotifyUpdateEvent(&event);
    414 #else /* !RT_OS_LINUX */
     414#else /* !VBOXSDL_WITH_X11 */
    415415    update(x, y, w, h, true /* fGuestRelative */);
    416 #endif /* !RT_OS_LINUX */
     416#endif /* !VBOXSDL_WITH_X11 */
    417417
    418418    /*
     
    712712     */
    713713    int sdlFlags = SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL;
     714#ifndef RT_OS_OS2 /* doesn't seem to work for some reason... */
    714715    if (mfResizable)
    715716        sdlFlags |= SDL_RESIZABLE;
     717#endif
    716718    if (mfFullscreen)
    717719        sdlFlags |= SDL_FULLSCREEN;
     
    832834void VBoxSDLFB::update(int x, int y, int w, int h, bool fGuestRelative)
    833835{
    834 #ifdef RT_OS_LINUX
     836#ifdef VBOXSDL_WITH_X11
    835837    AssertMsg(mSdlNativeThread == RTThreadNativeSelf(), ("Wrong thread! SDL is not threadsafe!\n"));
    836838#endif
     
    10311033void VBoxSDLFB::paintSecureLabel(int x, int y, int w, int h, bool fForce)
    10321034{
    1033 #ifdef RT_OS_LINUX
     1035#ifdef VBOXSDL_WITH_X11
    10341036    AssertMsg(mSdlNativeThread == RTThreadNativeSelf(), ("Wrong thread! SDL is not threadsafe!\n"));
    10351037#endif
  • trunk/src/VBox/Frontends/VBoxSDL/Makefile.kmk

    r4071 r4637  
    4444 VBoxSDL_DEFS     += VBOX_VRDP
    4545endif
    46 VBoxSDL_DEFS.linux = _GNU_SOURCE
     46VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
     47VBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
     48VBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
    4749ifdef VBOX_OPENGL
    4850 #VBoxSDL_DEFS.linux += VBOX_OPENGL
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r4486 r4637  
    3030using namespace com;
    3131
    32 #if defined (RT_OS_LINUX)
     32#if defined (VBOXSDL_WITH_X11)
    3333#include <X11/Xlib.h>
    3434#include <X11/cursorfont.h>      /* for XC_left_ptr */
     
    181181static VBoxSDLFB  *gpFrameBuffer = NULL;
    182182static SDL_Cursor *gpDefaultCursor = NULL;
    183 #ifdef RT_OS_LINUX
     183#ifdef VBOXSDL_WITH_X11
    184184static Cursor      gpDefaultOrigX11Cursor;
    185185#endif
     
    189189static SDL_TimerID gSdlResizeTimer = NULL;
    190190
    191 #ifdef RT_OS_LINUX
     191#ifdef VBOXSDL_WITH_X11
    192192static SDL_SysWMinfo gSdlInfo;
    193193#endif
     
    569569        if (SDL_GetWMInfo(&info))
    570570        {
    571 #if defined (RT_OS_LINUX)
     571#if defined (VBOXSDL_WITH_X11)
    572572            *winId = (ULONG64) info.info.x11.wmwindow;
    573573#elif defined (RT_OS_WIN)
     
    688688}
    689689
    690 #ifdef RT_OS_LINUX
     690#ifdef VBOXSDL_WITH_X11
    691691/**
    692692 * Custom signal handler. Currently it is only used to release modifier
     
    705705    }
    706706}
    707 #endif /* RT_OS_LINUX */
     707#endif /* VBOXSDL_WITH_X11 */
    708708
    709709/** entry point */
     
    720720    }
    721721
    722 #ifdef RT_OS_LINUX
     722#ifdef VBOXSDL_WITH_X11
    723723    /*
    724724     * Lock keys on SDL behave different from normal keys: A KeyPress event is generated
     
    18221822    gpDefaultCursor = SDL_GetCursor();
    18231823
    1824 #ifdef RT_OS_LINUX
     1824#ifdef VBOXSDL_WITH_X11
    18251825    /* Get Window Manager info. We only need the X11 display. */
    18261826    SDL_VERSION(&gSdlInfo.version);
     
    18361836    *(Cursor*)gpDefaultCursor->wm_cursor = XCreateFontCursor(gSdlInfo.info.x11.display, XC_left_ptr);
    18371837    SDL_SetCursor(gpDefaultCursor);
    1838 #endif /* RT_OS_LINUX */
     1838#endif /* VBOXSDL_WITH_X11 */
    18391839
    18401840    /* create a fake empty cursor */
     
    18491849     * Register our user signal handler.
    18501850     */
    1851 #ifdef RT_OS_LINUX
     1851#ifdef VBOXSDL_WITH_X11
    18521852    struct sigaction sa;
    18531853    sa.sa_sigaction = signal_handler;
     
    18551855    sa.sa_flags = SA_RESTART | SA_SIGINFO;
    18561856    sigaction (SIGUSR1, &sa, NULL);
    1857 #endif /* RT_OS_LINUX */
     1857#endif /* VBOXSDL_WITH_X11 */
    18581858
    18591859    /*
     
    24952495    if (gpDefaultCursor)
    24962496    {
    2497 #ifdef RT_OS_LINUX
     2497#ifdef VBOXSDL_WITH_X11
    24982498        Cursor pDefaultTempX11Cursor = *(Cursor*)gpDefaultCursor->wm_cursor;
    24992499        *(Cursor*)gpDefaultCursor->wm_cursor = gpDefaultOrigX11Cursor;
    2500 #endif /* RT_OS_LINUX */
     2500#endif /* VBOXSDL_WITH_X11 */
    25012501        SDL_SetCursor(gpDefaultCursor);
    2502 #ifdef RT_OS_LINUX
     2502#ifdef VBOXSDL_WITH_X11
    25032503        XFreeCursor(gSdlInfo.info.x11.display, pDefaultTempX11Cursor);
    2504 #endif /* RT_OS_LINUX */
     2504#endif /* VBOXSDL_WITH_X11 */
    25052505    }
    25062506
     
    25142514#if defined (RT_OS_WINDOWS)
    25152515            ::DestroyCursor(*(HCURSOR *) pCustomTempWMCursor);
    2516 #elif defined (RT_OS_LINUX)
     2516#elif defined (VBOXSDL_WITH_X11)
    25172517            XFreeCursor(gSdlInfo.info.x11.display, *(Cursor *) pCustomTempWMCursor);
    25182518#endif
     
    27522752    int keycode = ev->keysym.scancode;
    27532753
    2754 #ifdef RT_OS_LINUX
     2754#ifdef VBOXSDL_WITH_X11
    27552755    // workaround for SDL keyboard translation issues on Linux
    27562756    // keycodes > 0x100 are sent as 0xe0 keycode
     
    40034003            ::DeleteObject (hBitmap);
    40044004
    4005 #elif defined (RT_OS_LINUX)
     4005#elif defined (VBOXSDL_WITH_X11)
    40064006
    40074007        XcursorImage *img = XcursorImageCreate (data->width, data->height);
     
    43814381}
    43824382
    4383 #ifdef RT_OS_LINUX
     4383#ifdef VBOXSDL_WITH_X11
    43844384/**
    43854385 * Special SDL_PushEvent function for NotifyUpdate events. These events may occur in bursts
     
    44064406        RTThreadYield();
    44074407}
    4408 #endif /* RT_OS_LINUX */
     4408#endif /* VBOXSDL_WITH_X11 */
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.h

    r4071 r4637  
    6868#endif /* VBOX_WIN32_UI */
    6969
    70 #ifdef RT_OS_LINUX
     70#ifdef VBOXSDL_WITH_X11
    7171void PushNotifyUpdateEvent(SDL_Event *event);
    7272#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette