mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix: fix broken in wayland
修复在wayland下修复光标崩溃的问题 释放对应的指针时应使用特定的函数 Log: 修复wayland下崩溃问题 Influence: wayland下调整任务栏高度 Task: https://pms.uniontech.com/zentao/task-view-98205.html Change-Id: I29cd23d78cc4973983b3db0e44c0671d4460a2d5
This commit is contained in:
parent
4aa44632af
commit
7b20448427
@ -94,6 +94,6 @@ void AppDrag::setDragMoveCursor()
|
||||
|
||||
QImage img((const uchar*)images->images[0]->pixels, imgW, imgH, QImage::Format_ARGB32);
|
||||
QPixmap pixmap = QPixmap::fromImage(img);
|
||||
delete images;
|
||||
XcursorImagesDestroy(images);
|
||||
setDragCursor(pixmap, Qt::MoveAction);
|
||||
}
|
||||
|
@ -78,6 +78,6 @@ QCursor* ImageUtil::loadQCursorFromX11Cursor(const char* theme, const char* curs
|
||||
QImage img((const uchar*)images->images[0]->pixels, imgW, imgH, QImage::Format_ARGB32);
|
||||
QPixmap pixmap = QPixmap::fromImage(img);
|
||||
QCursor *cursor = new QCursor(pixmap, images->images[0]->xhot, images->images[0]->yhot);
|
||||
delete images;
|
||||
XcursorImagesDestroy(images);
|
||||
return cursor;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user