diff --git a/CMakeLists.txt b/CMakeLists.txt
index 732a7b68e8..6dbfcc961f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -184,6 +184,12 @@ endif()
add_feature_info("XCB-ICCCM" XCB_ICCCM_FOUND "Required for building test applications for KWin")
add_feature_info("XCB-CURSOR" XCB_CURSOR_FOUND "Required for XCursor support")
+set(HAVE_XCB_SYNC TRUE)
+if (XCB_VERSION VERSION_LESS "1.10")
+ set(HAVE_XCB_SYNC FALSE)
+endif()
+add_feature_info("XCB-SYNC" HAVE_XCB_SYNC "XCB Sync version >= 1.10 required for synced window resizing")
+
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
########### configure tests ###############
@@ -471,7 +477,6 @@ set(kwin_KDE_LIBS
set(kwin_XLIB_LIBS
${X11_X11_LIB}
- ${X11_Xext_LIB}
${X11_ICE_LIB}
${X11_SM_LIB}
)
diff --git a/client.cpp b/client.cpp
index 167bbdd707..74649a3fb3 100644
--- a/client.cpp
+++ b/client.cpp
@@ -57,7 +57,6 @@ along with this program. If not, see .
#include
#include
// XLib
-#include
#include
#include
#include
@@ -1989,6 +1988,7 @@ void Client::getIcons()
void Client::getSyncCounter()
{
+#if HAVE_XCB_SYNC
if (!Xcb::Extensions::self()->isSyncAvailable())
return;
@@ -2014,13 +2014,17 @@ void Client::getSyncCounter()
if (!error.isNull()) {
syncRequest.alarm = XCB_NONE;
} else {
- XSyncAlarmAttributes attrs;
- XSyncIntToValue(&attrs.trigger.wait_value, 1);
- XSyncIntToValue(&attrs.delta, 1);
- XSyncChangeAlarm(display(), syncRequest.alarm, XSyncCADelta | XSyncCAValue, &attrs);
+ xcb_sync_change_alarm_value_list_t value;
+ memset(&value, 0, sizeof(value));
+ value.value.hi = 0;
+ value.value.lo = 1;
+ value.delta.hi = 0;
+ value.delta.lo = 1;
+ xcb_sync_change_alarm_aux(c, syncRequest.alarm, XCB_SYNC_CA_DELTA | XCB_SYNC_CA_VALUE, &value);
}
}
}
+#endif
}
/**
diff --git a/config-kwin.h.cmake b/config-kwin.h.cmake
index cf6cac2aea..8e8a805891 100644
--- a/config-kwin.h.cmake
+++ b/config-kwin.h.cmake
@@ -14,6 +14,7 @@
#cmakedefine01 HAVE_XKB
#cmakedefine01 HAVE_INPUT
#cmakedefine01 HAVE_XCB_CURSOR
+#cmakedefine01 HAVE_XCB_SYNC
/* Define to 1 if you have the header file. */
#cmakedefine HAVE_UNISTD_H 1