mirror of https://github.com/polybar/polybar.git
parent
6ff2b2b37f
commit
38af08d29a
|
@ -45,7 +45,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_XDAMAGE "xcb-damage support" OFF)
|
||||||
option(WITH_XSYNC "xcb-sync 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)
|
||||||
|
|
|
@ -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 "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)
|
||||||
querylib(WITH_XRM "pkg-config" xcb-xrm 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)
|
querylib(WITH_XCURSOR "pkg-config" xcb-cursor libs dirs)
|
||||||
|
|
||||||
# FreeBSD Support
|
# FreeBSD Support
|
||||||
|
|
|
@ -26,7 +26,6 @@ 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-damage" WITH_XDAMAGE)
|
||||||
colored_option(" xcb-sync" WITH_XSYNC)
|
|
||||||
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)
|
||||||
|
|
|
@ -10,9 +10,6 @@ endif()
|
||||||
if(WITH_XDAMAGE)
|
if(WITH_XDAMAGE)
|
||||||
list(APPEND XPP_EXTENSION_LIST xpp::damage::extension)
|
list(APPEND XPP_EXTENSION_LIST xpp::damage::extension)
|
||||||
endif()
|
endif()
|
||||||
if(WITH_XSYNC)
|
|
||||||
list(APPEND XPP_EXTENSION_LIST xpp::sync::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()
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
#cmakedefine01 WITH_XRANDR
|
#cmakedefine01 WITH_XRANDR
|
||||||
#cmakedefine01 WITH_XDAMAGE
|
#cmakedefine01 WITH_XDAMAGE
|
||||||
#cmakedefine01 WITH_XSYNC
|
|
||||||
#cmakedefine01 WITH_XCOMPOSITE
|
#cmakedefine01 WITH_XCOMPOSITE
|
||||||
#cmakedefine01 WITH_XKB
|
#cmakedefine01 WITH_XKB
|
||||||
#cmakedefine01 WITH_XRM
|
#cmakedefine01 WITH_XRM
|
||||||
|
@ -98,11 +97,10 @@ 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 %csync %ccomposite %cxkb %cxrm %cxcursor\n",
|
printf("X extensions: %crandr (%cmonitors) %cdamage %ccomposite %cxkb %cxrm %cxcursor\n",
|
||||||
(WITH_XRANDR ? '+' : '-'),
|
(WITH_XRANDR ? '+' : '-'),
|
||||||
(WITH_XRANDR_MONITORS ? '+' : '-'),
|
(WITH_XRANDR_MONITORS ? '+' : '-'),
|
||||||
(WITH_XDAMAGE ? '+' : '-'),
|
(WITH_XDAMAGE ? '+' : '-'),
|
||||||
(WITH_XSYNC ? '+' : '-'),
|
|
||||||
(WITH_XCOMPOSITE ? '+' : '-'),
|
(WITH_XCOMPOSITE ? '+' : '-'),
|
||||||
(WITH_XKB ? '+' : '-'),
|
(WITH_XKB ? '+' : '-'),
|
||||||
(WITH_XRM ? '+' : '-'),
|
(WITH_XRM ? '+' : '-'),
|
||||||
|
|
|
@ -8,9 +8,6 @@
|
||||||
#if WITH_XRANDR
|
#if WITH_XRANDR
|
||||||
#include "x11/extensions/randr.hpp"
|
#include "x11/extensions/randr.hpp"
|
||||||
#endif
|
#endif
|
||||||
#if WITH_XSYNC
|
|
||||||
#include "x11/extensions/sync.hpp"
|
|
||||||
#endif
|
|
||||||
#include "x11/extensions/composite.hpp"
|
#include "x11/extensions/composite.hpp"
|
||||||
#if WITH_XKB
|
#if WITH_XKB
|
||||||
#include "x11/extensions/xkb.hpp"
|
#include "x11/extensions/xkb.hpp"
|
||||||
|
|
|
@ -13,11 +13,6 @@ namespace xpp {
|
||||||
class extension;
|
class extension;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if WITH_XSYNC
|
|
||||||
namespace sync {
|
|
||||||
class extension;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#if WITH_XCOMPOSITE
|
#if WITH_XCOMPOSITE
|
||||||
namespace composite {
|
namespace composite {
|
||||||
class extension;
|
class extension;
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "settings.hpp"
|
|
||||||
|
|
||||||
#if not WITH_XSYNC
|
|
||||||
#error "X Sync extension is disabled..."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <xcb/sync.h>
|
|
||||||
#include <xpp/proto/sync.hpp>
|
|
||||||
|
|
||||||
#include "common.hpp"
|
|
||||||
|
|
||||||
POLYBAR_NS
|
|
||||||
|
|
||||||
// fwd
|
|
||||||
class connection;
|
|
||||||
|
|
||||||
namespace sync_util {
|
|
||||||
void query_extension(connection& conn);
|
|
||||||
}
|
|
||||||
|
|
||||||
POLYBAR_NS_END
|
|
|
@ -20,9 +20,6 @@ endif()
|
||||||
if(WITH_XDAMAGE)
|
if(WITH_XDAMAGE)
|
||||||
list(APPEND XCB_PROTOS damage)
|
list(APPEND XCB_PROTOS damage)
|
||||||
endif()
|
endif()
|
||||||
if(WITH_XSYNC)
|
|
||||||
list(APPEND XCB_PROTOS sync)
|
|
||||||
endif()
|
|
||||||
if(WITH_XCOMPOSITE)
|
if(WITH_XCOMPOSITE)
|
||||||
list(APPEND XCB_PROTOS composite)
|
list(APPEND XCB_PROTOS composite)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -45,9 +45,6 @@ endif()
|
||||||
if(NOT WITH_XDAMAGE)
|
if(NOT WITH_XDAMAGE)
|
||||||
list(REMOVE_ITEM files x11/extensions/damage.cpp)
|
list(REMOVE_ITEM files x11/extensions/damage.cpp)
|
||||||
endif()
|
endif()
|
||||||
if(NOT WITH_XSYNC)
|
|
||||||
list(REMOVE_ITEM files x11/extensions/sync.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()
|
||||||
|
|
|
@ -44,9 +44,6 @@ connection::connection(xcb_connection_t* c, int default_screen) : base_type(c, d
|
||||||
#if WITH_XRANDR
|
#if WITH_XRANDR
|
||||||
randr_util::query_extension(*this);
|
randr_util::query_extension(*this);
|
||||||
#endif
|
#endif
|
||||||
#if WITH_XSYNC
|
|
||||||
sync_util::query_extension(*this);
|
|
||||||
#endif
|
|
||||||
#if WITH_XCOMPOSITE
|
#if WITH_XCOMPOSITE
|
||||||
composite_util::query_extension(*this);
|
composite_util::query_extension(*this);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -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<xpp::sync::extension>()->present) {
|
|
||||||
throw application_error("Missing X extension: Sync");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
POLYBAR_NS_END
|
|
Loading…
Reference in New Issue