summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qx11embed_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qx11embed_x11.cpp')
-rw-r--r--src/gui/kernel/qx11embed_x11.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/kernel/qx11embed_x11.cpp b/src/gui/kernel/qx11embed_x11.cpp
index 47cefe4..49a8194 100644
--- a/src/gui/kernel/qx11embed_x11.cpp
+++ b/src/gui/kernel/qx11embed_x11.cpp
@@ -415,8 +415,9 @@ static Bool functor(Display *display, XEvent *event, XPointer arg)
status = XGetWindowProperty(display, data->id, ATOM(WM_STATE), 0, 2, False, ATOM(WM_STATE),
&ret, &format, &nitems, &after, &retval );
if (status == Success && ret == ATOM(WM_STATE) && format == 32 && nitems > 0) {
- long *state = (long *)retval;
- if (state[0] == WithdrawnState) {
+ long state = *(long *)retval;
+ XFree(retval);
+ if (state == WithdrawnState) {
data->clearedWmState = true;
return true;
}
@@ -833,6 +834,8 @@ bool QX11EmbedWidget::x11Event(XEvent *event)
XUnmapWindow(x11Info().display(), internalWinId());
}
}
+ if (prop_return)
+ XFree(prop_return);
}
}