fixed FbTk issues

This commit is contained in:
fluxgen 2002-11-26 17:48:58 +00:00
parent d9525a3efb
commit dcafcfa17d
2 changed files with 11 additions and 14 deletions

View file

@ -1,10 +1,11 @@
# util/Makefile.am for Blackbox 0.61.x - an X11 Window manager
SUBDIRS = fbrun
INCLUDES=-I../src/FbTk/
bin_SCRIPTS = bsetbg fluxbox-generate_menu
bin_PROGRAMS = bsetroot
bsetroot_SOURCES = bsetroot.cc bsetroot.hh
bsetroot_LDADD = ../src/BaseDisplay.o ../src/Timer.o ../src/Image.o ../src/i18n.o ../src/FbAtoms.o \
../src/Color.o ../src/Texture.o ../src/StringUtil.o
../src/StringUtil.o ../src/FbTk/.libs/libFbTk.a
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST=bsetbg fluxbox-generate_menu
@ -13,5 +14,5 @@ distclean-local:
rm -f *\~
bsetroot.o: bsetroot.cc ../config.h bsetroot.hh ../src/BaseDisplay.hh \
../src/Timer.hh ../src/Image.hh ../src/FbAtoms.hh ../src/Color.hh ../src/Texture.hh
../src/Timer.hh ../src/Image.hh ../src/FbAtoms.hh ../src/FbTk/Color.hh ../src/FbTk/Texture.hh

View file

@ -18,7 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// $Id: bsetroot.cc,v 1.10 2002/11/25 22:23:03 fluxgen Exp $
// $Id: bsetroot.cc,v 1.11 2002/11/26 17:48:58 fluxgen Exp $
#include "bsetroot.hh"
@ -47,7 +47,7 @@ bsetroot::bsetroot(int argc, char **argv, char *dpy_name)
bool mod = false, sol = false, grd = false;
int mod_x = 0, mod_y = 0, i = 0;
img_ctrl = new BImageControl*[10];
img_ctrl = new BImageControl*[getNumberOfScreens()];
for (; i < getNumberOfScreens(); i++) {
img_ctrl[i] = new BImageControl(getScreenInfo(i), true);
}
@ -138,12 +138,8 @@ bsetroot::~bsetroot() {
delete [] pixmaps;
}
#ifdef DEBUG
else
cerr<<"~bsetroot: why don't we have any pixmaps?"<<endl;
#endif // DEBUG
if (img_ctrl) {
if (img_ctrl != 0) {
int i = 0;
for (; i < num_screens; i++)
delete img_ctrl[i];
@ -152,11 +148,11 @@ bsetroot::~bsetroot() {
}
}
//------------ setRootAtoms ---------------
// set root pixmap atoms so that apps like
// Eterm and xchat will be able to use
// transparent background
//-----------------------------------------
/**
set root pixmap atoms so that apps like
Eterm and xchat will be able to use
transparent background
*/
void bsetroot::setRootAtoms(Pixmap pixmap, int screen) {
Atom atom_root, atom_eroot, type;
unsigned char *data_root, *data_eroot;