diff --git a/gb.sdl/src/SDLcursor.cpp b/gb.sdl/src/SDLcursor.cpp index 563e7be76..bb3e5f09a 100644 --- a/gb.sdl/src/SDLcursor.cpp +++ b/gb.sdl/src/SDLcursor.cpp @@ -54,15 +54,12 @@ SDLcursor::~SDLcursor() XcursorImageDestroy(hImgCursor); } -void SDLcursor::Show() +void SDLcursor::Show(Window w) { Cursor cursor = hCursor; int shape = hShape; Display *myDisplay = SDLapp->X11appDisplay(); -// if (!SDLcore::GetWindow()->IsShown()) -// return; - if (hShape == SDL::BlankCursor) { SDL_ShowCursor(SDL_DISABLE); @@ -82,7 +79,7 @@ void SDLcursor::Show() else cursor = XcursorImageLoadCursor(myDisplay, hImgCursor); - XDefineCursor(myDisplay, SDLapp->CurrentWin(), cursor); + XDefineCursor(myDisplay, w, cursor); SDLapp->UnlockX11(); } @@ -122,6 +119,5 @@ void SDLcursor::SetCursor(SDLsurface *image, int xhot, int yhot) hImgCursor->xhot = xhot; hImgCursor->yhot = yhot; hShape = SDL::CustomCursor; - } diff --git a/gb.sdl/src/SDLcursor.h b/gb.sdl/src/SDLcursor.h index 3821b0ad6..9dd4cf964 100644 --- a/gb.sdl/src/SDLcursor.h +++ b/gb.sdl/src/SDLcursor.h @@ -36,7 +36,7 @@ public: SDLcursor(const SDLcursor& cursor); ~SDLcursor(); - void Show(void ); + void Show(Window ); void SetShape(int ); void SetCursor(SDLsurface* image, int xhot = -1, int yhot = -1); diff --git a/gb.sdl/src/SDLwindow.cpp b/gb.sdl/src/SDLwindow.cpp index 94d144cbe..7fa4e318e 100644 --- a/gb.sdl/src/SDLwindow.cpp +++ b/gb.sdl/src/SDLwindow.cpp @@ -36,7 +36,7 @@ SDLwindow::SDLwindow(void ) hHeight = 480; hFullScreen = false; hResizable = false; - hTitle = (char *) "SDL application"; + hTitle = (char *) "Gambas SDL application"; } SDLwindow::~SDLwindow() @@ -69,7 +69,7 @@ void SDLwindow::Show() hDpy = glXGetCurrentDisplay(); /* Set our custom cursor */ - hCursor->Show(); + hCursor->Show(SDLapp->CurrentWin()); SDL_WM_SetCaption(hTitle, hTitle); @@ -119,8 +119,8 @@ void SDLwindow::Clear(Uint32 color) if (!hSurface) return; - glClearColor((GLfloat((color >> 24) & 0xFF)/255), (GLfloat((color >> 16) & 0xFF)/255), - (GLfloat((color >> 8) & 0xFF)/255), 1.0f); + glClearColor((GLfloat((color >> 16) & 0xFF)/255), (GLfloat((color >> 8) & 0xFF)/255), + (GLfloat((color & 0xFF)/255)), (GLfloat(~(color >> 24) & 0xFF)/255)); glClear(GL_COLOR_BUFFER_BIT); }