diff -r 775bba9b53df -r 4a451e6f3c66 pidgin/gtkidle.c --- a/pidgin/gtkidle.c Sun Jul 09 15:45:21 2017 -0500 +++ b/pidgin/gtkidle.c Sun Jul 09 16:15:25 2017 -0500 @@ -53,7 +53,6 @@ "/org/kde/ScreenSaver", "org.kde.ScreenSaver" }, - { NULL, NULL, NULL} }; #endif /* !HAVE_IOKIT && !_WIN32 */ @@ -100,7 +99,7 @@ /* Query Windows */ return (GetTickCount() - winpidgin_get_lastactive()) / 1000; # else - static const PidginDBusScreenSaverInfo *info = screensavers; + static guint idx = 0; GApplication *app; GDBusConnection *conn; GVariant *reply = NULL; @@ -124,7 +123,9 @@ return 0; } - while (reply == NULL && info->bus_name != NULL) { + for (; idx < G_N_ELEMENTS(screensavers); ++idx) { + const PidginDBusScreenSaverInfo *info = &screensavers[idx]; + reply = g_dbus_connection_call_sync(conn, info->bus_name, info->object_path, info->iface_name, "GetActiveTime", @@ -156,7 +157,6 @@ } g_clear_error(&error); - ++info; } if (reply == NULL) {