]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
change the menu plugin interface, no need for the create/destroy functions any more.
[chaz/openbox] / openbox / client.c
index f1dc11aa03a62f802df400ba164e77ac0a776f44..f17e9724fc228afa338b83c6604d875c4f339acb 100644 (file)
@@ -17,7 +17,7 @@
 #include "openbox.h"
 #include "group.h"
 #include "config.h"
-#include "menu.h"
+#include "menuframe.h"
 #include "keyboard.h"
 #include "mouse.h"
 #include "render/render.h"
@@ -310,7 +310,7 @@ void client_manage(Window window)
 
     /* make sure the window is visible */
     if (ob_state() == OB_STATE_RUNNING)
-        client_move_onscreen(self, TRUE);
+        client_move_onscreen(self, client_normal(self));
 
     client_showhide(self);
 
@@ -350,13 +350,6 @@ void client_unmanage_all()
        client_unmanage(client_list->data);
 }
 
-/* called by client_unmanage() to close any menus referencing this client */
-void client_close_menus(gpointer key, gpointer value, gpointer self)
-{
-    if (((ObMenu *)value)->client == (ObClient *)self)
-        menu_hide((ObMenu *)value);
-}
-
 void client_unmanage(ObClient *self)
 {
     guint j;
@@ -413,9 +406,9 @@ void client_unmanage(ObClient *self)
     if (moveresize_client == self)
         moveresize_end(TRUE);
 
-    /* close any windows that are attached to this window */
-    g_hash_table_foreach(menu_hash, client_close_menus, self);
-
+    /* menus can be associated with a client, so close any that are since
+       we are disappearing now */
+    menu_frame_hide_all_client(self);
     
     if (focus_client == self) {
         XEvent e;
This page took 0.023837 seconds and 4 git commands to generate.