[platforms/x11] Fix valigrind warning copying window icon for windowed mode
Summary: windowIcon.pixmap().bits() creates and deletes the QPixmap object. Which means data is dangling when we call m_winInfo->setIcon() Surprisingly harmless in real life. Test Plan: Reran kwin_wayland on X11 with valigrind Reviewers: #kwin, apol Reviewed By: apol Subscribers: zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D28667
This commit is contained in:
parent
bc1991706c
commit
3092043be5
1 changed files with 2 additions and 1 deletions
|
@ -104,7 +104,8 @@ void X11WindowedOutput::init(const QPoint &logicalPosition, const QSize &pixelSi
|
|||
return;
|
||||
}
|
||||
NETIcon icon;
|
||||
icon.data = windowIcon.pixmap(size).toImage().bits();
|
||||
QImage windowImage = windowIcon.pixmap(size).toImage();
|
||||
icon.data = windowImage.bits();
|
||||
icon.size.width = size.width();
|
||||
icon.size.height = size.height();
|
||||
m_winInfo->setIcon(icon, false);
|
||||
|
|
Loading…
Reference in a new issue