diff options
-rw-r--r-- | .clang-format | 7 | ||||
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | sway/ipc-json.c | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..83d50545 --- /dev/null +++ b/.clang-format @@ -0,0 +1,7 @@ +BasedOnStyle: LLVM +IndentWidth: 8 +UseTab: Always +BreakBeforeBraces: Attach +AllowShortIfStatementsOnASingleLine: false +IndentCaseLabels: false +ColumnLimit: 0 diff --git a/CMakeLists.txt b/CMakeLists.txt index 813bec4d..83989ecd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ list(INSERT CMAKE_MODULE_PATH 0 ) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git) execute_process( - COMMAND git describe --always + COMMAND git describe --always --tags OUTPUT_VARIABLE GIT_COMMIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 7edc30f7..446b1815 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c @@ -1,6 +1,7 @@ #include <json-c/json.h> #include <ctype.h> #include <string.h> +#include <stdint.h> #include "container.h" #include "util.h" #include "ipc-json.h" @@ -149,7 +150,7 @@ json_object *ipc_json_describe_container(swayc_t *c) { json_object *object = json_object_new_object(); - json_object_object_add(object, "id", json_object_new_int((int64_t)&c)); + json_object_object_add(object, "id", json_object_new_int((intptr_t)&c)); json_object_object_add(object, "name", (c->name) ? json_object_new_string(c->name) : NULL); json_object_object_add(object, "rect", ipc_json_create_rect(c)); json_object_object_add(object, "visible", json_object_new_boolean(c->visible)); |