From bc226305d7c0fcd3aeee22d1f1221ea8e7cabd8c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 24 May 2020 19:38:41 +0200 Subject: [PATCH] (x11_common.c) Cleanup --- gfx/common/x11_common.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) 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)