summaryrefslogtreecommitdiff
path: root/openbox/slit.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-05-11 17:31:23 +0000
committerDana Jansens <danakj@orodu.net>2003-05-11 17:31:23 +0000
commitffb76025fa8463321fddaf65f4e436754f35cdd7 (patch)
tree9f850275194cbfbaa33450450eef9251b805dac1 /openbox/slit.c
parent23697223a5f7242767c7959158f314f50887985c (diff)
use the size of the icon window for slit apps, not the client window
Diffstat (limited to 'openbox/slit.c')
-rw-r--r--openbox/slit.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/openbox/slit.c b/openbox/slit.c
index 45d14be2..7b39e227 100644
--- a/openbox/slit.c
+++ b/openbox/slit.c
@@ -86,10 +86,11 @@ void slit_shutdown()
g_hash_table_destroy(slit_map);
}
-void slit_add(Window win, XWMHints *wmhints, XWindowAttributes *attrib)
+void slit_add(Window win, XWMHints *wmhints)
{
Slit *s;
SlitApp *app;
+ XWindowAttributes attrib;
/* XXX pick a slit */
s = &slit[0];
@@ -100,8 +101,12 @@ void slit_add(Window win, XWMHints *wmhints, XWindowAttributes *attrib)
app->icon_win = (wmhints->flags & IconWindowHint) ?
wmhints->icon_window : win;
- app->w = attrib->width;
- app->h = attrib->height;
+ if (XGetWindowAttributes(ob_display, app->icon_win, &attrib)) {
+ app->w = attrib.width;
+ app->h = attrib.height;
+ } else {
+ app->w = app->h = 64;
+ }
s->slit_apps = g_list_append(s->slit_apps, app);
slit_configure(s);