(x11_common.c) Cleanups

This commit is contained in:
twinaphex 2017-01-10 21:54:48 +01:00
parent a153d600e4
commit 34d5f609f7
1 changed files with 13 additions and 17 deletions

View File

@ -288,9 +288,6 @@ static void xdg_screensaver_inhibit(Window wnd)
cmd[0] = '\0';
if (!xdg_screensaver_available)
return;
RARCH_LOG("Suspending screensaver (X11, xdg-screensaver).\n");
snprintf(cmd, sizeof(cmd), "xdg-screensaver suspend 0x%x", (int)wnd);
@ -314,6 +311,7 @@ void x11_suspend_screensaver_xdg_screensaver(Window wnd, bool enable)
if (!enable)
return;
if (xdg_screensaver_available)
xdg_screensaver_inhibit(wnd);
}
@ -421,8 +419,8 @@ bool x11_get_xinerama_coord(Display *dpy, int screen,
{
int i, num_screens = 0;
bool ret = false;
XineramaScreenInfo *info = x11_query_screens(dpy, &num_screens);
RARCH_LOG("[X11]: Xinerama screens: %d.\n", num_screens);
for (i = 0; i < num_screens; i++)
@ -486,7 +484,6 @@ bool x11_create_input_context(Display *dpy, Window win, XIM *xim, XIC *xic)
x11_destroy_input_context(xim, xic);
g_x11_has_focus = true;
*xim = XOpenIM(dpy, NULL, NULL, NULL);
if (!*xim)
@ -559,10 +556,9 @@ bool x11_get_metrics(void *data,
bool x11_alive(void *data)
{
XEvent event;
while (XPending(g_x11_dpy))
{
XEvent event;
bool filter = false;
/* Can get events from older windows. Check this. */