diff --git a/gfx/video_driver.c b/gfx/video_driver.c index ea92fc776b..daa2766984 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -123,7 +123,7 @@ typedef struct video_pixel_scaler static void (*video_driver_cb_shader_use)(void *data, void *shader_data, unsigned index, bool set_active); static bool (*video_driver_cb_shader_set_mvp)(void *data, void *shader_data, const math_matrix_4x4 *mat); -static bool (*video_driver_cb_has_focus)(void); +bool (*video_driver_cb_has_focus)(void); /* Opaque handles to currently running window. * Used by e.g. input drivers which bind to a window. diff --git a/gfx/video_driver.h b/gfx/video_driver.h index a61168b4f7..ea0d3f104c 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -776,8 +776,6 @@ struct aspect_ratio_elem extern struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END]; -bool video_driver_is_focused(void); - bool video_driver_has_windowed(void); bool video_driver_cached_frame_has_valid_framebuffer(void); @@ -1236,6 +1234,8 @@ bool video_shader_driver_compile_program(struct shader_program_info *program_inf bool video_shader_driver_wrap_type(video_shader_ctx_wrap_t *wrap); +extern bool (*video_driver_cb_has_focus)(void); + extern shader_backend_t *current_shader; extern void *shader_data; diff --git a/input/drivers/x11_input.c b/input/drivers/x11_input.c index 92c42f02d6..64af7fabbd 100644 --- a/input/drivers/x11_input.c +++ b/input/drivers/x11_input.c @@ -310,7 +310,7 @@ static void x_input_poll_mouse(x11_input_t *x11) x11->mouse_r = mask & Button3Mask; /* Somewhat hacky, but seem to do the job. */ - if (x11->grab_mouse && video_driver_is_focused()) + if (x11->grab_mouse && video_driver_cb_has_focus()) { int mid_w, mid_h; struct video_viewport vp; @@ -345,7 +345,7 @@ static void x_input_poll(void *data) { x11_input_t *x11 = (x11_input_t*)data; - if (video_driver_is_focused()) + if (video_driver_cb_has_focus()) XQueryKeymap(x11->display, x11->state); else memset(x11->state, 0, sizeof(x11->state));