diff --git a/src/video/SDL_cursor.c b/src/video/SDL_cursor.c index 115fae111..7331fe085 100644 --- a/src/video/SDL_cursor.c +++ b/src/video/SDL_cursor.c @@ -208,9 +208,9 @@ void SDL_SetCursor (SDL_Cursor *cursor) if ( SDL_cursor && (SDL_cursorstate&CURSOR_VISIBLE) ) { /* Use window manager cursor if possible */ if ( SDL_cursor->wm_cursor && - video->ShowWMCursor(this, SDL_cursor->wm_cursor) ) + video->ShowWMCursor(this, SDL_cursor->wm_cursor) ) { SDL_cursorstate &= ~CURSOR_USINGSW; - else { + } else { SDL_cursorstate |= CURSOR_USINGSW; if ( video->ShowWMCursor ) { video->ShowWMCursor(this, NULL); diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index dbf2ed7bf..701067a2a 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -643,6 +643,7 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags) /* Reset the keyboard here so event callbacks can run */ SDL_ResetKeyboard(); SDL_ResetMouse(); + SDL_cursorstate &= ~CURSOR_USINGSW; /* Clean up any previous video mode */ if ( SDL_PublicSurface != NULL ) {