Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions panels/dock/taskmanager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ qt_generate_wayland_protocol_client_sources(dock-taskmanager
target_link_libraries(dock-taskmanager PRIVATE
dde-shell-frame
Qt${QT_VERSION_MAJOR}::WaylandClientPrivate
Qt${QT_VERSION_MAJOR}::Concurrent
yaml-cpp
PkgConfig::WaylandClient
)
Expand Down
33 changes: 19 additions & 14 deletions panels/dock/taskmanager/x11preview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,26 @@
#include "abstractwindow.h"
#include "x11windowmonitor.h"

#include <cstdint>

Check warning on line 11 in panels/dock/taskmanager/x11preview.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <cstdint> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <unistd.h>

Check warning on line 12 in panels/dock/taskmanager/x11preview.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <unistd.h> not found. Please note: Cppcheck does not need standard library headers to get proper results.

#include <QFile>
#include <QTimer>
#include <QEvent>
#include <QWindow>
#include <QPixmap>
#include <QLayout>
#include <QScreen>
#include <QPainter>
#include <DIconButton>

Check warning on line 14 in panels/dock/taskmanager/x11preview.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <DIconButton> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QByteArray>

Check warning on line 15 in panels/dock/taskmanager/x11preview.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QByteArray> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QDBusReply>
#include <QMouseEvent>
#include <QDBusInterface>

Check warning on line 16 in panels/dock/taskmanager/x11preview.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QDBusInterface> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QLoggingCategory>
#include <QDBusReply>

Check warning on line 17 in panels/dock/taskmanager/x11preview.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QDBusReply> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QDBusUnixFileDescriptor>

Check warning on line 18 in panels/dock/taskmanager/x11preview.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QDBusUnixFileDescriptor> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QEvent>

Check warning on line 19 in panels/dock/taskmanager/x11preview.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QEvent> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QFile>

Check warning on line 20 in panels/dock/taskmanager/x11preview.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QFile> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QLayout>

Check warning on line 21 in panels/dock/taskmanager/x11preview.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QLayout> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QLoggingCategory>
#include <QMouseEvent>
#include <QPainter>
#include <QPainterPath>
#include <DIconButton>
#include <QPixmap>
#include <QScreen>
#include <QTimer>
#include <QWindow>
#include <QtConcurrent>

#include <DStyle>
#include <DPlatformHandle>
Expand Down Expand Up @@ -161,9 +162,13 @@
{
m_previewPixmaps.clear();
if (!m_item.isNull()) {
for (const auto &window : m_item->getAppendWindows()) {
const auto previewPixmaps = QtConcurrent::blockingMapped(m_item->getAppendWindows(), [this](const QPointer<AbstractWindow> &window) {
auto previewPixmap = fetchWindowPreview(window->id());
m_previewPixmaps.insert(window->id(), previewPixmap);
return QPair<uint32_t, QPixmap>{window->id(), previewPixmap};
});

for (const auto &item : previewPixmaps) {
m_previewPixmaps.insert(item.first, item.second);
}
}
}
Expand Down