fix: 修复初次被systemd拉起时内存泄露的问题
XCBUtils类中使用到XCB接口,其中reply类型部分接口返回值需要手动释放 Log: Task: https://pms.uniontech.com/task-view-145329.html Influence: 不会出现内存泄露的问题 Change-Id: Idf8f37d1144c9e5b87161c64f3b18695fbcef0d9
This commit is contained in:
@ -104,28 +104,27 @@ void X11Manager::listenXEventUseXlib()
|
||||
|
||||
if (event.type == DestroyNotify) {
|
||||
XDestroyWindowEvent *eD = (XDestroyWindowEvent *) (&event);
|
||||
//qInfo() << "DestroyNotify windowId=" << eD->window;
|
||||
qDebug() << "DestroyNotify windowId=" << eD->window;
|
||||
|
||||
handleDestroyNotifyEvent(XWindow(eD->window));
|
||||
} else if (event.type == MapNotify) {
|
||||
XMapEvent *eM = (XMapEvent *)(&event);
|
||||
//qInfo() << "MapNotify windowId=" << eM->window;
|
||||
qDebug() << "MapNotify windowId=" << eM->window;
|
||||
|
||||
handleMapNotifyEvent(XWindow(eM->window));
|
||||
} else if (event.type == ConfigureNotify ) {
|
||||
XConfigureEvent *eC = (XConfigureEvent *) (&event);
|
||||
//qInfo() << "ConfigureNotify windowId=" << eC->window;
|
||||
qDebug() << "ConfigureNotify windowId=" << eC->window;
|
||||
|
||||
handleConfigureNotifyEvent(XWindow(eC->window), eC->x, eC->y, eC->width, eC->height);
|
||||
} else if (event.type == PropertyNotify) {
|
||||
XPropertyEvent *eP = (XPropertyEvent *) (&event);
|
||||
//qInfo() << "PropertyNotify windowId=" << eP->window;
|
||||
qDebug() << "PropertyNotify windowId=" << eP->window;
|
||||
|
||||
handlePropertyNotifyEvent(XWindow(eP->window), XCBAtom(eP->atom));
|
||||
} else {
|
||||
//qInfo() << "Unknown event type " << event.type;
|
||||
qDebug() << "Unknown event type " << event.type;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
XCloseDisplay (dpy);
|
||||
|
Reference in New Issue
Block a user