summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/aquamarine.cpp5
-rw-r--r--src/window.cpp15
2 files changed, 13 insertions, 7 deletions
diff --git a/src/aquamarine.cpp b/src/aquamarine.cpp
index 8ee8485..0ec9fd7 100644
--- a/src/aquamarine.cpp
+++ b/src/aquamarine.cpp
@@ -91,7 +91,7 @@ main (int argc, char **argv)
Atom actual;
int result, format;
unsigned long n, left;
- unsigned char * data;
+ unsigned char * data = NULL;
result = XGetWindowProperty (dpy, wm, wm_name,
0L, 2L, FALSE, utf8_string, &actual, &format,
@@ -107,6 +107,9 @@ main (int argc, char **argv)
}
}
+ if (data)
+ XFree(data);
+
if (!wmRunning)
{
XSelectInput(dpy, wm, StructureNotifyMask);
diff --git a/src/window.cpp b/src/window.cpp
index 405269e..aaa5d9f 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -155,6 +155,9 @@ Aquamarine::Window::~Window (void)
if (mPicture)
XRenderFreePicture (qt_xdisplay (), mPicture);
+ if (mPixmap)
+ XFreePixmap (qt_xdisplay (), mPixmap);
+
if (mTexturePicture)
XRenderFreePicture (qt_xdisplay (), mTexturePicture);
@@ -1202,18 +1205,18 @@ Aquamarine::Window::resizeDecoration (bool force)
w = mGeometry.width () + mBorder.left + mBorder.right;
h = mGeometry.height () + mBorder.top + mBorder.bottom;
- if (mPixmap)
- {
- XFreePixmap (qt_xdisplay (), mPixmap);
- mPixmap = None;
- }
-
if (mPicture)
{
XRenderFreePicture (qt_xdisplay (), mPicture);
mPicture = 0;
}
+ if (mPixmap)
+ {
+ XFreePixmap (qt_xdisplay (), mPixmap);
+ mPixmap = None;
+ }
+
setGeometry (QRect (mGeometry.x () + ROOT_OFF_X - mBorder.left,
mGeometry.y () + ROOT_OFF_Y - mBorder.top,
w, h));