From 2c9e21a9834f7f0019474e16fd223f59309a8160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 18 Nov 2013 13:48:31 +0100 Subject: [PATCH] [kwin] Use XCB Atom enum definition instead of XLib's one --- client.cpp | 6 +++--- toplevel.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client.cpp b/client.cpp index 56e5e77c43..13062a7e8d 100644 --- a/client.cpp +++ b/client.cpp @@ -1723,7 +1723,7 @@ QString Client::readName() const if (info->name() && info->name()[0] != '\0') return QString::fromUtf8(info->name()); else - return KWindowSystem::readNameProperty(window(), XA_WM_NAME); + return KWindowSystem::readNameProperty(window(), XCB_ATOM_WM_NAME); } KWIN_COMPARE_PREDICATE(FetchNameInternalPredicate, Client, const Client*, (!cl->isSpecialWindow() || cl->isToolbar()) && cl != value && cl->caption() == value->caption()); @@ -1815,7 +1815,7 @@ void Client::fetchIconicName() if (info->iconName() && info->iconName()[0] != '\0') s = QString::fromUtf8(info->iconName()); else - s = KWindowSystem::readNameProperty(window(), XA_WM_ICON_NAME); + s = KWindowSystem::readNameProperty(window(), XCB_ATOM_WM_ICON_NAME); if (s != cap_iconic) { bool was_set = !cap_iconic.isEmpty(); cap_iconic = s; @@ -2120,7 +2120,7 @@ void Client::getSyncCounter() int formatRet; unsigned char* propRet; int ret = XGetWindowProperty(display(), window(), atoms->net_wm_sync_request_counter, - 0, 1, false, XA_CARDINAL, &retType, &formatRet, &nItemRet, &byteRet, &propRet); + 0, 1, false, XCB_ATOM_CARDINAL, &retType, &formatRet, &nItemRet, &byteRet, &propRet); if (ret == Success && formatRet == 32) { syncRequest.counter = *(xcb_sync_counter_t*)(propRet); diff --git a/toplevel.cpp b/toplevel.cpp index 56ea2623a3..c40682e846 100644 --- a/toplevel.cpp +++ b/toplevel.cpp @@ -399,10 +399,10 @@ void Toplevel::getWmOpaqueRegion() int rformat; unsigned long nitems; if (XGetWindowProperty(display(), m_client, - atoms->net_wm_opaque_region, 0, length, false, XA_CARDINAL, + atoms->net_wm_opaque_region, 0, length, false, XCB_ATOM_CARDINAL, &type, &rformat, &nitems, &bytes_after_return, reinterpret_cast< unsigned char** >(&data)) == Success) { - if (type != XA_CARDINAL || rformat != 32 || nitems%4) { + if (type != XCB_ATOM_CARDINAL || rformat != 32 || nitems%4) { // it can happen, that the window does not provide this property XFree(data); break;