]> Dogcows Code - chaz/openbox/commitdiff
look for masks only where the themerc was read from
authorDana Jansens <danakj@orodu.net>
Fri, 1 Aug 2003 18:23:23 +0000 (18:23 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 1 Aug 2003 18:23:23 +0000 (18:23 +0000)
render/theme.c

index 37bc4717da9aa1244dc907029c8f0f84950606f2..50df679148ba3f82db0f1ab471a31a4b03588b78 100644 (file)
@@ -1040,28 +1040,12 @@ static gboolean read_mask(const RrInstance *inst,
     unsigned int w, h;
     unsigned char *b;
 
-    s = g_build_filename(g_get_home_dir(), ".openbox", "themes",
-                         theme->name, maskname, NULL);
-    if (XReadBitmapFileData(s, &w, &h, &b, &hx, &hy) == BitmapSuccess)
+    s = g_build_filename(theme->path, maskname, NULL);
+    if (XReadBitmapFileData(s, &w, &h, &b, &hx, &hy) == BitmapSuccess) {
         ret = TRUE;
-    else {
-        g_free(s);
-        s = g_build_filename(THEMEDIR, theme->name, maskname, NULL);
-        if (XReadBitmapFileData(s, &w, &h, &b, &hx, &hy) == BitmapSuccess) 
-            ret = TRUE;
-        else {
-            g_free(s);
-            s = g_build_filename(theme->path, maskname, NULL);
-            if (XReadBitmapFileData(s, &w, &h, &b, &hx, &hy) == BitmapSuccess) 
-                ret = TRUE;
-        }
-    }
-
-    if (ret) {
         *value = RrPixmapMaskNew(inst, w, h, (char*)b);
         XFree(b);
     }
-      
     g_free(s);
 
     return ret;
This page took 0.024976 seconds and 4 git commands to generate.