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/moveresize.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/moveresize.c')
| -rw-r--r-- | openbox/moveresize.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/openbox/moveresize.c b/openbox/moveresize.c index 37c190d5..b5fe6cb0 100644 --- a/openbox/moveresize.c +++ b/openbox/moveresize.c @@ -187,10 +187,11 @@ void moveresize_start(ObClient *c, gint x, gint y, guint b, guint32 cnr) else g_assert_not_reached(); - if (!grab_pointer(TRUE, FALSE, cur)) + /* keep the pointer bounded to the screen for move/resize */ + if (!grab_pointer(FALSE, TRUE, cur)) return; - if (!grab_keyboard(TRUE)) { - grab_pointer(FALSE, FALSE, OB_CURSOR_NONE); + if (!grab_keyboard()) { + ungrab_pointer(); return; } @@ -275,8 +276,8 @@ void moveresize_end(gboolean cancel) { gint x, y; - grab_keyboard(FALSE); - grab_pointer(FALSE, FALSE, OB_CURSOR_NONE); + ungrab_keyboard(); + ungrab_pointer(); popup_hide(popup); |
