Changeset View
Changeset View
Standalone View
Standalone View
client.cpp
Show All 39 Lines | |||||
40 | #include <KDecoration2/DecoratedClient> | 40 | #include <KDecoration2/DecoratedClient> | ||
41 | // KDE | 41 | // KDE | ||
42 | #include <KLocalizedString> | 42 | #include <KLocalizedString> | ||
43 | #include <KWindowSystem> | 43 | #include <KWindowSystem> | ||
44 | #include <KColorScheme> | 44 | #include <KColorScheme> | ||
45 | // Qt | 45 | // Qt | ||
46 | #include <QApplication> | 46 | #include <QApplication> | ||
47 | #include <QDebug> | 47 | #include <QDebug> | ||
48 | #include <QDir> | ||||
48 | #include <QFile> | 49 | #include <QFile> | ||
50 | #include <QFileInfo> | ||||
49 | #include <QMouseEvent> | 51 | #include <QMouseEvent> | ||
50 | #include <QProcess> | 52 | #include <QProcess> | ||
51 | // XLib | 53 | // XLib | ||
52 | #include <X11/Xutil.h> | 54 | #include <X11/Xutil.h> | ||
53 | #include <fixx11h.h> | 55 | #include <fixx11h.h> | ||
54 | #include <xcb/xcb_icccm.h> | 56 | #include <xcb/xcb_icccm.h> | ||
55 | // system | 57 | // system | ||
56 | #include <unistd.h> | 58 | #include <unistd.h> | ||
▲ Show 20 Lines • Show All 1124 Lines • ▼ Show 20 Line(s) | 1182 | if (!ask) { | |||
1181 | if (!clientMachine()->isLocal()) { | 1183 | if (!clientMachine()->isLocal()) { | ||
1182 | QStringList lst; | 1184 | QStringList lst; | ||
1183 | lst << QString::fromUtf8(clientMachine()->hostName()) << QStringLiteral("kill") << QString::number(pid); | 1185 | lst << QString::fromUtf8(clientMachine()->hostName()) << QStringLiteral("kill") << QString::number(pid); | ||
1184 | QProcess::startDetached(QStringLiteral("xon"), lst); | 1186 | QProcess::startDetached(QStringLiteral("xon"), lst); | ||
1185 | } else | 1187 | } else | ||
1186 | ::kill(pid, SIGTERM); | 1188 | ::kill(pid, SIGTERM); | ||
1187 | } else { | 1189 | } else { | ||
1188 | QString hostname = clientMachine()->isLocal() ? QStringLiteral("localhost") : QString::fromUtf8(clientMachine()->hostName()); | 1190 | QString hostname = clientMachine()->isLocal() ? QStringLiteral("localhost") : QString::fromUtf8(clientMachine()->hostName()); | ||
1189 | QProcess::startDetached(QStringLiteral(KWIN_KILLER_BIN), | 1191 | // execute helper from build dir or the system installed one | ||
1192 | const QFileInfo buildDirBinary{QDir{QCoreApplication::applicationDirPath()}, QStringLiteral("kwin_killer_helper")}; | ||||
1193 | QProcess::startDetached(buildDirBinary.exists() ? buildDirBinary.absoluteFilePath() : QStringLiteral(KWIN_KILLER_BIN), | ||||
1190 | QStringList() << QStringLiteral("--pid") << QString::number(unsigned(pid)) << QStringLiteral("--hostname") << hostname | 1194 | QStringList() << QStringLiteral("--pid") << QString::number(unsigned(pid)) << QStringLiteral("--hostname") << hostname | ||
1191 | << QStringLiteral("--windowname") << captionNormal() | 1195 | << QStringLiteral("--windowname") << captionNormal() | ||
1192 | << QStringLiteral("--applicationname") << QString::fromUtf8(resourceClass()) | 1196 | << QStringLiteral("--applicationname") << QString::fromUtf8(resourceClass()) | ||
1193 | << QStringLiteral("--wid") << QString::number(window()) | 1197 | << QStringLiteral("--wid") << QString::number(window()) | ||
1194 | << QStringLiteral("--timestamp") << QString::number(timestamp), | 1198 | << QStringLiteral("--timestamp") << QString::number(timestamp), | ||
1195 | QString(), &m_killHelperPID); | 1199 | QString(), &m_killHelperPID); | ||
1196 | } | 1200 | } | ||
1197 | } | 1201 | } | ||
▲ Show 20 Lines • Show All 904 Lines • Show Last 20 Lines |