40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
|
From e98c461d43ea07c73898c93debe9285029ba0416 Mon Sep 17 00:00:00 2001
|
||
|
From: Joni Poikelin <joni.poikelin@digia.com>
|
||
|
Date: Thu, 12 Jun 2014 10:28:23 +0300
|
||
|
Subject: [PATCH] XCB: Fix leak with touch devices
|
||
|
|
||
|
Task-number: QTBUG-39596
|
||
|
Change-Id: I4225d5a1ab4939280640b35d30c283f056a56519
|
||
|
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
|
||
|
---
|
||
|
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 6 ++++++
|
||
|
1 file changed, 6 insertions(+)
|
||
|
|
||
|
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
|
||
|
index c296618..a574dca 100644
|
||
|
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
|
||
|
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
|
||
|
@@ -228,6 +228,11 @@ void QXcbConnection::xi2SetupDevices()
|
||
|
|
||
|
void QXcbConnection::finalizeXInput2()
|
||
|
{
|
||
|
+ foreach (XInput2DeviceData *dev, m_touchDevices) {
|
||
|
+ if (dev->xiDeviceInfo)
|
||
|
+ XIFreeDeviceInfo(dev->xiDeviceInfo);
|
||
|
+ delete dev;
|
||
|
+ }
|
||
|
}
|
||
|
|
||
|
void QXcbConnection::xi2Select(xcb_window_t window)
|
||
|
@@ -393,6 +398,7 @@ XInput2DeviceData *QXcbConnection::deviceForId(int id)
|
||
|
m_touchDevices[id] = dev;
|
||
|
} else {
|
||
|
m_touchDevices.remove(id);
|
||
|
+ XIFreeDeviceInfo(dev->xiDeviceInfo);
|
||
|
delete dev;
|
||
|
dev = 0;
|
||
|
}
|
||
|
--
|
||
|
1.8.4.5
|
||
|
|