X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=f17e9724fc228afa338b83c6604d875c4f339acb;hb=5e06be6abb68a95aa9cafc5a6f0c5e295ebe9bee;hp=f1dc11aa03a62f802df400ba164e77ac0a776f44;hpb=fdfaa0c8dd830209e44efc23271eec0e32b86f7d;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index f1dc11aa..f17e9724 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -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;