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;
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);
{
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);
}
}