| | |
| | | /* |
| | | Simple DirectMedia Layer |
| | | Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org> |
| | | Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> |
| | | |
| | | This software is provided 'as-is', without any express or implied |
| | | warranty. In no event will the authors be held liable for any damages |
| | |
| | | #include "../../SDL_internal.h" |
| | | |
| | | #if SDL_VIDEO_DRIVER_WAYLAND |
| | | |
| | | #ifndef _GNU_SOURCE |
| | | #define _GNU_SOURCE |
| | | #endif |
| | | |
| | | #include <sys/types.h> |
| | | #include <sys/mman.h> |
| | |
| | | /* This effectively assumes that nobody else |
| | | * touches SDL_Mouse which is effectively |
| | | * a singleton */ |
| | | |
| | | SDL_Mouse *mouse = SDL_GetMouse(); |
| | | |
| | | /* Free the current cursor if not the same pointer as |
| | | * the default cursor */ |
| | | if (mouse->def_cursor != mouse->cur_cursor) |
| | | Wayland_FreeCursor (mouse->cur_cursor); |
| | | |
| | | Wayland_FreeCursor (mouse->def_cursor); |
| | | mouse->def_cursor = NULL; |
| | | mouse->cur_cursor = NULL; |
| | | |
| | | mouse->CreateCursor = NULL; |
| | | mouse->CreateSystemCursor = NULL; |
| | | mouse->ShowCursor = NULL; |
| | | mouse->FreeCursor = NULL; |
| | | mouse->WarpMouse = NULL; |
| | | mouse->SetRelativeMouseMode = NULL; |
| | | } |
| | | #endif /* SDL_VIDEO_DRIVER_WAYLAND */ |