From: Dana Jansens Date: Wed, 3 Sep 2003 21:18:19 +0000 (+0000) Subject: use the ob_main_loop_timeout_remove_data to only remove one timer X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=f78b849af2667b19bdda4dd53dbe938d85312820;p=chaz%2Fopenbox use the ob_main_loop_timeout_remove_data to only remove one timer --- diff --git a/openbox/event.c b/openbox/event.c index e3efb289..d7c80949 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -645,9 +645,11 @@ static void event_handle_client(ObClient *client, XEvent *e) case OB_FRAME_CONTEXT_FRAME: /* XXX if doing a 'reconfigure' make sure you kill this timer, maybe all timers.. */ - if (config_focus_delay) { + if (config_focus_delay && client == focus_delay_client) { + ob_main_loop_timeout_remove_data(ob_main_loop, + focus_delay_func, + focus_delay_client); focus_delay_client = NULL; - ob_main_loop_timeout_remove(ob_main_loop, focus_delay_func); } default: break; @@ -695,7 +697,7 @@ static void event_handle_client(ObClient *client, XEvent *e) ob_main_loop_timeout_add(ob_main_loop, config_focus_delay, focus_delay_func, - NULL, NULL); + client, NULL); focus_delay_client = client; } else client_focus(client); @@ -1176,7 +1178,8 @@ static void focus_delay_client_dest(gpointer data) { ObClient *c = data; if (c == focus_delay_client) { + ob_main_loop_timeout_remove_data(ob_main_loop, focus_delay_func, + focus_delay_client); focus_delay_client = NULL; - ob_main_loop_timeout_remove(ob_main_loop, focus_delay_func); } }