diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-13 23:30:52 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-13 23:30:52 +0000 |
| commit | 9fcb2aa1d25ec9889b45d145939fb17160b1106a (patch) | |
| tree | b8ca781c16f637cf12cce61cd4aa7b38b9e1b9e9 /openbox/menuframe.c | |
| parent | 627125a6c6e6728de98aa813e353ec75bab7b54c (diff) | |
add grab/ungrab macros so dont need to pass in 10 arguments to ungrab stuff.
add a confine option to grab_pointer to confine the pointer to the screen, and use that for moveresize
Diffstat (limited to 'openbox/menuframe.c')
| -rw-r--r-- | openbox/menuframe.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/openbox/menuframe.c b/openbox/menuframe.c index c6dd02fa..68ea4949 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -914,10 +914,10 @@ static gboolean menu_frame_show(ObMenuFrame *self) /* grab the pointer in such a way as to pass through "owner events" so that we can get enter/leave notifies in the menu. */ - if (!grab_pointer(TRUE, TRUE, OB_CURSOR_POINTER)) + if (!grab_pointer(TRUE, FALSE, OB_CURSOR_POINTER)) return FALSE; - if (!grab_keyboard(TRUE)) { - grab_pointer(FALSE, TRUE, OB_CURSOR_POINTER); + if (!grab_keyboard()) { + ungrab_pointer(); return FALSE; } } @@ -1035,8 +1035,8 @@ void menu_frame_hide(ObMenuFrame *self) if (menu_frame_visible == NULL) { /* last menu shown */ - grab_pointer(FALSE, TRUE, OB_CURSOR_NONE); - grab_keyboard(FALSE); + ungrab_pointer(); + ungrab_keyboard(); } XUnmapWindow(ob_display, self->window); |
