build: remove xdamage extension

Unused

Ref: #1730
This commit is contained in:
patrick96 2019-06-01 19:28:23 +02:00 committed by Patrick Ziegler
parent 38af08d29a
commit a3e2e51ac9
12 changed files with 1 additions and 69 deletions

View File

@ -44,7 +44,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_XCOMPOSITE "xcb-composite support" ON)
option(WITH_XKB "xcb-xkb support" ON)
option(WITH_XRM "xcb-xrm support" ON)

View File

@ -18,7 +18,6 @@ endif()
querylib(ENABLE_PULSEAUDIO "pkg-config" libpulse libs dirs)
querylib(WITH_XCOMPOSITE "pkg-config" xcb-composite libs dirs)
querylib(WITH_XDAMAGE "pkg-config" xcb-damage libs dirs)
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)

View File

@ -25,7 +25,6 @@ colored_option(" xkeyboard" WITH_XKB)
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-composite" WITH_XCOMPOSITE)
colored_option(" xcb-xkb" WITH_XKB)
colored_option(" xcb-xrm" WITH_XRM)

View File

@ -7,9 +7,6 @@ list(APPEND dirs ${CMAKE_CURRENT_LIST_DIR})
if(WITH_XRANDR)
list(APPEND XPP_EXTENSION_LIST xpp::randr::extension)
endif()
if(WITH_XDAMAGE)
list(APPEND XPP_EXTENSION_LIST xpp::damage::extension)
endif()
if(WITH_XCOMPOSITE)
list(APPEND XPP_EXTENSION_LIST xpp::composite::extension)
endif()

View File

@ -17,7 +17,6 @@
#cmakedefine01 ENABLE_PULSEAUDIO
#cmakedefine01 WITH_XRANDR
#cmakedefine01 WITH_XDAMAGE
#cmakedefine01 WITH_XCOMPOSITE
#cmakedefine01 WITH_XKB
#cmakedefine01 WITH_XRM
@ -97,10 +96,9 @@ const auto print_build_info = [](bool extended = false) {
(ENABLE_XKEYBOARD ? '+' : '-'));
if (extended) {
printf("\n");
printf("X extensions: %crandr (%cmonitors) %cdamage %ccomposite %cxkb %cxrm %cxcursor\n",
printf("X extensions: %crandr (%cmonitors) %ccomposite %cxkb %cxrm %cxcursor\n",
(WITH_XRANDR ? '+' : '-'),
(WITH_XRANDR_MONITORS ? '+' : '-'),
(WITH_XDAMAGE ? '+' : '-'),
(WITH_XCOMPOSITE ? '+' : '-'),
(WITH_XKB ? '+' : '-'),
(WITH_XRM ? '+' : '-'),

View File

@ -2,9 +2,6 @@
#include "settings.hpp"
#if WITH_XDAMAGE
#include "x11/extensions/damage.hpp"
#endif
#if WITH_XRANDR
#include "x11/extensions/randr.hpp"
#endif

View File

@ -1,23 +0,0 @@
#pragma once
#include "settings.hpp"
#if not WITH_XDAMAGE
#error "X Damage extension is disabled..."
#endif
#include <xcb/damage.h>
#include <xpp/proto/damage.hpp>
#include "common.hpp"
POLYBAR_NS
// fwd
class connection;
namespace damage_util {
void query_extension(connection& conn);
}
POLYBAR_NS_END

View File

@ -3,11 +3,6 @@
#include "settings.hpp"
namespace xpp {
#if WITH_XDAMAGE
namespace damage {
class extension;
}
#endif
#if WITH_XRANDR
namespace randr {
class extension;

View File

@ -17,9 +17,6 @@ set(XCB_PROTOS xproto)
if(WITH_XRANDR)
list(APPEND XCB_PROTOS randr)
endif()
if(WITH_XDAMAGE)
list(APPEND XCB_PROTOS damage)
endif()
if(WITH_XCOMPOSITE)
list(APPEND XCB_PROTOS composite)
endif()

View File

@ -42,9 +42,6 @@ endif()
if(NOT WITH_XRANDR)
list(REMOVE_ITEM files x11/extensions/randr.cpp)
endif()
if(NOT WITH_XDAMAGE)
list(REMOVE_ITEM files x11/extensions/damage.cpp)
endif()
if(NOT WITH_XCOMPOSITE)
list(REMOVE_ITEM files x11/extensions/composite.cpp)
endif()

View File

@ -38,9 +38,6 @@ connection::connection(xcb_connection_t* c, int default_screen) : base_type(c, d
// }}}
// Query for X extensions {{{
#if WITH_XDAMAGE
damage_util::query_extension(*this);
#endif
#if WITH_XRANDR
randr_util::query_extension(*this);
#endif

View File

@ -1,20 +0,0 @@
#include "x11/extensions/damage.hpp"
#include "errors.hpp"
#include "x11/connection.hpp"
POLYBAR_NS
namespace damage_util {
/**
* Query for the XDAMAGE extension
*/
void query_extension(connection& conn) {
conn.damage().query_version(XCB_DAMAGE_MAJOR_VERSION, XCB_DAMAGE_MINOR_VERSION);
if (!conn.extension<xpp::damage::extension>()->present) {
throw application_error("Missing X extension: Damage");
}
}
}
POLYBAR_NS_END