diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-10-01 17:28:12 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-10-01 17:28:12 +0000 |
| commit | 6f5292c87ece138a2b80d102ba0919b105b1839a (patch) | |
| tree | 02cfee90c7c8198467a019f10b79b5f7fd8422a7 /openbox/action.c | |
| parent | 825426373cec4e4cc25f5056b2b54bb00ab28653 (diff) | |
define DEBUG, NDEBUG, and G_DISABLE_ASSERTS
Diffstat (limited to 'openbox/action.c')
| -rw-r--r-- | openbox/action.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/openbox/action.c b/openbox/action.c index f7389cb3..5f60019e 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -798,6 +798,13 @@ ActionString actionstrings[] = } }; +/* only key bindings can be interactive. thus saith the xor. + because of how the mouse is grabbed, mouse events dont even get + read during interactive events, so no dice! >:) */ +#define INTERACTIVE_LIMIT(a, uact) \ + if (uact != OB_USER_ACTION_KEYBOARD_KEY) \ + a->data.any.interactive = FALSE; + ObAction *action_from_string(const gchar *name, ObUserAction uact) { ObAction *a = NULL; @@ -810,11 +817,7 @@ ObAction *action_from_string(const gchar *name, ObUserAction uact) a = action_new(actionstrings[i].func); if (actionstrings[i].setup) actionstrings[i].setup(&a, uact); - /* only key bindings can be interactive. thus saith the xor. - because of how the mouse is grabbed, mouse events dont even get - read during interactive events, so no dice! >:) */ - if (uact != OB_USER_ACTION_KEYBOARD_KEY) - a->data.any.interactive = FALSE; + INTERACTIVE_LIMIT(a, uact); break; } if (!exist) @@ -889,6 +892,7 @@ ObAction *action_parse(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, act->data.cycle.dialog = parse_bool(doc, n); } } + INTERACTIVE_LIMIT(act, uact); g_free(actname); } return act; |
