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 @@ | |||
1 | BasedOnStyle: LLVM | ||
2 | IndentWidth: 8 | ||
3 | UseTab: Always | ||
4 | BreakBeforeBraces: Attach | ||
5 | AllowShortIfStatementsOnASingleLine: false | ||
6 | IndentCaseLabels: false | ||
7 | 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 | |||
20 | ) | 20 | ) |
21 | if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git) | 21 | if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git) |
22 | execute_process( | 22 | execute_process( |
23 | COMMAND git describe --always | 23 | COMMAND git describe --always --tags |
24 | OUTPUT_VARIABLE GIT_COMMIT_HASH | 24 | OUTPUT_VARIABLE GIT_COMMIT_HASH |
25 | OUTPUT_STRIP_TRAILING_WHITESPACE | 25 | OUTPUT_STRIP_TRAILING_WHITESPACE |
26 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | 26 | 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 @@ | |||
1 | #include <json-c/json.h> | 1 | #include <json-c/json.h> |
2 | #include <ctype.h> | 2 | #include <ctype.h> |
3 | #include <string.h> | 3 | #include <string.h> |
4 | #include <stdint.h> | ||
4 | #include "container.h" | 5 | #include "container.h" |
5 | #include "util.h" | 6 | #include "util.h" |
6 | #include "ipc-json.h" | 7 | #include "ipc-json.h" |
@@ -149,7 +150,7 @@ json_object *ipc_json_describe_container(swayc_t *c) { | |||
149 | 150 | ||
150 | json_object *object = json_object_new_object(); | 151 | json_object *object = json_object_new_object(); |
151 | 152 | ||
152 | json_object_object_add(object, "id", json_object_new_int((int64_t)&c)); | 153 | json_object_object_add(object, "id", json_object_new_int((intptr_t)&c)); |
153 | json_object_object_add(object, "name", (c->name) ? json_object_new_string(c->name) : NULL); | 154 | json_object_object_add(object, "name", (c->name) ? json_object_new_string(c->name) : NULL); |
154 | json_object_object_add(object, "rect", ipc_json_create_rect(c)); | 155 | json_object_object_add(object, "rect", ipc_json_create_rect(c)); |
155 | json_object_object_add(object, "visible", json_object_new_boolean(c->visible)); | 156 | json_object_object_add(object, "visible", json_object_new_boolean(c->visible)); |