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
6 changes: 6 additions & 0 deletions panels/dock/taskmanager/x11window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
#include "x11window.h"
#include "abstractwindow.h"
#include "x11utils.h"
#include "appitem.h"

#include <mutex>

Check warning on line 10 in panels/dock/taskmanager/x11window.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

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

#include <QRect>
#include <QObject>
Expand Down Expand Up @@ -48,6 +49,11 @@
{
if (m_identity.isEmpty()) {
m_identity = X11->getWindowWMClass(m_windowID);
if (auto appItem = getAppItem()) {
m_identity.append(appItem->desktopfileID());
} else {
qCWarning(x11windowLog) << "identify not found appitem." << id();
}
Comment on lines +52 to +56
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppItem 是要废弃的,应当规避使用。

m_identity.append(QString::number(pid()));
}

Expand Down
3 changes: 2 additions & 1 deletion panels/dock/taskmanager/x11windowmonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@ void X11WindowMonitor::onWindowMapped(xcb_window_t xcb_window)

uint32_t value_list[] = { XCB_EVENT_MASK_PROPERTY_CHANGE | XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_VISIBILITY_CHANGE};
xcb_change_window_attributes(X11->getXcbConnection(), xcb_window, XCB_CW_EVENT_MASK, value_list);
trackWindow(window.get());
Q_EMIT AbstractWindowMonitor::windowAdded(static_cast<QPointer<AbstractWindow>>(window.get()));
trackWindow(window.get());
Copy link
Member

@BLumia BLumia Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个顺序应该不能调,先track后发信号,不然可能信号接收到后尝试获取会拿不到(size不对)导致崩溃。


}

void X11WindowMonitor::onWindowDestroyed(xcb_window_t xcb_window)
Expand Down