diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index 09a3d3aeb2..5e2510b945 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -457,7 +457,7 @@ void x11_get_video_size(unsigned *width, unsigned *height) } } -bool x11_has_focus(void) +bool x11_has_focus(void *data) { Window win; int rev; diff --git a/gfx/common/x11_common.h b/gfx/common/x11_common.h index cdc8960bda..49825288e4 100644 --- a/gfx/common/x11_common.h +++ b/gfx/common/x11_common.h @@ -72,7 +72,7 @@ void x11_check_window(bool *quit); void x11_get_video_size(unsigned *width, unsigned *height); -bool x11_has_focus(void); +bool x11_has_focus(void *data); #endif diff --git a/gfx/drivers_context/glx_ctx.c b/gfx/drivers_context/glx_ctx.c index 8ccd0f200e..73171c186b 100644 --- a/gfx/drivers_context/glx_ctx.c +++ b/gfx/drivers_context/glx_ctx.c @@ -611,11 +611,6 @@ static void gfx_ctx_glx_input_driver(void *data, *input_data = xinput; } -static bool gfx_ctx_glx_has_focus(void *data) -{ - return x11_has_focus(); -} - static bool gfx_ctx_glx_suppress_screensaver(void *data, bool enable) { driver_t *driver = driver_get_ptr(); @@ -665,11 +660,6 @@ static bool gfx_ctx_glx_bind_api(void *data, enum gfx_ctx_api api, static void gfx_ctx_glx_show_mouse(void *data, bool state) { - driver_t *driver = driver_get_ptr(); - gfx_ctx_glx_data_t *glx = (gfx_ctx_glx_data_t*)driver->video_context_data; - - (void)data; - x11_show_mouse(g_x11_dpy, g_x11_win, state); } @@ -694,12 +684,6 @@ static void gfx_ctx_glx_bind_hw_render(void *data, bool enable) glx->g_glx_win, enable ? glx->g_hw_ctx : glx->g_ctx); } -static bool gfx_ctx_glx_get_metrics(void *data, - enum display_metric_types type, float *value) -{ - return x11_get_metrics(data, type, value); -} - const gfx_ctx_driver_t gfx_ctx_glx = { gfx_ctx_glx_init, gfx_ctx_glx_destroy, @@ -710,12 +694,12 @@ const gfx_ctx_driver_t gfx_ctx_glx = { NULL, /* get_video_output_size */ NULL, /* get_video_output_prev */ NULL, /* get_video_output_next */ - gfx_ctx_glx_get_metrics, + x11_get_metrics, NULL, gfx_ctx_glx_update_window_title, gfx_ctx_glx_check_window, gfx_ctx_glx_set_resize, - gfx_ctx_glx_has_focus, + x11_has_focus, gfx_ctx_glx_suppress_screensaver, gfx_ctx_glx_has_windowed, gfx_ctx_glx_swap_buffers, diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index 8696d8e6e9..8e84ab2171 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -636,7 +636,7 @@ static bool gfx_ctx_xegl_has_focus(void *data) if (!g_inited) return false; - return x11_has_focus(); + return x11_has_focus(data); } static bool gfx_ctx_xegl_suppress_screensaver(void *data, bool enable) @@ -719,12 +719,6 @@ static void gfx_ctx_xegl_bind_hw_render(void *data, bool enable) g_egl_surf, enable ? g_egl_hw_ctx : g_egl_ctx); } -static bool gfx_ctx_xegl_get_metrics(void *data, -enum display_metric_types type, float *value) -{ - return x11_get_metrics(data, type, value); -} - const gfx_ctx_driver_t gfx_ctx_x_egl = { gfx_ctx_xegl_init, @@ -736,7 +730,7 @@ const gfx_ctx_driver_t gfx_ctx_x_egl = NULL, /* get_video_output_size */ NULL, /* get_video_output_prev */ NULL, /* get_video_output_next */ - gfx_ctx_xegl_get_metrics, + x11_get_metrics, NULL, gfx_ctx_xegl_update_window_title, gfx_ctx_xegl_check_window,