diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index 23112c28d3..5f5b302e6f 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -219,23 +219,15 @@ static void xdg_screensaver_inhibit(Window wnd) } } -void x11_suspend_screensaver_xdg_screensaver(Window wnd, bool enable) -{ - /* Check if screensaver suspend is enabled in config */ - if (!enable) - return; - - if (xdg_screensaver_available) - xdg_screensaver_inhibit(wnd); -} - void x11_suspend_screensaver(Window wnd, bool enable) { #ifdef HAVE_DBUS if (dbus_suspend_screensaver(enable)) return; #endif - x11_suspend_screensaver_xdg_screensaver(wnd, enable); + if (enable) + if (xdg_screensaver_available) + xdg_screensaver_inhibit(wnd); } float x11_get_refresh_rate(void *data)