parent
38af08d29a
commit
a3e2e51ac9
@ -44,7 +44,6 @@ option(ENABLE_PULSEAUDIO "Enable PulseAudio support" ON)
|
|||||||
|
|
||||||
option(WITH_XRANDR "xcb-randr support" ON)
|
option(WITH_XRANDR "xcb-randr support" ON)
|
||||||
option(WITH_XRANDR_MONITORS "xcb-randr monitor 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_XCOMPOSITE "xcb-composite support" ON)
|
||||||
option(WITH_XKB "xcb-xkb support" ON)
|
option(WITH_XKB "xcb-xkb support" ON)
|
||||||
option(WITH_XRM "xcb-xrm support" ON)
|
option(WITH_XRM "xcb-xrm support" ON)
|
||||||
|
@ -18,7 +18,6 @@ endif()
|
|||||||
querylib(ENABLE_PULSEAUDIO "pkg-config" libpulse libs dirs)
|
querylib(ENABLE_PULSEAUDIO "pkg-config" libpulse libs dirs)
|
||||||
|
|
||||||
querylib(WITH_XCOMPOSITE "pkg-config" xcb-composite 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_XKB "pkg-config" xcb-xkb libs dirs)
|
||||||
querylib(WITH_XRANDR "pkg-config" xcb-randr 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_XRANDR_MONITORS "pkg-config" "xcb-randr>=1.12" libs dirs)
|
||||||
|
@ -25,7 +25,6 @@ colored_option(" xkeyboard" WITH_XKB)
|
|||||||
message(STATUS " X extensions:")
|
message(STATUS " X extensions:")
|
||||||
colored_option(" xcb-randr" WITH_XRANDR)
|
colored_option(" xcb-randr" WITH_XRANDR)
|
||||||
colored_option(" xcb-randr (monitor support)" WITH_XRANDR_MONITORS)
|
colored_option(" xcb-randr (monitor support)" WITH_XRANDR_MONITORS)
|
||||||
colored_option(" xcb-damage" WITH_XDAMAGE)
|
|
||||||
colored_option(" xcb-composite" WITH_XCOMPOSITE)
|
colored_option(" xcb-composite" WITH_XCOMPOSITE)
|
||||||
colored_option(" xcb-xkb" WITH_XKB)
|
colored_option(" xcb-xkb" WITH_XKB)
|
||||||
colored_option(" xcb-xrm" WITH_XRM)
|
colored_option(" xcb-xrm" WITH_XRM)
|
||||||
|
@ -7,9 +7,6 @@ list(APPEND dirs ${CMAKE_CURRENT_LIST_DIR})
|
|||||||
if(WITH_XRANDR)
|
if(WITH_XRANDR)
|
||||||
list(APPEND XPP_EXTENSION_LIST xpp::randr::extension)
|
list(APPEND XPP_EXTENSION_LIST xpp::randr::extension)
|
||||||
endif()
|
endif()
|
||||||
if(WITH_XDAMAGE)
|
|
||||||
list(APPEND XPP_EXTENSION_LIST xpp::damage::extension)
|
|
||||||
endif()
|
|
||||||
if(WITH_XCOMPOSITE)
|
if(WITH_XCOMPOSITE)
|
||||||
list(APPEND XPP_EXTENSION_LIST xpp::composite::extension)
|
list(APPEND XPP_EXTENSION_LIST xpp::composite::extension)
|
||||||
endif()
|
endif()
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#cmakedefine01 ENABLE_PULSEAUDIO
|
#cmakedefine01 ENABLE_PULSEAUDIO
|
||||||
|
|
||||||
#cmakedefine01 WITH_XRANDR
|
#cmakedefine01 WITH_XRANDR
|
||||||
#cmakedefine01 WITH_XDAMAGE
|
|
||||||
#cmakedefine01 WITH_XCOMPOSITE
|
#cmakedefine01 WITH_XCOMPOSITE
|
||||||
#cmakedefine01 WITH_XKB
|
#cmakedefine01 WITH_XKB
|
||||||
#cmakedefine01 WITH_XRM
|
#cmakedefine01 WITH_XRM
|
||||||
@ -97,10 +96,9 @@ const auto print_build_info = [](bool extended = false) {
|
|||||||
(ENABLE_XKEYBOARD ? '+' : '-'));
|
(ENABLE_XKEYBOARD ? '+' : '-'));
|
||||||
if (extended) {
|
if (extended) {
|
||||||
printf("\n");
|
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 ? '+' : '-'),
|
||||||
(WITH_XRANDR_MONITORS ? '+' : '-'),
|
(WITH_XRANDR_MONITORS ? '+' : '-'),
|
||||||
(WITH_XDAMAGE ? '+' : '-'),
|
|
||||||
(WITH_XCOMPOSITE ? '+' : '-'),
|
(WITH_XCOMPOSITE ? '+' : '-'),
|
||||||
(WITH_XKB ? '+' : '-'),
|
(WITH_XKB ? '+' : '-'),
|
||||||
(WITH_XRM ? '+' : '-'),
|
(WITH_XRM ? '+' : '-'),
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
#include "settings.hpp"
|
#include "settings.hpp"
|
||||||
|
|
||||||
#if WITH_XDAMAGE
|
|
||||||
#include "x11/extensions/damage.hpp"
|
|
||||||
#endif
|
|
||||||
#if WITH_XRANDR
|
#if WITH_XRANDR
|
||||||
#include "x11/extensions/randr.hpp"
|
#include "x11/extensions/randr.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
@ -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
|
|
@ -3,11 +3,6 @@
|
|||||||
#include "settings.hpp"
|
#include "settings.hpp"
|
||||||
|
|
||||||
namespace xpp {
|
namespace xpp {
|
||||||
#if WITH_XDAMAGE
|
|
||||||
namespace damage {
|
|
||||||
class extension;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#if WITH_XRANDR
|
#if WITH_XRANDR
|
||||||
namespace randr {
|
namespace randr {
|
||||||
class extension;
|
class extension;
|
||||||
|
@ -17,9 +17,6 @@ set(XCB_PROTOS xproto)
|
|||||||
if(WITH_XRANDR)
|
if(WITH_XRANDR)
|
||||||
list(APPEND XCB_PROTOS randr)
|
list(APPEND XCB_PROTOS randr)
|
||||||
endif()
|
endif()
|
||||||
if(WITH_XDAMAGE)
|
|
||||||
list(APPEND XCB_PROTOS damage)
|
|
||||||
endif()
|
|
||||||
if(WITH_XCOMPOSITE)
|
if(WITH_XCOMPOSITE)
|
||||||
list(APPEND XCB_PROTOS composite)
|
list(APPEND XCB_PROTOS composite)
|
||||||
endif()
|
endif()
|
||||||
|
@ -42,9 +42,6 @@ endif()
|
|||||||
if(NOT WITH_XRANDR)
|
if(NOT WITH_XRANDR)
|
||||||
list(REMOVE_ITEM files x11/extensions/randr.cpp)
|
list(REMOVE_ITEM files x11/extensions/randr.cpp)
|
||||||
endif()
|
endif()
|
||||||
if(NOT WITH_XDAMAGE)
|
|
||||||
list(REMOVE_ITEM files x11/extensions/damage.cpp)
|
|
||||||
endif()
|
|
||||||
if(NOT WITH_XCOMPOSITE)
|
if(NOT WITH_XCOMPOSITE)
|
||||||
list(REMOVE_ITEM files x11/extensions/composite.cpp)
|
list(REMOVE_ITEM files x11/extensions/composite.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
@ -38,9 +38,6 @@ connection::connection(xcb_connection_t* c, int default_screen) : base_type(c, d
|
|||||||
|
|
||||||
// }}}
|
// }}}
|
||||||
// Query for X extensions {{{
|
// Query for X extensions {{{
|
||||||
#if WITH_XDAMAGE
|
|
||||||
damage_util::query_extension(*this);
|
|
||||||
#endif
|
|
||||||
#if WITH_XRANDR
|
#if WITH_XRANDR
|
||||||
randr_util::query_extension(*this);
|
randr_util::query_extension(*this);
|
||||||
#endif
|
#endif
|
||||||
|
@ -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
|
|
Loading…
Reference in New Issue
Block a user