X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fping.c;h=19922b25af25554d3fb6d7fb09fdc3dc2a171a01;hb=ff78d28f8bcdbbdd42fe9501ee81185f67a4166a;hp=687dd7f48461baef99b04012d5959bf7494038dd;hpb=d3e9fc8941831477b50678b9bd676e29f4bed1a7;p=chaz%2Fopenbox diff --git a/openbox/ping.c b/openbox/ping.c index 687dd7f4..19922b25 100644 --- a/openbox/ping.c +++ b/openbox/ping.c @@ -35,7 +35,7 @@ typedef struct _ObPingTarget static GSList *ping_targets = NULL; static gboolean active = FALSE; -#define PING_TIMEOUT (G_USEC_PER_SEC * 1) +#define PING_TIMEOUT (G_USEC_PER_SEC * 3) /*! Warn the user after this many PING_TIMEOUT intervals */ #define PING_TIMEOUT_WARN 3 @@ -64,7 +64,7 @@ void ping_start(struct _ObClient *client, ObPingEventHandler h) ping_send(t); ping_targets = g_slist_prepend(ping_targets, t); ob_main_loop_timeout_add(ob_main_loop, PING_TIMEOUT, ping_timeout, - t, NULL, NULL); + t, g_direct_equal, NULL); if (!active) { active = TRUE; @@ -87,7 +87,8 @@ void ping_got_pong(Time timestamp) for (it = ping_targets; it != NULL; it = g_slist_next(it)) { t = it->data; if (t->sent == timestamp) { - ob_debug("Got PONG with timestamp %lu\n", timestamp); + /*ob_debug("PONG: '%s' (timestamp %lu)\n", t->client->title, + t->sent);*/ if (t->waiting > PING_TIMEOUT_WARN) { /* we had notified that they weren't responding, so now we need to notify that they are again */ @@ -106,7 +107,7 @@ void ping_got_pong(Time timestamp) static void ping_send(ObPingTarget *t) { t->sent = event_get_server_time(); - ob_debug("PINGing client 0x%x at %lu\n", t->client->window, t->sent); + /*ob_debug("PING: '%s' (timestamp %lu)\n", t->client->title, t->sent);*/ PROP_MSG_TO(t->client->window, t->client->window, wm_protocols, prop_atoms.net_wm_ping, t->sent, t->client->window, 0, 0, NoEventMask);