use the ob_main_loop_timeout_remove_data to only remove one timer
This commit is contained in:
parent
792d3e7a70
commit
f78b849af2
1 changed files with 7 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue