Skip to content
Merged
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
15 changes: 13 additions & 2 deletions panels/dock/taskmanager/x11utils.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

#include "x11utils.h"

#include <cstddef>

Check warning on line 7 in panels/dock/taskmanager/x11utils.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

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

Check warning on line 8 in panels/dock/taskmanager/x11utils.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

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

Check warning on line 9 in panels/dock/taskmanager/x11utils.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 <xcb/xcb.h>

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

View workflow job for this annotation

GitHub Actions / cppcheck

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

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

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <xcb/res.h> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <xcb/xproto.h>
#include <xcb/xcb_aux.h>
#include <xcb/xcb_ewmh.h>
Expand Down Expand Up @@ -386,10 +387,20 @@

void X11Utils::killClient(const xcb_window_t &winid)
{
xcb_kill_client_checked(getXcbConnection(), winid);
if (winid == XCB_WINDOW_NONE)
return;

pid_t pid = getWindowPid(winid);
if (pid <= 0) {
qCWarning(x11UtilsLog()) << "Cannot get pid for window:" << winid;
return;
}

// 直接强杀进程
::kill(pid, SIGKILL);
}

void X11Utils::setActiveWindow(const xcb_window_t &window)

Check warning on line 403 in panels/dock/taskmanager/x11utils.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

The function 'setActiveWindow' is never used.
{
xcb_ewmh_request_change_active_window(&m_ewmh, 0, window, XCB_EWMH_CLIENT_SOURCE_TYPE_OTHER, XCB_CURRENT_TIME, XCB_WINDOW_NONE);
restackWindow(window);
Expand Down
Loading