look for masks only where the themerc was read from
This commit is contained in:
parent
0c2ee99388
commit
b98021773b
1 changed files with 2 additions and 18 deletions
|
@ -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)
|
||||
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)
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue