X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=f17e9724fc228afa338b83c6604d875c4f339acb;hb=700e551390a86ffdb92ddc061914ec7687658d18;hp=e905a6f97ca9faf8753252d278a42c30b9a0741b;hpb=5186d04c613056c44490bd3f6766fd969e83305a;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index e905a6f9..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" @@ -272,6 +272,8 @@ void client_manage(Window window) (self->type == OB_CLIENT_TYPE_NORMAL || self->type == OB_CLIENT_TYPE_DIALOG)) { + activate = TRUE; +#if 0 if (self->desktop != screen_desktop) { /* activate the window */ activate = TRUE; @@ -301,13 +303,14 @@ void client_manage(Window window) activate = TRUE; } } +#endif } dispatch_client(Event_Client_New, self, 0, 0); /* 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); @@ -347,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; @@ -410,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;