wayland+x11: free system cursors when quiting video
parent
7484d02a2e
commit
fbb0914b78
|
@ -831,6 +831,7 @@ void Wayland_InitMouse(void)
|
|||
void Wayland_FiniMouse(SDL_VideoData *data)
|
||||
{
|
||||
struct SDL_WaylandInput *input = data->input;
|
||||
int i;
|
||||
|
||||
Wayland_FreeCursorThemes(data);
|
||||
|
||||
|
@ -840,6 +841,11 @@ void Wayland_FiniMouse(SDL_VideoData *data)
|
|||
|
||||
SDL_DelHintCallback(SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP,
|
||||
Wayland_EmulateMouseWarpChanged, input);
|
||||
|
||||
for (i = 0; i < SDL_arraysize(sys_cursors); i++) {
|
||||
Wayland_FreeCursor(sys_cursors[i]);
|
||||
sys_cursors[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void Wayland_SetHitTestCursor(SDL_HitTestResult rc)
|
||||
|
|
|
@ -511,6 +511,12 @@ void X11_QuitMouse(SDL_VideoDevice *_this)
|
|||
SDL_VideoData *data = _this->driverdata;
|
||||
SDL_XInput2DeviceInfo *i;
|
||||
SDL_XInput2DeviceInfo *next;
|
||||
int j;
|
||||
|
||||
for (j = 0; j < SDL_arraysize(sys_cursors); j++) {
|
||||
X11_FreeCursor(sys_cursors[j]);
|
||||
sys_cursors[j] = NULL;
|
||||
}
|
||||
|
||||
for (i = data->mouse_device_info; i; i = next) {
|
||||
next = i->next;
|
||||
|
|
Loading…
Reference in New Issue