diff options
author | emersion <contact@emersion.fr> | 2017-12-29 21:29:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-29 21:29:56 +0100 |
commit | 80ed4d4d20807f021c473b77d44ce6b464afc0c7 (patch) | |
tree | 9842be5bb2107e638fce5e2a2f5f2318df19f453 /xwayland/xwm.c | |
parent | c23bd2ab7a020fdbfbb3dd1ee0b3f5c8b5807253 (diff) | |
parent | 6ed1884c84f470707ed5e6b56a92d86b51034625 (diff) |
Merge pull request #541 from martinetd/xwm_fixes
Fix xwayland restart... and add wlr_seat destroy listener.
Diffstat (limited to 'xwayland/xwm.c')
-rw-r--r-- | xwayland/xwm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 849acff8..53aac6a4 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -1092,9 +1092,7 @@ void xwm_destroy(struct wlr_xwm *xwm) { if (!xwm) { return; } - if (xwm->selection_window) { - xcb_destroy_window(xwm->xcb_conn, xwm->selection_window); - } + xwm_selection_finish(xwm); if (xwm->cursor) { xcb_free_cursor(xwm->xcb_conn, xwm->cursor); } @@ -1256,6 +1254,10 @@ static void xwm_get_render_format(struct wlr_xwm *xwm) { xcb_render_query_pict_formats(xwm->xcb_conn); xcb_render_query_pict_formats_reply_t *reply = xcb_render_query_pict_formats_reply(xwm->xcb_conn, cookie, NULL); + if (!reply) { + wlr_log(L_ERROR, "Did not get any reply from xcb_render_query_pict_formats"); + return; + } xcb_render_pictforminfo_iterator_t iter = xcb_render_query_pict_formats_formats_iterator(reply); xcb_render_pictforminfo_t *format = NULL; @@ -1270,10 +1272,12 @@ static void xwm_get_render_format(struct wlr_xwm *xwm) { if (format == NULL) { wlr_log(L_DEBUG, "No 32 bit render format"); + free(reply); return; } xwm->render_format_id = format->id; + free(reply); } void xwm_set_cursor(struct wlr_xwm *xwm, const uint8_t *pixels, uint32_t stride, |