]> Dogcows Code - chaz/openbox/blobdiff - src/client.cc
way sexier buildtree
[chaz/openbox] / src / client.cc
index 2461eff9161856005d306ea8993cbc889c58c434..e626081ce19e871a2fe37e25653f5f257ee69ed0 100644 (file)
@@ -907,6 +907,11 @@ void OBClient::unfocusHandler(const XFocusChangeEvent &e)
 
   frame->unfocus();
   _focused = false;
+
+  if (Openbox::instance->focusedClient() == this) {
+    printf("UNFOCUSED!\n");
+    Openbox::instance->setFocusedClient(this);
+  }
 }
 
 
@@ -1004,15 +1009,15 @@ void OBClient::destroyHandler(const XDestroyWindowEvent &e)
 
 void OBClient::reparentHandler(const XReparentEvent &e)
 {
+  // this is when the client is first taken captive in the frame
+  if (e.parent == frame->plate()) return;
+
 #ifdef    DEBUG
   printf("ReparentNotify for 0x%lx\n", e.window);
 #endif // DEBUG
 
   OtkEventHandler::reparentHandler(e);
 
-  // this is when the client is first taken captive in the frame
-  if (e.parent == frame->plate()) return;
-
   /*
     This event is quite rare and is usually handled in unmapHandler.
     However, if the window is unmapped when the reparent event occurs,
This page took 0.02428 seconds and 4 git commands to generate.