diff --git a/include/i3ipc++/ipc.hpp b/include/i3ipc++/ipc.hpp index 35bedfd..23c0107 100644 --- a/include/i3ipc++/ipc.hpp +++ b/include/i3ipc++/ipc.hpp @@ -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 }; diff --git a/src/ipc.cpp b/src/ipc.cpp index 72db8b6..19501de 100644 --- a/src/ipc.cpp +++ b/src/ipc.cpp @@ -45,8 +45,8 @@ std::vector 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(), };