aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/selection/dnd.c4
-rw-r--r--xwayland/selection/outgoing.c6
-rw-r--r--xwayland/xwm.c30
3 files changed, 21 insertions, 19 deletions
diff --git a/xwayland/selection/dnd.c b/xwayland/selection/dnd.c
index ec5f16c7..16941558 100644
--- a/xwayland/selection/dnd.c
+++ b/xwayland/selection/dnd.c
@@ -192,7 +192,7 @@ int xwm_handle_selection_client_message(struct wlr_xwm *xwm,
drag->source->accepted = accepted;
wlr_data_source_dnd_action(drag->source, action);
- wlr_log(WLR_DEBUG, "DND_STATUS window=%d accepted=%d action=%d",
+ wlr_log(WLR_DEBUG, "DND_STATUS window=%" PRIu32 " accepted=%d action=%d",
target_window, accepted, action);
return 1;
} else if (ev->type == xwm->atoms[DND_FINISHED]) {
@@ -226,7 +226,7 @@ int xwm_handle_selection_client_message(struct wlr_xwm *xwm,
wlr_data_source_dnd_finish(source);
}
- wlr_log(WLR_DEBUG, "DND_FINISH window=%d performed=%d action=%d",
+ wlr_log(WLR_DEBUG, "DND_FINISH window=%" PRIu32 " performed=%d action=%d",
target_window, performed, action);
return 1;
} else {
diff --git a/xwayland/selection/outgoing.c b/xwayland/selection/outgoing.c
index 169f516e..002c0143 100644
--- a/xwayland/selection/outgoing.c
+++ b/xwayland/selection/outgoing.c
@@ -23,9 +23,9 @@ static void xwm_selection_send_notify(struct wlr_xwm *xwm,
.property = success ? req->property : XCB_ATOM_NONE,
};
- wlr_log(WLR_DEBUG, "SendEvent destination=%d SelectionNotify(31) time=%d "
- "requestor=%d selection=%d target=%d property=%d", req->requestor,
- req->time, req->requestor, req->selection, req->target,
+ wlr_log(WLR_DEBUG, "SendEvent destination=%" PRIu32 " SelectionNotify(31) time=%" PRIu32
+ " requestor=%" PRIu32 " selection=%" PRIu32 " target=%" PRIu32 " property=%" PRIu32,
+ req->requestor, req->time, req->requestor, req->selection, req->target,
selection_notify.property);
xcb_send_event(xwm->xcb_conn,
0, // propagate
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index e1050308..692c0f8b 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -393,8 +393,9 @@ static void read_surface_class(struct wlr_xwm *xwm,
surface->class = NULL;
}
- wlr_log(WLR_DEBUG, "XCB_ATOM_WM_CLASS: %s %s", surface->instance,
- surface->class);
+ wlr_log(WLR_DEBUG, "XCB_ATOM_WM_CLASS: %s %s",
+ surface->instance ? surface->instance : "(null)",
+ surface->class ? surface->class : "(null)");
wlr_signal_emit_safe(&surface->events.set_class, surface);
}
@@ -416,7 +417,8 @@ static void read_surface_role(struct wlr_xwm *xwm,
xsurface->role = NULL;
}
- wlr_log(WLR_DEBUG, "XCB_ATOM_WM_WINDOW_ROLE: %s", xsurface->role);
+ wlr_log(WLR_DEBUG, "XCB_ATOM_WM_WINDOW_ROLE: %s",
+ xsurface->role ? xsurface->role : "(null)");
wlr_signal_emit_safe(&xsurface->events.set_role, xsurface);
}
@@ -444,7 +446,7 @@ static void read_surface_title(struct wlr_xwm *xwm,
}
xsurface->has_utf8_title = is_utf8;
- wlr_log(WLR_DEBUG, "XCB_ATOM_WM_NAME: %s", xsurface->title);
+ wlr_log(WLR_DEBUG, "XCB_ATOM_WM_NAME: %s", xsurface->title ? xsurface->title : "(null)");
wlr_signal_emit_safe(&xsurface->events.set_title, xsurface);
}
@@ -558,7 +560,7 @@ static void read_surface_hints(struct wlr_xwm *xwm,
xsurface->hints->input = true;
}
- wlr_log(WLR_DEBUG, "WM_HINTS (%d)", reply->value_len);
+ wlr_log(WLR_DEBUG, "WM_HINTS (%" PRIu32 ")", reply->value_len);
wlr_signal_emit_safe(&xsurface->events.set_hints, xsurface);
}
#else
@@ -610,7 +612,7 @@ static void read_surface_normal_hints(struct wlr_xwm *xwm,
xsurface->size_hints->max_height = -1;
}
- wlr_log(WLR_DEBUG, "WM_NORMAL_HINTS (%d)", reply->value_len);
+ wlr_log(WLR_DEBUG, "WM_NORMAL_HINTS (%" PRIu32 ")", reply->value_len);
}
#else
static void read_surface_normal_hints(struct wlr_xwm *xwm,
@@ -654,7 +656,7 @@ static void read_surface_motif_hints(struct wlr_xwm *xwm,
wlr_signal_emit_safe(&xsurface->events.set_decorations, xsurface);
}
- wlr_log(WLR_DEBUG, "MOTIF_WM_HINTS (%d)", reply->value_len);
+ wlr_log(WLR_DEBUG, "MOTIF_WM_HINTS (%" PRIu32 ")", reply->value_len);
}
static void read_surface_net_wm_state(struct wlr_xwm *xwm,
@@ -727,8 +729,8 @@ static void read_surface_property(struct wlr_xwm *xwm,
read_surface_role(xwm, xsurface, reply);
} else {
char *prop_name = xwm_get_atom_name(xwm, property);
- wlr_log(WLR_DEBUG, "unhandled X11 property %u (%s) for window %u",
- property, prop_name, xsurface->window_id);
+ wlr_log(WLR_DEBUG, "unhandled X11 property %" PRIu32 " (%s) for window %" PRIu32,
+ property, prop_name ? prop_name : "(null)", xsurface->window_id);
free(prop_name);
}
@@ -1210,8 +1212,8 @@ static void xwm_handle_wm_protocols_message(struct wlr_xwm *xwm,
surface->pinging = false;
} else {
char *type_name = xwm_get_atom_name(xwm, type);
- wlr_log(WLR_DEBUG, "unhandled WM_PROTOCOLS client message %u (%s)",
- type, type_name);
+ wlr_log(WLR_DEBUG, "unhandled WM_PROTOCOLS client message %" PRIu32 " (%s)",
+ type, type_name ? type_name : "(null)");
free(type_name);
}
}
@@ -1269,8 +1271,8 @@ static void xwm_handle_client_message(struct wlr_xwm *xwm,
xwm_handle_wm_change_state_message(xwm, ev);
} else if (!xwm_handle_selection_client_message(xwm, ev)) {
char *type_name = xwm_get_atom_name(xwm, ev->type);
- wlr_log(WLR_DEBUG, "unhandled x11 client message %u (%s)", ev->type,
- type_name);
+ wlr_log(WLR_DEBUG, "unhandled x11 client message %" PRIu32 " (%s)", ev->type,
+ type_name ? type_name : "(null)");
free(type_name);
}
}
@@ -1596,7 +1598,7 @@ static void xwm_get_resources(struct wlr_xwm *xwm) {
xfixes_reply =
xcb_xfixes_query_version_reply(xwm->xcb_conn, xfixes_cookie, NULL);
- wlr_log(WLR_DEBUG, "xfixes version: %d.%d",
+ wlr_log(WLR_DEBUG, "xfixes version: %" PRIu32 ".%" PRIu32,
xfixes_reply->major_version, xfixes_reply->minor_version);
free(xfixes_reply);