X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=plugins%2Fmouse%2Fmouseparse.c;h=2c94fb19cd50c6a83c354a8bc6d62afb1f757ce6;hb=ae9aed85452093b7932b9c4c86506b4599c54d68;hp=099dbaa8c0b0ddf5c13c1e433656c130c6c204d5;hpb=0e28a07e3d6677aa6af9ad97fbc55f8101f3fdf2;p=chaz%2Fopenbox diff --git a/plugins/mouse/mouseparse.c b/plugins/mouse/mouseparse.c index 099dbaa8..2c94fb19 100644 --- a/plugins/mouse/mouseparse.c +++ b/plugins/mouse/mouseparse.c @@ -1,5 +1,6 @@ #include "kernel/action.h" #include "kernel/parse.h" +#include "kernel/prop.h" #include "mouse.h" void mouseparse(ParseToken *token) @@ -68,12 +69,24 @@ void mouseparse(ParseToken *token) action = action_from_string(token->data.identifier); /* check for valid actions for motion events */ - if ((event == MouseAction_Motion) ^ - (action && - (action->func == action_move || - action->func == action_resize))) { - action_free(action); - action = NULL; + if (event == MouseAction_Motion) { + if (action && (action->func != action_moveresize || + action->data.moveresize.corner == + prop_atoms.net_wm_moveresize_move_keyboard || + action->data.moveresize.corner == + prop_atoms.net_wm_moveresize_size_keyboard)) { + action_free(action); + action = NULL; + } + } else { + if (action && action->func == action_moveresize && + action->data.moveresize.corner != + prop_atoms.net_wm_moveresize_move_keyboard && + action->data.moveresize.corner != + prop_atoms.net_wm_moveresize_size_keyboard) { + action_free(action); + action = NULL; + } } if (action != NULL) {