diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-04-17 05:28:35 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-04-17 05:28:35 +0000 |
| commit | 7886b797a36f5a035a75a19424e0b3cf7825baf8 (patch) | |
| tree | d7279da4dbeda975909f71af3193a39ce7e69901 /plugins/mouse/mouseparse.c | |
| parent | 55c424d38bb119bd04199ed5e73b035b00474dd9 (diff) | |
move the move/resize functionality into moveresize.c, for use with the netwm atoms. use it from teh plugins. combine the two actions.
Diffstat (limited to 'plugins/mouse/mouseparse.c')
| -rw-r--r-- | plugins/mouse/mouseparse.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/plugins/mouse/mouseparse.c b/plugins/mouse/mouseparse.c index 099dbaa8..f9f5f2f6 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,26 @@ 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 (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 == + 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) { |
