(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;
#include <X11/Xlib.h>
#define GRAB_PTR_MASK (ButtonPressMask | ButtonReleaseMask | ButtonMotionMask)
+#define GRAB_KEY_MASK (KeyPressMask | KeyReleaseMask)
#define MASK_LIST_SIZE 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);
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);
else
g_assert_not_reached();
- grab_keyboard(TRUE);
grab_pointer(TRUE, cur);
+ grab_keyboard(TRUE);
}
static void end_moveresize(gboolean cancel)
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);
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 ==