aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-04-17 16:26:26 +0200
committerLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-04-17 16:51:33 +0200
commitf39034a55f6303c4729a72722a7e1c34d93936af (patch)
treeee675dd29adbc678307fafe1a22163d8b2cf4c4e
parentAdd support for pango markup (diff)
downloadsway-f39034a55f6303c4729a72722a7e1c34d93936af.tar.gz
sway-f39034a55f6303c4729a72722a7e1c34d93936af.tar.zst
sway-f39034a55f6303c4729a72722a7e1c34d93936af.zip
Use correct format string for x86_64 and i686
Fix #587
-rw-r--r--sway/container.c10
-rw-r--r--sway/debug_log.c2
-rw-r--r--sway/focus.c4
-rw-r--r--sway/handlers.c8
-rw-r--r--sway/ipc-server.c2
5 files changed, 13 insertions, 13 deletions
diff --git a/sway/container.c b/sway/container.c
index a4b2d1c2..95a46632 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -80,13 +80,13 @@ swayc_t *new_output(wlc_handle handle) {
80 swayc_t *op = root_container.children->items[i]; 80 swayc_t *op = root_container.children->items[i];
81 const char *op_name = op->name; 81 const char *op_name = op->name;
82 if (op_name && name && strcmp(op_name, name) == 0) { 82 if (op_name && name && strcmp(op_name, name) == 0) {
83 sway_log(L_DEBUG, "restoring output %lu:%s", handle, op_name); 83 sway_log(L_DEBUG, "restoring output %" PRIuPTR ":%s", handle, op_name);
84 return op; 84 return op;
85 } 85 }
86 } 86 }
87 } 87 }
88 88
89 sway_log(L_DEBUG, "New output %lu:%s", handle, name); 89 sway_log(L_DEBUG, "New output %" PRIuPTR ":%s", handle, name);
90 90
91 struct output_config *oc = NULL, *all = NULL; 91 struct output_config *oc = NULL, *all = NULL;
92 int i; 92 int i;
@@ -254,7 +254,7 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) {
254 } 254 }
255 const char *title = wlc_view_get_title(handle); 255 const char *title = wlc_view_get_title(handle);
256 swayc_t *view = new_swayc(C_VIEW); 256 swayc_t *view = new_swayc(C_VIEW);
257 sway_log(L_DEBUG, "Adding new view %lu:%s to container %p %d", 257 sway_log(L_DEBUG, "Adding new view %" PRIuPTR ":%s to container %p %d",
258 handle, title, sibling, sibling ? sibling->type : 0); 258 handle, title, sibling, sibling ? sibling->type : 0);
259 // Setup values 259 // Setup values
260 view->handle = handle; 260 view->handle = handle;
@@ -292,7 +292,7 @@ swayc_t *new_floating_view(wlc_handle handle) {
292 } 292 }
293 const char *title = wlc_view_get_title(handle); 293 const char *title = wlc_view_get_title(handle);
294 swayc_t *view = new_swayc(C_VIEW); 294 swayc_t *view = new_swayc(C_VIEW);
295 sway_log(L_DEBUG, "Adding new view %lu:%x:%s as a floating view", 295 sway_log(L_DEBUG, "Adding new view %" PRIuPTR ":%x:%s as a floating view",
296 handle, wlc_view_get_type(handle), title); 296 handle, wlc_view_get_type(handle), title);
297 // Setup values 297 // Setup values
298 view->handle = handle; 298 view->handle = handle;
@@ -354,7 +354,7 @@ swayc_t *destroy_output(swayc_t *output) {
354 arrange_windows(root_container.children->items[p], -1, -1); 354 arrange_windows(root_container.children->items[p], -1, -1);
355 } 355 }
356 } 356 }
357 sway_log(L_DEBUG, "OUTPUT: Destroying output '%lu'", output->handle); 357 sway_log(L_DEBUG, "OUTPUT: Destroying output '%" PRIuPTR "'", output->handle);
358 free_swayc(output); 358 free_swayc(output);
359 return &root_container; 359 return &root_container;
360} 360}
diff --git a/sway/debug_log.c b/sway/debug_log.c
index 6fd6422f..761dca6c 100644
--- a/sway/debug_log.c
+++ b/sway/debug_log.c
@@ -26,7 +26,7 @@ static void container_log(const swayc_t *c, int depth) {
26 fprintf(stderr,"|(%p)",c); 26 fprintf(stderr,"|(%p)",c);
27 fprintf(stderr,"(p:%-8p)",c->parent); 27 fprintf(stderr,"(p:%-8p)",c->parent);
28 fprintf(stderr,"(f:%-8p)",c->focused); 28 fprintf(stderr,"(f:%-8p)",c->focused);
29 fprintf(stderr,"(h:%2ld)",c->handle); 29 fprintf(stderr,"(h:%2" PRIuPTR ")",c->handle);
30 fprintf(stderr,"Type:%-4s|", 30 fprintf(stderr,"Type:%-4s|",
31 c->type == C_ROOT ? "root" : 31 c->type == C_ROOT ? "root" :
32 c->type == C_OUTPUT ? "op" : 32 c->type == C_OUTPUT ? "op" :
diff --git a/sway/focus.c b/sway/focus.c
index 93391c63..cdc9a888 100644
--- a/sway/focus.c
+++ b/sway/focus.c
@@ -105,7 +105,7 @@ bool set_focused_container(swayc_t *c) {
105 active_ws_child_count = active_ws->children->length + active_ws->floating->length; 105 active_ws_child_count = active_ws->children->length + active_ws->floating->length;
106 } 106 }
107 107
108 swayc_log(L_DEBUG, c, "Setting focus to %p:%ld", c, c->handle); 108 swayc_log(L_DEBUG, c, "Setting focus to %p:%" PRIuPTR, c, c->handle);
109 109
110 // Get workspace for c, get that workspaces current focused container. 110 // Get workspace for c, get that workspaces current focused container.
111 swayc_t *workspace = swayc_active_workspace_for(c); 111 swayc_t *workspace = swayc_active_workspace_for(c);
@@ -196,7 +196,7 @@ bool set_focused_container_for(swayc_t *a, swayc_t *c) {
196 return set_focused_container(c); 196 return set_focused_container(c);
197 } 197 }
198 198
199 sway_log(L_DEBUG, "Setting focus for %p:%ld to %p:%ld", 199 sway_log(L_DEBUG, "Setting focus for %p:%" PRIuPTR " to %p:%" PRIuPTR,
200 a, a->handle, c, c->handle); 200 a, a->handle, c, c->handle);
201 201
202 c->is_focused = true; 202 c->is_focused = true;
diff --git a/sway/handlers.c b/sway/handlers.c
index f691ceda..0e8e82a2 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -200,7 +200,7 @@ static bool handle_view_created(wlc_handle handle) {
200 } 200 }
201 } 201 }
202 } 202 }
203 sway_log(L_DEBUG, "handle:%ld type:%x state:%x parent:%ld " 203 sway_log(L_DEBUG, "handle:%" PRIuPTR " type:%x state:%x parent:%" PRIuPTR " "
204 "mask:%d (x:%d y:%d w:%d h:%d) title:%s " 204 "mask:%d (x:%d y:%d w:%d h:%d) title:%s "
205 "class:%s appid:%s", 205 "class:%s appid:%s",
206 handle, wlc_view_get_type(handle), wlc_view_get_state(handle), parent, 206 handle, wlc_view_get_type(handle), wlc_view_get_state(handle), parent,
@@ -277,7 +277,7 @@ static bool handle_view_created(wlc_handle handle) {
277} 277}
278 278
279static void handle_view_destroyed(wlc_handle handle) { 279static void handle_view_destroyed(wlc_handle handle) {
280 sway_log(L_DEBUG, "Destroying window %lu", handle); 280 sway_log(L_DEBUG, "Destroying window %" PRIuPTR, handle);
281 swayc_t *view = swayc_by_handle(handle); 281 swayc_t *view = swayc_by_handle(handle);
282 282
283 // destroy views by type 283 // destroy views by type
@@ -339,7 +339,7 @@ static void handle_view_focus(wlc_handle view, bool focus) {
339} 339}
340 340
341static void handle_view_geometry_request(wlc_handle handle, const struct wlc_geometry *geometry) { 341static void handle_view_geometry_request(wlc_handle handle, const struct wlc_geometry *geometry) {
342 sway_log(L_DEBUG, "geometry request for %ld %dx%d @ %d,%d", handle, 342 sway_log(L_DEBUG, "geometry request for %" PRIuPTR " %dx%d @ %d,%d", handle,
343 geometry->size.w, geometry->size.h, geometry->origin.x, geometry->origin.y); 343 geometry->size.w, geometry->size.h, geometry->origin.x, geometry->origin.y);
344 // If the view is floating, then apply the geometry. 344 // If the view is floating, then apply the geometry.
345 // Otherwise save the desired width/height for the view. 345 // Otherwise save the desired width/height for the view.
@@ -366,7 +366,7 @@ static void handle_view_state_request(wlc_handle view, enum wlc_view_state_bit s
366 // i3 just lets it become fullscreen 366 // i3 just lets it become fullscreen
367 wlc_view_set_state(view, state, toggle); 367 wlc_view_set_state(view, state, toggle);
368 if (c) { 368 if (c) {
369 sway_log(L_DEBUG, "setting view %ld %s, fullscreen %d", view, c->name, toggle); 369 sway_log(L_DEBUG, "setting view %" PRIuPTR " %s, fullscreen %d", view, c->name, toggle);
370 arrange_windows(c->parent, -1, -1); 370 arrange_windows(c->parent, -1, -1);
371 // Set it as focused window for that workspace if its going fullscreen 371 // Set it as focused window for that workspace if its going fullscreen
372 if (toggle) { 372 if (toggle) {
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index 9ea034d1..f6116921 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -205,7 +205,7 @@ int ipc_client_handle_readable(int client_fd, uint32_t mask, void *data) {
205 client->payload_length = buf32[0]; 205 client->payload_length = buf32[0];
206 client->current_command = (enum ipc_command_type)buf32[1]; 206 client->current_command = (enum ipc_command_type)buf32[1];
207 207
208 if (read_available - received >= client->payload_length) { 208 if (read_available - received >= (long)client->payload_length) {
209 ipc_client_handle_command(client); 209 ipc_client_handle_command(client);
210 } 210 }
211 211