]> Dogcows Code - chaz/openbox/commitdiff
define DEBUG, NDEBUG, and G_DISABLE_ASSERTS
authorDana Jansens <danakj@orodu.net>
Wed, 1 Oct 2003 17:28:12 +0000 (17:28 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 1 Oct 2003 17:28:12 +0000 (17:28 +0000)
m4/openbox.m4
openbox/action.c
openbox/menu.c

index 7c19ab4b1bfb0333eb3101a4fbc4e64238092c00..db592e91e6b472eb701fb3f6f4d30992d8c2f862 100644 (file)
@@ -61,12 +61,18 @@ AC_DEFUN([OB_COMPILER_FLAGS],
 
     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
index f7389cb341a28b74a11343669ff13538fa70e2ea..5f60019ecca45d2989fb07e16907170ef545212f 100644 (file)
@@ -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;
index 5efacc2a197b450bd656741bdceec54993354fbe..1585a56d2ee3287e0df02abe3a0d121938f67cac 100644 (file)
@@ -290,7 +290,13 @@ void menu_show(gchar *name, gint x, gint y, ObClient *client)
     menu_frame_hide_all();
 
     frame = menu_frame_new(self, client);
-    menu_frame_move(frame, x - ob_rr_theme->bwidth, y - ob_rr_theme->bwidth);
+    if (client && x < 0 && y < 0)
+        menu_frame_move(frame,
+                        client->frame->area.x + client->frame->size.left,
+                        client->frame->area.y + client->frame->size.top);
+    else
+        menu_frame_move(frame,
+                        x - ob_rr_theme->bwidth, y - ob_rr_theme->bwidth);
     menu_frame_show(frame, NULL);
     if (frame->entries)
         menu_frame_select_next(frame);
This page took 0.032289 seconds and 4 git commands to generate.