(X11) Turn these two functions static

This commit is contained in:
LibretroAdmin 2022-08-05 02:00:09 +02:00
parent c6b99a5df0
commit 72a7b3ce07
2 changed files with 25 additions and 27 deletions

View File

@ -383,7 +383,31 @@ static void x11_init_keyboard_lut(void)
x11_keysym_rlut_size = 0;
}
bool x11_create_input_context(Display *dpy, Window win, XIM *xim, XIC *xic)
static void x11_destroy_input_context(XIM *xim, XIC *xic)
{
if (*xic)
{
XDestroyIC(*xic);
*xic = NULL;
}
if (*xim)
{
XCloseIM(*xim);
*xim = NULL;
}
memset(x11_keysym_lut, 0, sizeof(x11_keysym_lut));
if (x11_keysym_rlut)
{
free(x11_keysym_rlut);
x11_keysym_rlut = NULL;
}
x11_keysym_rlut_size = 0;
}
static bool x11_create_input_context(Display *dpy, Window win, XIM *xim, XIC *xic)
{
x11_destroy_input_context(xim, xic);
x11_init_keyboard_lut();
@ -410,29 +434,6 @@ bool x11_create_input_context(Display *dpy, Window win, XIM *xim, XIC *xic)
return true;
}
void x11_destroy_input_context(XIM *xim, XIC *xic)
{
if (*xic)
{
XDestroyIC(*xic);
*xic = NULL;
}
if (*xim)
{
XCloseIM(*xim);
*xim = NULL;
}
memset(x11_keysym_lut, 0, sizeof(x11_keysym_lut));
if (x11_keysym_rlut)
{
free(x11_keysym_rlut);
x11_keysym_rlut = NULL;
}
x11_keysym_rlut_size = 0;
}
bool x11_get_metrics(void *data,
enum display_metric_types type, float *value)
{

View File

@ -40,9 +40,6 @@ void x11_move_window(Display *dpy, Window win,
/* Set icon, class, default stuff. */
void x11_set_window_attr(Display *dpy, Window win);
bool x11_create_input_context(Display *dpy, Window win, XIM *xim, XIC *xic);
void x11_destroy_input_context(XIM *xim, XIC *xic);
bool x11_get_metrics(void *data,
enum display_metric_types type, float *value);