diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index 659da15818..589a06772b 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -34,6 +34,7 @@ Atom g_x11_quit_atom; static volatile sig_atomic_t g_x11_quit; bool g_x11_has_focus; Window g_x11_win; +XIM g_x11_xim; XIC g_x11_xic; Display *g_x11_dpy; bool g_x11_true_full; diff --git a/gfx/common/x11_common.h b/gfx/common/x11_common.h index febd9227ba..16167ea103 100644 --- a/gfx/common/x11_common.h +++ b/gfx/common/x11_common.h @@ -39,6 +39,7 @@ extern Atom g_x11_quit_atom; extern bool g_x11_has_focus; extern Window g_x11_win; extern XIC g_x11_xic; +extern XIM g_x11_xim; extern Display *g_x11_dpy; extern bool g_x11_true_full; diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c index 54dda347ba..5f3a37346b 100644 --- a/gfx/drivers/xvideo.c +++ b/gfx/drivers/xvideo.c @@ -44,7 +44,6 @@ typedef struct xv GC gc; Colormap colormap; XShmSegmentInfo shminfo; - XIM xim; XvPortID port; int depth; @@ -577,7 +576,7 @@ static void *xv_init(const video_info_t *video, init_yuv_tables(xv); xv_init_font(xv, settings->video.font_path, settings->video.font_size); - if (!x11_create_input_context(g_x11_dpy, g_x11_win, &xv->xim, &g_x11_xic)) + if (!x11_create_input_context(g_x11_dpy, g_x11_win, &g_x11_xim, &g_x11_xic)) goto error; XGetWindowAttributes(g_x11_dpy, g_x11_win, &target); @@ -820,7 +819,7 @@ static void xv_free(void *data) if (!xv) return; - x11_destroy_input_context(&xv->xim, &g_x11_xic); + x11_destroy_input_context(&g_x11_xim, &g_x11_xic); XShmDetach(g_x11_dpy, &xv->shminfo); shmdt(xv->shminfo.shmaddr); shmctl(xv->shminfo.shmid, IPC_RMID, NULL); diff --git a/gfx/drivers_context/glx_ctx.c b/gfx/drivers_context/glx_ctx.c index 233c1a4106..330148f073 100644 --- a/gfx/drivers_context/glx_ctx.c +++ b/gfx/drivers_context/glx_ctx.c @@ -44,8 +44,6 @@ typedef struct gfx_ctx_glx_data unsigned g_screen; unsigned g_interval; - XIM g_xim; - GLXContext g_ctx, g_hw_ctx; GLXFBConfig g_fbc; @@ -85,7 +83,7 @@ static void ctx_glx_destroy_resources(gfx_ctx_glx_data_t *glx) if (!glx) return; - x11_destroy_input_context(&glx->g_xim, &g_x11_xic); + x11_destroy_input_context(&g_x11_xim, &g_x11_xic); if (g_x11_dpy && glx->g_ctx) { @@ -520,7 +518,7 @@ static bool gfx_ctx_glx_set_video_mode(void *data, XFree(vi); - if (!x11_create_input_context(g_x11_dpy, g_x11_win, &glx->g_xim, &g_x11_xic)) + if (!x11_create_input_context(g_x11_dpy, g_x11_win, &g_x11_xim, &g_x11_xic)) goto error; driver->display_type = RARCH_DISPLAY_X11; diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index 6b3246bbdb..fb7c86c6d1 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -36,8 +36,6 @@ static Colormap g_cmap; static unsigned g_screen; -static XIM g_xim; - static bool g_use_hw_ctx; static EGLContext g_egl_hw_ctx; static EGLContext g_egl_ctx; @@ -470,7 +468,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, XFree(vi); g_inited = true; - if (!x11_create_input_context(g_x11_dpy, g_x11_win, &g_xim, &g_x11_xic)) + if (!x11_create_input_context(g_x11_dpy, g_x11_win, &g_x11_xim, &g_x11_xic)) goto error; driver->display_type = RARCH_DISPLAY_X11; @@ -492,7 +490,7 @@ static void gfx_ctx_xegl_destroy(void *data) { (void)data; - x11_destroy_input_context(&g_xim, &g_x11_xic); + x11_destroy_input_context(&g_x11_xim, &g_x11_xic); if (g_egl_dpy) {