diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-14 22:58:08 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-14 22:58:08 +0000 |
| commit | ec21f8c9ec160466ba0a1aa662da8af5cb6a3c9b (patch) | |
| tree | 59afd3532862e742070be53897fcd0982ce1bbaa /openbox/client.c | |
| parent | 1b2c6f609d202cc7d16d11cf06244c00b670a291 (diff) | |
yay for simplifying code. if we check for errors we dont need the "focus_tried" stuff
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/openbox/client.c b/openbox/client.c index 888e532b..e7711692 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -65,7 +65,6 @@ typedef struct GList *client_list = NULL; static GSList *client_destroy_notifies = NULL; -static GSList *client_hide_notifies = NULL; static void client_get_all(ObClient *self, gboolean real); static void client_toggle_border(ObClient *self, gboolean show); @@ -139,29 +138,6 @@ void client_remove_destroy_notify(ObClientCallback func) } } -void client_add_hide_notify(ObClientCallback func, gpointer data) -{ - ClientCallback *d = g_new(ClientCallback, 1); - d->func = func; - d->data = data; - client_hide_notifies = g_slist_prepend(client_hide_notifies, d); -} - -void client_remove_hide_notify(ObClientCallback func) -{ - GSList *it; - - for (it = client_hide_notifies; it; it = g_slist_next(it)) { - ClientCallback *d = it->data; - if (d->func == func) { - g_free(d); - client_hide_notifies = - g_slist_delete_link(client_hide_notifies, it); - break; - } - } -} - void client_set_list() { Window *windows, *win_it; @@ -2442,12 +2418,9 @@ void client_show(ObClient *self) void client_hide(ObClient *self) { - if (!client_should_show(self)) { + if (!client_should_show(self)) frame_hide(self->frame); - client_call_notifies(self, client_hide_notifies); - } - /* According to the ICCCM (sec 4.1.3.1) when a window is not visible, it needs to be in IconicState. This includes when it is on another desktop! @@ -2458,15 +2431,11 @@ void client_hide(ObClient *self) void client_showhide(ObClient *self) { - if (client_should_show(self)) { + if (client_should_show(self)) frame_show(self->frame); - } - else { + else frame_hide(self->frame); - client_call_notifies(self, client_hide_notifies); - } - /* According to the ICCCM (sec 4.1.3.1) when a window is not visible, it needs to be in IconicState. This includes when it is on another desktop! |
