From 38af08d29a5da0f69e4c032116a582d0e32a644b Mon Sep 17 00:00:00 2001
From: patrick96
Date: Sat, 1 Jun 2019 19:23:36 +0200
Subject: [PATCH] build: remove xsync extension
Unused
Ref: #1730
---
cmake/02-opts.cmake | 1 -
cmake/03-libs.cmake | 1 -
cmake/05-summary.cmake | 1 -
include/CMakeLists.txt | 3 ---
include/settings.hpp.cmake | 4 +---
include/x11/extensions/all.hpp | 3 ---
include/x11/extensions/fwd.hpp | 5 -----
include/x11/extensions/sync.hpp | 23 -----------------------
lib/CMakeLists.txt | 3 ---
src/CMakeLists.txt | 3 ---
src/x11/connection.cpp | 3 ---
src/x11/extensions/sync.cpp | 22 ----------------------
12 files changed, 1 insertion(+), 71 deletions(-)
delete mode 100644 include/x11/extensions/sync.hpp
delete mode 100644 src/x11/extensions/sync.cpp
diff --git a/cmake/02-opts.cmake b/cmake/02-opts.cmake
index ad1ee741..ecac5b27 100644
--- a/cmake/02-opts.cmake
+++ b/cmake/02-opts.cmake
@@ -45,7 +45,6 @@ option(ENABLE_PULSEAUDIO "Enable PulseAudio support" ON)
option(WITH_XRANDR "xcb-randr support" ON)
option(WITH_XRANDR_MONITORS "xcb-randr monitor support" ON)
option(WITH_XDAMAGE "xcb-damage support" OFF)
-option(WITH_XSYNC "xcb-sync support" OFF)
option(WITH_XCOMPOSITE "xcb-composite support" ON)
option(WITH_XKB "xcb-xkb support" ON)
option(WITH_XRM "xcb-xrm support" ON)
diff --git a/cmake/03-libs.cmake b/cmake/03-libs.cmake
index fa98cf64..d23d71cb 100644
--- a/cmake/03-libs.cmake
+++ b/cmake/03-libs.cmake
@@ -23,7 +23,6 @@ querylib(WITH_XKB "pkg-config" xcb-xkb libs dirs)
querylib(WITH_XRANDR "pkg-config" xcb-randr libs dirs)
querylib(WITH_XRANDR_MONITORS "pkg-config" "xcb-randr>=1.12" libs dirs)
querylib(WITH_XRM "pkg-config" xcb-xrm libs dirs)
-querylib(WITH_XSYNC "pkg-config" xcb-sync libs dirs)
querylib(WITH_XCURSOR "pkg-config" xcb-cursor libs dirs)
# FreeBSD Support
diff --git a/cmake/05-summary.cmake b/cmake/05-summary.cmake
index bb360e0c..86484484 100644
--- a/cmake/05-summary.cmake
+++ b/cmake/05-summary.cmake
@@ -26,7 +26,6 @@ message(STATUS " X extensions:")
colored_option(" xcb-randr" WITH_XRANDR)
colored_option(" xcb-randr (monitor support)" WITH_XRANDR_MONITORS)
colored_option(" xcb-damage" WITH_XDAMAGE)
-colored_option(" xcb-sync" WITH_XSYNC)
colored_option(" xcb-composite" WITH_XCOMPOSITE)
colored_option(" xcb-xkb" WITH_XKB)
colored_option(" xcb-xrm" WITH_XRM)
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index 3e63db6a..71fff412 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -10,9 +10,6 @@ endif()
if(WITH_XDAMAGE)
list(APPEND XPP_EXTENSION_LIST xpp::damage::extension)
endif()
-if(WITH_XSYNC)
- list(APPEND XPP_EXTENSION_LIST xpp::sync::extension)
-endif()
if(WITH_XCOMPOSITE)
list(APPEND XPP_EXTENSION_LIST xpp::composite::extension)
endif()
diff --git a/include/settings.hpp.cmake b/include/settings.hpp.cmake
index c387b9be..c4612e0e 100644
--- a/include/settings.hpp.cmake
+++ b/include/settings.hpp.cmake
@@ -18,7 +18,6 @@
#cmakedefine01 WITH_XRANDR
#cmakedefine01 WITH_XDAMAGE
-#cmakedefine01 WITH_XSYNC
#cmakedefine01 WITH_XCOMPOSITE
#cmakedefine01 WITH_XKB
#cmakedefine01 WITH_XRM
@@ -98,11 +97,10 @@ const auto print_build_info = [](bool extended = false) {
(ENABLE_XKEYBOARD ? '+' : '-'));
if (extended) {
printf("\n");
- printf("X extensions: %crandr (%cmonitors) %cdamage %csync %ccomposite %cxkb %cxrm %cxcursor\n",
+ printf("X extensions: %crandr (%cmonitors) %cdamage %ccomposite %cxkb %cxrm %cxcursor\n",
(WITH_XRANDR ? '+' : '-'),
(WITH_XRANDR_MONITORS ? '+' : '-'),
(WITH_XDAMAGE ? '+' : '-'),
- (WITH_XSYNC ? '+' : '-'),
(WITH_XCOMPOSITE ? '+' : '-'),
(WITH_XKB ? '+' : '-'),
(WITH_XRM ? '+' : '-'),
diff --git a/include/x11/extensions/all.hpp b/include/x11/extensions/all.hpp
index da01423b..7251c900 100644
--- a/include/x11/extensions/all.hpp
+++ b/include/x11/extensions/all.hpp
@@ -8,9 +8,6 @@
#if WITH_XRANDR
#include "x11/extensions/randr.hpp"
#endif
-#if WITH_XSYNC
-#include "x11/extensions/sync.hpp"
-#endif
#include "x11/extensions/composite.hpp"
#if WITH_XKB
#include "x11/extensions/xkb.hpp"
diff --git a/include/x11/extensions/fwd.hpp b/include/x11/extensions/fwd.hpp
index 4ec02aed..c3e553a7 100644
--- a/include/x11/extensions/fwd.hpp
+++ b/include/x11/extensions/fwd.hpp
@@ -13,11 +13,6 @@ namespace xpp {
class extension;
}
#endif
-#if WITH_XSYNC
- namespace sync {
- class extension;
- }
-#endif
#if WITH_XCOMPOSITE
namespace composite {
class extension;
diff --git a/include/x11/extensions/sync.hpp b/include/x11/extensions/sync.hpp
deleted file mode 100644
index 024e7606..00000000
--- a/include/x11/extensions/sync.hpp
+++ /dev/null
@@ -1,23 +0,0 @@
-#pragma once
-
-#include "settings.hpp"
-
-#if not WITH_XSYNC
-#error "X Sync extension is disabled..."
-#endif
-
-#include
-#include
-
-#include "common.hpp"
-
-POLYBAR_NS
-
-// fwd
-class connection;
-
-namespace sync_util {
- void query_extension(connection& conn);
-}
-
-POLYBAR_NS_END
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index bdf20803..baecce25 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -20,9 +20,6 @@ endif()
if(WITH_XDAMAGE)
list(APPEND XCB_PROTOS damage)
endif()
-if(WITH_XSYNC)
- list(APPEND XCB_PROTOS sync)
-endif()
if(WITH_XCOMPOSITE)
list(APPEND XCB_PROTOS composite)
endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1bc29ebd..86d091dd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -45,9 +45,6 @@ endif()
if(NOT WITH_XDAMAGE)
list(REMOVE_ITEM files x11/extensions/damage.cpp)
endif()
-if(NOT WITH_XSYNC)
- list(REMOVE_ITEM files x11/extensions/sync.cpp)
-endif()
if(NOT WITH_XCOMPOSITE)
list(REMOVE_ITEM files x11/extensions/composite.cpp)
endif()
diff --git a/src/x11/connection.cpp b/src/x11/connection.cpp
index ad05062a..9b008f1f 100644
--- a/src/x11/connection.cpp
+++ b/src/x11/connection.cpp
@@ -44,9 +44,6 @@ connection::connection(xcb_connection_t* c, int default_screen) : base_type(c, d
#if WITH_XRANDR
randr_util::query_extension(*this);
#endif
-#if WITH_XSYNC
- sync_util::query_extension(*this);
-#endif
#if WITH_XCOMPOSITE
composite_util::query_extension(*this);
#endif
diff --git a/src/x11/extensions/sync.cpp b/src/x11/extensions/sync.cpp
deleted file mode 100644
index 1b2fde8d..00000000
--- a/src/x11/extensions/sync.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "x11/extensions/sync.hpp"
-
-#include "errors.hpp"
-#include "x11/connection.hpp"
-#include "x11/extensions/all.hpp"
-
-POLYBAR_NS
-
-namespace sync_util {
- /**
- * Query for the XSYNC extension
- */
- void query_extension(connection& conn) {
- conn.sync().initialize(XCB_SYNC_MAJOR_VERSION, XCB_SYNC_MINOR_VERSION);
-
- if (!conn.extension()->present) {
- throw application_error("Missing X extension: Sync");
- }
- }
-}
-
-POLYBAR_NS_END