mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
[KMS/DRM_LEGACY] Prevent mouse cursor from staying onscreen after window destruction. Patch by Ozkan Sezer.
This commit is contained in:
parent
0feaf7d196
commit
86b81abea6
@ -821,9 +821,15 @@ KMSDRM_LEGACY_DestroyWindow(_THIS, SDL_Window * window)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove from the internal window list */
|
|
||||||
viddata = windata->viddata;
|
viddata = windata->viddata;
|
||||||
|
|
||||||
|
/* If this is the only window left, hide the cursor. */
|
||||||
|
if (viddata->num_windows == 1)
|
||||||
|
{
|
||||||
|
SDL_ShowCursor(SDL_FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove from the internal window list */
|
||||||
for (i = 0; i < viddata->num_windows; i++) {
|
for (i = 0; i < viddata->num_windows; i++) {
|
||||||
if (viddata->windows[i] == window) {
|
if (viddata->windows[i] == window) {
|
||||||
viddata->num_windows--;
|
viddata->num_windows--;
|
||||||
|
Loading…
Reference in New Issue
Block a user