diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt
index 475a7a5f90..c10ea6ef92 100644
--- a/autotests/CMakeLists.txt
+++ b/autotests/CMakeLists.txt
@@ -43,8 +43,6 @@ ecm_mark_as_test(testVirtualDesktops)
set( testClientMachine_SRCS
test_client_machine.cpp
../client_machine.cpp
- ../utils.cpp
- ../atoms.cpp # needed by utils.cpp
)
add_executable( testClientMachine ${testClientMachine_SRCS} )
diff --git a/autotests/test_client_machine.cpp b/autotests/test_client_machine.cpp
index 19febf7a5e..dd484537fe 100644
--- a/autotests/test_client_machine.cpp
+++ b/autotests/test_client_machine.cpp
@@ -19,9 +19,7 @@ along with this program. If not, see .
*********************************************************************/
#include "testutils.h"
// KWin
-#include "../atoms.h" // needed for utils to compile
#include "../client_machine.h"
-#include "../utils.h"
#include "../xcbutils.h"
// Qt
#include
@@ -34,12 +32,6 @@ along with this program. If not, see .
#include
#include
-namespace KWin {
-// just to make the linker of utils happy
-Atoms* atoms;
-
-}
-
using namespace KWin;
class TestClientMachine : public QObject
diff --git a/client_machine.cpp b/client_machine.cpp
index 08234d7b84..dd9cbc1f04 100644
--- a/client_machine.cpp
+++ b/client_machine.cpp
@@ -19,8 +19,8 @@ along with this program. If not, see .
*********************************************************************/
// own
#include "client_machine.h"
-// KWin
-#include "utils.h"
+// KF5
+#include
// Qt
#include
#include
@@ -173,9 +173,9 @@ void ClientMachine::resolve(xcb_window_t window, xcb_window_t clientLeader)
if (m_resolved) {
return;
}
- QByteArray name = getStringProperty(window, XCB_ATOM_WM_CLIENT_MACHINE);
+ QByteArray name = KWindowInfo(window, NET::Properties(), NET::WM2ClientMachine).clientMachine();
if (name.isEmpty() && clientLeader && clientLeader != window) {
- name = getStringProperty(clientLeader, XCB_ATOM_WM_CLIENT_MACHINE);
+ name = KWindowInfo(clientLeader, NET::Properties(), NET::WM2ClientMachine).clientMachine();
}
if (name.isEmpty()) {
name = localhost();