static void
_e_keyrouter_init_handlers(void)
{
- E_Input_Event_Source *input_event_source = NULL;
-
E_LIST_HANDLER_APPEND(krt->handlers, E_EVENT_CLIENT_STACK, _e_keyrouter_client_cb_stack, NULL);
E_LIST_HANDLER_APPEND(krt->handlers, E_EVENT_CLIENT_REMOVE, _e_keyrouter_client_cb_remove, NULL);
}
else
{
- input_event_source = e_input_event_source_get();
- if (input_event_source)
- {
- g_mutex_lock(&krt->event_handler_mutex);
-
- if (!krt->_key_down_handler)
- krt->_key_down_handler = e_input_event_handler_add(input_event_source, ECORE_EVENT_KEY_DOWN, _e_keyrouter_cb_key_down, NULL);
-
- if (!krt->_key_up_handler)
- krt->_key_up_handler = e_input_event_handler_add(input_event_source, ECORE_EVENT_KEY_UP, _e_keyrouter_cb_key_up, NULL);
-
- g_mutex_unlock(&krt->event_handler_mutex);
- }
+ e_keyrouter_input_handler_add();
}
e_info_server_hook_set("keyrouter", _e_keyrouter_info_print, NULL);
void e_keyrouter_keygrab_list_unlock()
{
g_rec_mutex_unlock(&krt->grab_key_mutex);
-}
\ No newline at end of file
+}