No \n on ob_debug in this branch.
[dana/openbox.git] / openbox / window.c
index 28b0857..19b362e 100644 (file)
@@ -23,6 +23,7 @@
 #include "client.h"
 #include "frame.h"
 #include "openbox.h"
+#include "prompt.h"
 #include "debug.h"
 #include "grab.h"
 
@@ -57,6 +58,8 @@ Window window_top(ObWindow *self)
         return WINDOW_AS_CLIENT(self)->frame->window;
     case OB_WINDOW_CLASS_INTERNAL:
         return WINDOW_AS_INTERNAL(self)->window;
+    case OB_WINDOW_CLASS_PROMPT:
+        return WINDOW_AS_PROMPT(self)->super.window;
     }
     g_assert_not_reached();
     return None;
@@ -72,6 +75,10 @@ ObStackingLayer window_layer(ObWindow *self)
     case OB_WINDOW_CLASS_MENUFRAME:
     case OB_WINDOW_CLASS_INTERNAL:
         return OB_STACKING_LAYER_INTERNAL;
+    case OB_WINDOW_CLASS_PROMPT:
+        /* not used directly for stacking, prompts are managed as clients */
+        g_assert_not_reached();
+        break;
     }
     g_assert_not_reached();
     return None;
@@ -155,7 +162,7 @@ void window_manage(Window win)
         XCheckTypedWindowEvent(obt_display, win, UnmapNotify, &e))
     {
         XPutBackEvent(obt_display, &e);
-        ob_debug("Trying to manage unmapped window. Aborting that.\n");
+        ob_debug("Trying to manage unmapped window. Aborting that.");
         no_manage = TRUE;
     }
 
@@ -180,7 +187,7 @@ void window_manage(Window win)
 
     if (!no_manage) {
         if (attrib.override_redirect) {
-            ob_debug("not managing override redirect window 0x%x\n", win);
+            ob_debug("not managing override redirect window 0x%x", win);
             grab_server(FALSE);
         }
         else if (is_dockapp) {
@@ -189,11 +196,11 @@ void window_manage(Window win)
             dock_manage(icon_win, win);
         }
         else
-            client_manage(win);
+            client_manage(win, NULL);
     }
     else {
         grab_server(FALSE);
-        ob_debug("FAILED to manage window 0x%x\n", win);
+        ob_debug("FAILED to manage window 0x%x", win);
     }
 }