X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=libchimara%2Fmouse.c;h=2c7d7b23812e67de6d83e62fd0659d0334bb930f;hb=59f3bc1e4f21377c362c1f497fb225711127d7a0;hp=3fd464fc04aa79f4f80fcc3ce2b72d6116d12136;hpb=6a5f37b58f4e1b7ff1063864eded5661b080b2e5;p=projects%2Fchimara%2Fchimara.git diff --git a/libchimara/mouse.c b/libchimara/mouse.c index 3fd464f..2c7d7b2 100644 --- a/libchimara/mouse.c +++ b/libchimara/mouse.c @@ -1,6 +1,12 @@ #include "mouse.h" #include "magic.h" +/** + * glk_request_mouse_event: + * @win: Window on which to request a mouse input event. + * + * Requests mouse input on the window @win. + */ void glk_request_mouse_event(winid_t win) { @@ -11,6 +17,12 @@ glk_request_mouse_event(winid_t win) g_signal_handler_unblock(win->widget, win->button_press_event_handler); } +/** + * glk_cancel_mouse_event: + * @win: Window with a mouse input event pending. + * + * Cancels the pending mouse input request on @win. + */ void glk_cancel_mouse_event(winid_t win) { @@ -39,5 +51,7 @@ on_window_button_press(GtkWidget *widget, GdkEventButton *event, winid_t win) ILLEGAL_PARAM("Unknown window type: %u", win->type); } + g_signal_handler_block(win->widget, win->button_press_event_handler); + return TRUE; }