Compare commits
3 Commits
add-wsmove
...
fabs
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae5a2c345d | ||
|
|
eaa8a3ff3f | ||
| a66f24888f |
@@ -57,7 +57,7 @@ target_link_libraries(i3ipc++
|
||||
)
|
||||
|
||||
target_compile_options(i3ipc++
|
||||
PRIVATE -std=c++11 -Wall -Wextra -Wno-unused-parameter
|
||||
PRIVATE -std=c++17 -Wall -Wextra -Wno-unused-parameter
|
||||
)
|
||||
|
||||
target_compile_definitions(i3ipc++
|
||||
|
||||
@@ -30,8 +30,8 @@ std::string get_socketpath();
|
||||
* Primitive of rectangle
|
||||
*/
|
||||
struct rect_t {
|
||||
uint32_t x; ///< Position on X axis
|
||||
uint32_t y; ///< Position on Y axis
|
||||
int32_t x; ///< Position on X axis
|
||||
int32_t y; ///< Position on Y axis
|
||||
uint32_t width; ///< Width of rectangle
|
||||
uint32_t height; ///< Height of rectangle
|
||||
};
|
||||
@@ -95,6 +95,7 @@ enum class WorkspaceEventType : char {
|
||||
RENAME = 'r', ///< Renamed
|
||||
RELOAD = 'l', ///< Reloaded
|
||||
RESTORED = 's', ///< Restored
|
||||
MOVE = 'm', ///< Moved (to output)
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,6 +8,7 @@ extern "C" {
|
||||
#include <errno.h>
|
||||
}
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <ios>
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@ std::vector<std::ostream*> g_logging_err_outs = {
|
||||
|
||||
inline rect_t parse_rect_from_json(const Json::Value& value) {
|
||||
return {
|
||||
.x = value["x"].asUInt(),
|
||||
.y = value["y"].asUInt(),
|
||||
.x = value["x"].asInt(),
|
||||
.y = value["y"].asInt(),
|
||||
.width = value["width"].asUInt(),
|
||||
.height = value["height"].asUInt(),
|
||||
};
|
||||
@@ -355,6 +355,8 @@ connection::connection(const std::string& socket_path) : m_main_socket(i3_conne
|
||||
ev.type = WorkspaceEventType::RELOAD;
|
||||
} else if (change == "restored") {
|
||||
ev.type = WorkspaceEventType::RESTORED;
|
||||
} else if(change == "move") {
|
||||
ev.type = WorkspaceEventType::MOVE;
|
||||
} else {
|
||||
I3IPC_WARN("Unknown workspace event type " << change)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user