define DEBUG, NDEBUG, and G_DISABLE_ASSERTS
Dana Jansens danakj@orodu.net
3 files changed,
23 insertions(+),
7 deletions(-)
M
m4/openbox.m4
→
m4/openbox.m4
@@ -61,12 +61,18 @@ AC_REQUIRE([AC_PROG_CC])
FLAGS="" + if test "$DEBUG" = "yes"; then + FLAGS="-DDEBUG" + else + FLAGS="-DNDEBUG -DG_DISABLE_ASSERT" + fi + # Check what compiler we are using AC_MSG_CHECKING([for GNU CC]) if test "$GCC" = "yes"; then AC_MSG_RESULT([yes]) if test "$DEBUG" = "yes"; then - FLAGS="-g -fno-inline" + FLAGS="$FLAGS -g -fno-inline" FLAGS="$FLAGS -Wall -Wsign-compare -Waggregate-return" FLAGS="$FLAGS -Wcast-qual -Wbad-function-cast -Wpointer-arith" # for Python.h
M
openbox/action.c
→
openbox/action.c
@@ -798,6 +798,13 @@ NULL
} }; +/* 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 @@ exist = TRUE;
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 @@ if ((n = parse_find_node("dialog", node->xmlChildrenNode)))
act->data.cycle.dialog = parse_bool(doc, n); } } + INTERACTIVE_LIMIT(act, uact); g_free(actname); } return act;