summaryrefslogtreecommitdiff
path: root/openbox/client.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-01-20 02:56:12 -0500
committerDana Jansens <danakj@orodu.net>2008-01-31 12:25:30 -0500
commit29637976e6aecf45bae84ba9ce3ecb26635012f7 (patch)
treee1fc7cf42223214e6465f9f0d96dc645bb30cf70 /openbox/client.c
parentea481338b5f16fd81a7b33e036ead39b918a51af (diff)
make the window.h interface more consistent with the rest of openbox, hide the window_map behind some functions, and make obdockapps not obwindows anymore
Diffstat (limited to 'openbox/client.c')
-rw-r--r--openbox/client.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/openbox/client.c b/openbox/client.c
index c91d6e3b..9986015c 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -274,7 +274,7 @@ void client_manage(Window window)
/* create the ObClient struct, and populate it from the hints on the
window */
self = g_new0(ObClient, 1);
- self->obwin.type = Window_Client;
+ self->obwin.type = OB_WINDOW_CLASS_CLIENT;
self->window = window;
/* non-zero defaults */
@@ -597,7 +597,7 @@ void client_manage(Window window)
/* add to client list/map */
client_list = g_list_append(client_list, self);
- g_hash_table_insert(window_map, &self->window, self);
+ window_add(&self->window, CLIENT_AS_WINDOW(self));
/* this has to happen after we're in the client_list */
if (STRUT_EXISTS(self->strut))
@@ -705,7 +705,7 @@ void client_unmanage(ObClient *self)
client_list = g_list_remove(client_list, self);
stacking_remove(self);
- g_hash_table_remove(window_map, &self->window);
+ window_remove(self->window);
/* once the client is out of the list, update the struts to remove its
influence */
@@ -1285,13 +1285,13 @@ void client_update_transient_for(ObClient *self)
if (XGetTransientForHint(obt_display, self->window, &t)) {
if (t != self->window) { /* cant be transient to itself! */
- target = g_hash_table_lookup(window_map, &t);
+ ObWindow *tw = window_find(t);
/* if this happens then we need to check for it*/
- g_assert(target != self);
- if (target && !WINDOW_IS_CLIENT(target)) {
- /* this can happen when a dialog is a child of
- a dockapp, for example */
- target = NULL;
+ g_assert(tw != CLIENT_AS_WINDOW(self));
+ if (target && WINDOW_IS_CLIENT(tw)) {
+ /* watch out for windows with a parent that is something
+ different, like a dockapp for example */
+ target = WINDOW_AS_CLIENT(tw);
}
}