diff --git a/CMakeLists.txt b/CMakeLists.txt index 5981260..d956298 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,6 @@ project(i3ipc++) option(I3IPCpp_WITH_TESTS "Build unit tests executables" OFF) option(I3IPCpp_BUILD_EXAMPLES "Build example executables" OFF) -option(I3IPCpp_USE_FULL_SIGNALS "Provide full JSON event object with the signals for workspace_event and window_event. !!CHANGES API!!" OFF) set(BUILD_STATIC_LIBS ON) set(BUILD_SHARED_LIBS OFF) @@ -14,14 +13,7 @@ UNSET(BUILD_SHARED_LIBS) find_package(PkgConfig) pkg_check_modules(SIGCPP REQUIRED sigc++-2.0) -# configure a header file to pass some settings to the source code -configure_file ( - "${PROJECT_SOURCE_DIR}/include/i3ipc++/i3ipc++_config.hpp.in" - "${PROJECT_BINARY_DIR}/include/i3ipc++_config.hpp" - ) - include_directories( - ${PROJECT_BINARY_DIR}/include ${SIGCPP_INCLUDE_DIRS} 3rd/jsoncpp/include 3rd/auss/include @@ -49,8 +41,7 @@ set(I3IPCpp_INCLUDE_DIRS set(I3IPCpp_LIBRARIES i3ipc++_static ${SIGCPP_LIBRARIES} jsoncpp_lib_static) set(I3IPCpp_LIBRARY_DIRS ${I3IPCpp_LIBRARY_DIRS} PARENT_SCOPE) -set(I3IPCpp_INCLUDE_DIRS ${I3IPCpp_INCLUDE_DIRS}) -set(I3IPCpp_INCLUDE_DIRS ${I3IPCpp_INCLUDE_DIRS} ${PROJECT_BINARY_DIR}/include PARENT_SCOPE) +set(I3IPCpp_INCLUDE_DIRS ${I3IPCpp_INCLUDE_DIRS} PARENT_SCOPE) set(I3IPCpp_LIBRARIES ${I3IPCpp_LIBRARIES} PARENT_SCOPE) if(I3IPCpp_BUILD_EXAMPLES) diff --git a/include/i3ipc++/ipc.hpp b/include/i3ipc++/ipc.hpp index b8c25b9..3edc8b5 100644 --- a/include/i3ipc++/ipc.hpp +++ b/include/i3ipc++/ipc.hpp @@ -5,12 +5,6 @@ #include #include -#include "i3ipc++_config.hpp" - -#ifdef I3IPCpp_USE_FULL_SIGNALS -#include -#endif - #include extern "C" { @@ -85,7 +79,6 @@ enum EventType { ET_BARCONFIG_UPDATE = (1 << 4), ///< Bar config update event @attention Yet is not implemented as signal in connection }; -#ifndef I3IPCpp_USE_FULL_SIGNALS /** * Types of workspace events */ @@ -118,6 +111,7 @@ enum class BorderStyle : char { UNKNOWN = '?', //< If got an unknown border style in reply NONE = 'N', NORMAL = 'n', + PIXEL = 'P', ONE_PIXEL = '1', }; @@ -159,7 +153,6 @@ struct container_t { std::list< std::shared_ptr > nodes; }; -#endif /** diff --git a/src/ipc.cpp b/src/ipc.cpp index 37e30b6..a94a220 100644 --- a/src/ipc.cpp +++ b/src/ipc.cpp @@ -4,9 +4,7 @@ #include #include -#ifndef I3IPCpp_USE_FULL_SIGNALS #include -#endif #include "log.hpp" #include "ipc-util.hpp" @@ -78,6 +76,8 @@ static std::shared_ptr parse_container_from_json(const Json::Value container->border = BorderStyle::NORMAL; } else if (border == "none") { container->border = BorderStyle::NONE; + } else if (border == "pixel") { + container->border = BorderStyle::PIXEL; } else if (border == "1pixel") { container->border = BorderStyle::ONE_PIXEL; } else { @@ -178,6 +178,7 @@ std::string get_socketpath() { return str; } + connection::connection(const std::string& socket_path) : m_main_socket(i3_connect(socket_path)), m_event_socket(-1), m_subscriptions(0), m_socket_path(socket_path) { #define i3IPC_TYPE_STR "i3's event" signal_event.connect([this](EventType event_type, const std::shared_ptr& buf) {