mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-23 03:25:27 +00:00
Create x11_window_destroy
This commit is contained in:
parent
d113f218a2
commit
48495980ba
@ -548,3 +548,12 @@ void x11_input_ctx_destroy(void)
|
||||
{
|
||||
x11_destroy_input_context(&g_x11_xim, &g_x11_xic);
|
||||
}
|
||||
|
||||
void x11_window_destroy(bool fullscreen)
|
||||
{
|
||||
if (g_x11_win)
|
||||
XUnmapWindow(g_x11_dpy, g_x11_win);
|
||||
if (!fullscreen)
|
||||
XDestroyWindow(g_x11_dpy, g_x11_win);
|
||||
g_x11_win = 0;
|
||||
}
|
||||
|
@ -85,5 +85,7 @@ bool x11_input_ctx_new(void);
|
||||
|
||||
void x11_input_ctx_destroy(void);
|
||||
|
||||
void x11_window_destroy(bool fullscreen);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -826,8 +826,7 @@ static void xv_free(void *data)
|
||||
shmctl(xv->shminfo.shmid, IPC_RMID, NULL);
|
||||
XFree(xv->image);
|
||||
|
||||
if (g_x11_win)
|
||||
XUnmapWindow(g_x11_dpy, g_x11_win);
|
||||
x11_window_destroy(true);
|
||||
if (xv->colormap)
|
||||
XFreeColormap(g_x11_dpy, xv->colormap);
|
||||
|
||||
|
@ -124,9 +124,7 @@ static void ctx_glx_destroy_resources(gfx_ctx_glx_data_t *glx)
|
||||
}
|
||||
#endif
|
||||
|
||||
XUnmapWindow(g_x11_dpy, g_x11_win);
|
||||
XDestroyWindow(g_x11_dpy, g_x11_win);
|
||||
g_x11_win = None;
|
||||
x11_window_destroy(false);
|
||||
}
|
||||
|
||||
if (glx->g_cmap)
|
||||
|
@ -533,9 +533,7 @@ static void gfx_ctx_xegl_destroy(void *data)
|
||||
RARCH_LOG("[X/EGL]: Saved monitor #%u.\n", g_screen);
|
||||
#endif
|
||||
|
||||
XUnmapWindow(g_x11_dpy, g_x11_win);
|
||||
XDestroyWindow(g_x11_dpy, g_x11_win);
|
||||
g_x11_win = None;
|
||||
x11_window_destroy(false);
|
||||
}
|
||||
|
||||
if (g_cmap)
|
||||
|
Loading…
x
Reference in New Issue
Block a user