aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-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) {
swayc_t *op = root_container.children->items[i];
const char *op_name = op->name;
if (op_name && name && strcmp(op_name, name) == 0) {
- sway_log(L_DEBUG, "restoring output %lu:%s", handle, op_name);
+ sway_log(L_DEBUG, "restoring output %" PRIuPTR ":%s", handle, op_name);
return op;
}
}
}
- sway_log(L_DEBUG, "New output %lu:%s", handle, name);
+ sway_log(L_DEBUG, "New output %" PRIuPTR ":%s", handle, name);
struct output_config *oc = NULL, *all = NULL;
int i;
@@ -254,7 +254,7 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) {
}
const char *title = wlc_view_get_title(handle);
swayc_t *view = new_swayc(C_VIEW);
- sway_log(L_DEBUG, "Adding new view %lu:%s to container %p %d",
+ sway_log(L_DEBUG, "Adding new view %" PRIuPTR ":%s to container %p %d",
handle, title, sibling, sibling ? sibling->type : 0);
// Setup values
view->handle = handle;
@@ -292,7 +292,7 @@ swayc_t *new_floating_view(wlc_handle handle) {
}
const char *title = wlc_view_get_title(handle);
swayc_t *view = new_swayc(C_VIEW);
- sway_log(L_DEBUG, "Adding new view %lu:%x:%s as a floating view",
+ sway_log(L_DEBUG, "Adding new view %" PRIuPTR ":%x:%s as a floating view",
handle, wlc_view_get_type(handle), title);
// Setup values
view->handle = handle;
@@ -354,7 +354,7 @@ swayc_t *destroy_output(swayc_t *output) {
arrange_windows(root_container.children->items[p], -1, -1);
}
}
- sway_log(L_DEBUG, "OUTPUT: Destroying output '%lu'", output->handle);
+ sway_log(L_DEBUG, "OUTPUT: Destroying output '%" PRIuPTR "'", output->handle);
free_swayc(output);
return &root_container;
}
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) {
fprintf(stderr,"|(%p)",c);
fprintf(stderr,"(p:%-8p)",c->parent);
fprintf(stderr,"(f:%-8p)",c->focused);
- fprintf(stderr,"(h:%2ld)",c->handle);
+ fprintf(stderr,"(h:%2" PRIuPTR ")",c->handle);
fprintf(stderr,"Type:%-4s|",
c->type == C_ROOT ? "root" :
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) {
active_ws_child_count = active_ws->children->length + active_ws->floating->length;
}
- swayc_log(L_DEBUG, c, "Setting focus to %p:%ld", c, c->handle);
+ swayc_log(L_DEBUG, c, "Setting focus to %p:%" PRIuPTR, c, c->handle);
// Get workspace for c, get that workspaces current focused container.
swayc_t *workspace = swayc_active_workspace_for(c);
@@ -196,7 +196,7 @@ bool set_focused_container_for(swayc_t *a, swayc_t *c) {
return set_focused_container(c);
}
- sway_log(L_DEBUG, "Setting focus for %p:%ld to %p:%ld",
+ sway_log(L_DEBUG, "Setting focus for %p:%" PRIuPTR " to %p:%" PRIuPTR,
a, a->handle, c, c->handle);
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) {
}
}
}
- sway_log(L_DEBUG, "handle:%ld type:%x state:%x parent:%ld "
+ sway_log(L_DEBUG, "handle:%" PRIuPTR " type:%x state:%x parent:%" PRIuPTR " "
"mask:%d (x:%d y:%d w:%d h:%d) title:%s "
"class:%s appid:%s",
handle, wlc_view_get_type(handle), wlc_view_get_state(handle), parent,
@@ -277,7 +277,7 @@ static bool handle_view_created(wlc_handle handle) {
}
static void handle_view_destroyed(wlc_handle handle) {
- sway_log(L_DEBUG, "Destroying window %lu", handle);
+ sway_log(L_DEBUG, "Destroying window %" PRIuPTR, handle);
swayc_t *view = swayc_by_handle(handle);
// destroy views by type
@@ -339,7 +339,7 @@ static void handle_view_focus(wlc_handle view, bool focus) {
}
static void handle_view_geometry_request(wlc_handle handle, const struct wlc_geometry *geometry) {
- sway_log(L_DEBUG, "geometry request for %ld %dx%d @ %d,%d", handle,
+ sway_log(L_DEBUG, "geometry request for %" PRIuPTR " %dx%d @ %d,%d", handle,
geometry->size.w, geometry->size.h, geometry->origin.x, geometry->origin.y);
// If the view is floating, then apply the geometry.
// 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
// i3 just lets it become fullscreen
wlc_view_set_state(view, state, toggle);
if (c) {
- sway_log(L_DEBUG, "setting view %ld %s, fullscreen %d", view, c->name, toggle);
+ sway_log(L_DEBUG, "setting view %" PRIuPTR " %s, fullscreen %d", view, c->name, toggle);
arrange_windows(c->parent, -1, -1);
// Set it as focused window for that workspace if its going fullscreen
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) {
client->payload_length = buf32[0];
client->current_command = (enum ipc_command_type)buf32[1];
- if (read_available - received >= client->payload_length) {
+ if (read_available - received >= (long)client->payload_length) {
ipc_client_handle_command(client);
}