diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index 0295d40d35..3fabdd01c8 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -33,7 +33,7 @@ static Atom XA_NET_MOVERESIZE_WINDOW; Colormap g_x11_cmap; static Atom g_x11_quit_atom; static volatile sig_atomic_t g_x11_quit; -bool g_x11_has_focus; +static bool g_x11_has_focus; Window g_x11_win; static XIM g_x11_xim; static XIC g_x11_xic; @@ -482,6 +482,11 @@ void x11_get_video_size(void *data, unsigned *width, unsigned *height) } } +bool x11_has_focus_internal(void *data) +{ + return g_x11_has_focus; +} + bool x11_has_focus(void *data) { Window win; diff --git a/gfx/common/x11_common.h b/gfx/common/x11_common.h index 162fb5c56e..5b4ef825e4 100644 --- a/gfx/common/x11_common.h +++ b/gfx/common/x11_common.h @@ -35,7 +35,6 @@ #include "../video_context_driver.h" -extern bool g_x11_has_focus; extern Window g_x11_win; extern Display *g_x11_dpy; extern Colormap g_x11_cmap; @@ -72,6 +71,8 @@ void x11_get_video_size(void *data, unsigned *width, unsigned *height); bool x11_has_focus(void *data); +bool x11_has_focus_internal(void *data); + bool x11_alive(void *data); void x11_install_sighandlers(void); diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c index 0e78d329e4..29d139ac35 100644 --- a/gfx/drivers/xvideo.c +++ b/gfx/drivers/xvideo.c @@ -775,11 +775,6 @@ static bool xv_frame(void *data, const void *frame, unsigned width, return true; } -static bool xv_focus(void *data) -{ - return g_x11_has_focus; -} - static bool xv_suppress_screensaver(void *data, bool enable) { driver_t *driver = driver_get_ptr(); @@ -870,7 +865,7 @@ video_driver_t video_xvideo = { xv_frame, xv_set_nonblock_state, x11_alive, - xv_focus, + x11_has_focus_internal, xv_suppress_screensaver, xv_has_windowed, xv_set_shader,