aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Shape.cc
diff options
context:
space:
mode:
authorHenrik Kinnunen <fluxgen@fluxbox.org>2008-09-28 08:53:16 (GMT)
committerHenrik Kinnunen <fluxgen@fluxbox.org>2008-09-28 08:53:16 (GMT)
commitf2c8868724ebcaa6afaac4a71093f77b7eeaa23f (patch)
treee64111d54d58f819e261f4fa552fae8e111b30e8 /src/FbTk/Shape.cc
parentbcf37890b617730cfded161b9a3d18f7c377e724 (diff)
parent04a1d2a83b96eb6d1b1958e4f3e25ffdf295aa4d (diff)
downloadfluxbox_paul-f2c8868724ebcaa6afaac4a71093f77b7eeaa23f.zip
fluxbox_paul-f2c8868724ebcaa6afaac4a71093f77b7eeaa23f.tar.bz2
Merge branch 'master' of fluxbox@git.fluxbox.org:fluxbox
Conflicts: ChangeLog
Diffstat (limited to 'src/FbTk/Shape.cc')
-rw-r--r--src/FbTk/Shape.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/FbTk/Shape.cc b/src/FbTk/Shape.cc
index 6cc46f8..7c14832 100644
--- a/src/FbTk/Shape.cc
+++ b/src/FbTk/Shape.cc
@@ -56,9 +56,9 @@ Pixmap makePixmap(FbWindow &drawable, const unsigned char rows[]) {
56 Display *disp = App::instance()->display(); 56 Display *disp = App::instance()->display();
57 57
58 const size_t data_size = 8 * 8; 58 const size_t data_size = 8 * 8;
59 // we use calloc here so we get consistent C alloc/free with XDestroyImage 59 // we use malloc here so we get consistent C alloc/free with XDestroyImage
60 // and no warnings in valgrind :) 60 // and no warnings in valgrind :)
61 char *data = (char *)calloc(data_size, sizeof (char)); 61 char *data = (char *)malloc(data_size * sizeof (char));
62 if (data == 0) 62 if (data == 0)
63 return 0; 63 return 0;
64 64
@@ -141,6 +141,9 @@ Shape::~Shape() {
141} 141}
142 142
143void Shape::initCorners(int screen_num) { 143void Shape::initCorners(int screen_num) {
144 if (!m_win->window())
145 return;
146
144 if (s_corners.size() == 0) 147 if (s_corners.size() == 0)
145 s_corners.resize(ScreenCount(App::instance()->display())); 148 s_corners.resize(ScreenCount(App::instance()->display()));
146 149