#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"
(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;
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);
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;
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;