]> Dogcows Code - chaz/openbox/commitdiff
use the size of the icon window for slit apps, not the client window
authorDana Jansens <danakj@orodu.net>
Sun, 11 May 2003 17:31:23 +0000 (17:31 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 11 May 2003 17:31:23 +0000 (17:31 +0000)
openbox/client.c
openbox/slit.c
openbox/slit.h

index 29a20ad965977bd4da7000deaff9c76a82f86cbd..3389fdc6f10c374069b5247561f426a77749f450 100644 (file)
@@ -202,7 +202,7 @@ void client_manage(Window window)
     if ((wmhint = XGetWMHints(ob_display, window))) {
        if ((wmhint->flags & StateHint) &&
            wmhint->initial_state == WithdrawnState) {
-            slit_add(window, wmhint, &attrib);
+            slit_add(window, wmhint);
             grab_server(FALSE);
            XFree(wmhint);
            return;
index 45d14be226a86b41a9c6a8ad74b749de8a9b1ac9..7b39e227e5460e6290ca372c5d8820582b5dcd5f 100644 (file)
@@ -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);
index 0d4ffa938364300887828ed37bb1401ae3768f81..3dd3d3db0d71fbfd49a52d36be83a25ecebff146 100644 (file)
@@ -40,7 +40,7 @@ void slit_shutdown();
 void slit_configure_all();
 void slit_hide(Slit *self, gboolean hide);
 
-void slit_add(Window win, XWMHints *wmhints, XWindowAttributes *attrib);
+void slit_add(Window win, XWMHints *wmhints);
 
 void slit_remove_all();
 void slit_remove(SlitApp *app, gboolean reparent);
This page took 0.025184 seconds and 4 git commands to generate.