aboutsummaryrefslogtreecommitdiff
path: root/xwayland/xwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xwayland/xwm.c')
-rw-r--r--xwayland/xwm.c30
1 files changed, 16 insertions, 14 deletions
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);