}
}
+void keyboard_unbind_all()
+{
+ tree_destroy(keyboard_firstnode);
+ keyboard_firstnode = NULL;
+ grab_keys(FALSE);
+ curpos = NULL;
+}
+
gboolean keyboard_bind(GList *keylist, ObAction *action)
{
KeyBindingTree *tree, *t;
if (!reconfig)
client_remove_destructor(keyboard_interactive_end_client);
- tree_destroy(keyboard_firstnode);
- keyboard_firstnode = NULL;
-
for (it = interactive_states; it; it = g_slist_next(it))
g_free(it->data);
g_slist_free(interactive_states);
interactive_states = NULL;
ob_main_loop_timeout_remove(ob_main_loop, chain_timeout);
- grab_keys(FALSE);
- curpos = NULL;
+
+ keyboard_unbind_all();
}
void keyboard_shutdown(gboolean reconfig);
gboolean keyboard_bind(GList *keylist, ObAction *action);
+void keyboard_unbind_all();
void keyboard_event(struct _ObClient *client, const XEvent *e);
void keyboard_reset_chains();
mouse_grab_for_client(it->data, grab);
}
-static void clearall()
+void mouse_unbind_all()
{
int i;
GSList *it;
}
}
-gboolean mouse_bind(char *buttonstr, char *contextstr, ObMouseAction mact,
- ObAction *action)
+gboolean mouse_bind(const gchar *buttonstr, const gchar *contextstr,
+ ObMouseAction mact, ObAction *action)
{
guint state, button;
ObFrameContext context;
void mouse_shutdown(gboolean reconfig)
{
grab_all_clients(FALSE);
- clearall();
+ mouse_unbind_all();
}
void mouse_startup(gboolean reconfig);
void mouse_shutdown(gboolean reconfig);
-gboolean mouse_bind(char *buttonstr, char *contextstr, ObMouseAction mact,
- ObAction *action);
+gboolean mouse_bind(const gchar *buttonstr, const gchar *contextstr,
+ ObMouseAction mact, ObAction *action);
+void mouse_unbind_all();
void mouse_event(struct _ObClient *client, XEvent *e);