all repos — openbox @ c4af950903820221bc8617de81231de32eef4f07

openbox fork - make it a bit more like ryudo

fix up support for moveresize. make keyboard grabs Async so that i can hit escape to cancel a moveresize process.
Dana Jansens danakj@orodu.net
commit

c4af950903820221bc8617de81231de32eef4f07

parent

de70d9ffc519d1b255246483c28f2a08bf6354bb

M openbox/event.copenbox/event.c

@@ -689,9 +689,13 @@ prop_atoms.net_wm_moveresize_size_keyboard ||

(Atom)e->xclient.data.l[2] == prop_atoms.net_wm_moveresize_move_keyboard) { + g_message("client %lx x %d y %d button %d corner %d", + client, e->xclient.data.l[0], + e->xclient.data.l[1], e->xclient.data.l[3], + e->xclient.data.l[2]); moveresize_start(client, e->xclient.data.l[0], - e->xclient.data.l[1], e->xclient.data.l[2], - e->xclient.data.l[3]); + e->xclient.data.l[1], e->xclient.data.l[3], + e->xclient.data.l[2]); } } else if (msgtype == prop_atoms.net_moveresize_window) { int oldg = client->gravity;
M openbox/grab.copenbox/grab.c

@@ -6,6 +6,7 @@ #include <glib.h>

#include <X11/Xlib.h> #define GRAB_PTR_MASK (ButtonPressMask | ButtonReleaseMask | ButtonMotionMask) +#define GRAB_KEY_MASK (KeyPressMask | KeyReleaseMask) #define MASK_LIST_SIZE 8

@@ -17,8 +18,8 @@ {

static guint kgrabs = 0; if (grab) { if (kgrabs++ == 0) - XGrabKeyboard(ob_display, ob_root, 0, GrabModeAsync, GrabModeSync, - event_lasttime); + XGrabKeyboard(ob_display, ob_root, FALSE, GrabModeAsync, + GrabModeAsync, event_lasttime); } else if (kgrabs > 0) { if (--kgrabs == 0) XUngrabKeyboard(ob_display, event_lasttime);
M openbox/grab.hopenbox/grab.h

@@ -7,7 +7,7 @@

void grab_startup(); void grab_shutdown(); -void grab_keyboard(gboolean grab); +int grab_keyboard(gboolean grab); void grab_pointer(gboolean grab, Cursor cur); void grab_pointer_window(gboolean grab, Cursor cur, Window win); void grab_server(gboolean grab);
M openbox/moveresize.copenbox/moveresize.c

@@ -117,8 +117,8 @@ cur = ob_cursors.move;

else g_assert_not_reached(); - grab_keyboard(TRUE); grab_pointer(TRUE, cur); + grab_keyboard(TRUE); } static void end_moveresize(gboolean cancel)
M openbox/moveresize.hopenbox/moveresize.h

@@ -9,7 +9,7 @@ extern gboolean moveresize_in_progress;

void moveresize_startup(); -void moveresize_start(Client *c, int x, int y, guint b, guint32 corner); +void moveresize_start(Client *c, int x, int y, guint button, guint32 corner); void moveresize_event(XEvent *e);
M plugins/mouse/mouseparse.cplugins/mouse/mouseparse.c

@@ -69,8 +69,6 @@ if (token->type == TOKEN_IDENTIFIER) {

action = action_from_string(token->data.identifier); /* check for valid actions for motion events */ - if (action->func == action_moveresize) - g_message("%d", action->data.moveresize.corner); if (event == MouseAction_Motion) { if (action && (action->func != action_moveresize || action->data.moveresize.corner ==