X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fstyle.cc;h=f0aeddabc9d08cc57ac7e7115fc20fdbc4062571;hb=bc88d310fea71823fb2c61d071ff499579bffaba;hp=fcc0ff2e8b6ac326f3d5092a5d2c069726e50c19;hpb=2b2f81b93c89c2a2d6abc3b12dee66b8e2a0452d;p=chaz%2Fopenbox diff --git a/otk/style.cc b/otk/style.cc index fcc0ff2e..f0aeddab 100644 --- a/otk/style.cc +++ b/otk/style.cc @@ -173,14 +173,18 @@ void Style::readDatabaseMask(const std::string &rname, PixmapMask &pixmapMask, int hx, hy; //ignored int ret = BitmapOpenFailed; //default to failure. - if (style.getValue(rname, s)) - { - if (s[0] != '/' && s[0] != '~') - { + if (style.getValue(rname, s)) { + if (s[0] != '/' && s[0] != '~') { std::string xbmFile = std::string("~/.openbox/buttons/") + s; ret = XReadBitmapFile(OBDisplay::display, root_window, expandTilde(xbmFile).c_str(), &pixmapMask.w, &pixmapMask.h, &pixmapMask.mask, &hx, &hy); + if (ret != BitmapSuccess) { + xbmFile = std::string(BUTTONSDIR) + "/" + s; + ret = XReadBitmapFile(OBDisplay::display, root_window, + xbmFile.c_str(), &pixmapMask.w, + &pixmapMask.h, &pixmapMask.mask, &hx, &hy); + } } else ret = XReadBitmapFile(OBDisplay::display, root_window, expandTilde(s).c_str(), &pixmapMask.w,