diff options
| author | Scott Moynes <smoynes@nexus.carleton.ca> | 2003-05-21 23:58:40 +0000 |
|---|---|---|
| committer | Scott Moynes <smoynes@nexus.carleton.ca> | 2003-05-21 23:58:40 +0000 |
| commit | 71d2605e1c24732e923333419d829f1c5f867fed (patch) | |
| tree | d5f25de1dfd118a80f0c139199b280d584dc5a69 /openbox/client.c | |
| parent | 955d9d8e3048d04edb8986bfe7693e659204eae3 (diff) | |
Client menus
Add "client_menu" to pluginrc to use.
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/openbox/client.c b/openbox/client.c index 75a3bc25..cb592b02 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -14,6 +14,7 @@ #include "openbox.h" #include "group.h" #include "config.h" +#include "menu.h" #include "render/render.h" #include <glib.h> @@ -311,6 +312,13 @@ 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 (((Menu *)value)->client == (Client *)self) + menu_hide((Menu *)value); +} + void client_unmanage(Client *self) { int j; @@ -364,6 +372,10 @@ void client_unmanage(Client *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); + + if (focus_client == self) { XEvent e; |
