aboutsummaryrefslogtreecommitdiff
path: root/backend/x11/backend.c
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-03-22 20:06:53 -0400
committerTony Crisci <tony@dubstepdish.com>2018-03-22 20:06:53 -0400
commit30b8fb5572cd59c096b00a26c7a41cd674e9337b (patch)
tree2a7de55685259200422f2bf23cab909fa788db54 /backend/x11/backend.c
parent8836b167bf0ff152de951f7fdabb1deae85f6e93 (diff)
parent77d3be66eaabca4309794536984c54a5e94e9eb5 (diff)
Merge branch 'master' into xdg-positioner
Diffstat (limited to 'backend/x11/backend.c')
-rw-r--r--backend/x11/backend.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/backend/x11/backend.c b/backend/x11/backend.c
index cb29e518..dd2c0a6e 100644
--- a/backend/x11/backend.c
+++ b/backend/x11/backend.c
@@ -143,6 +143,7 @@ static bool handle_x11_event(struct wlr_x11_backend *x11, xcb_generic_event_t *e
};
wlr_signal_emit_safe(&x11->pointer.events.motion_absolute, &abs);
+ free(pointer);
break;
}
case XCB_CLIENT_MESSAGE: {
@@ -317,12 +318,20 @@ static void wlr_x11_backend_destroy(struct wlr_backend *backend) {
wlr_signal_emit_safe(&backend->events.destroy, backend);
+ if (x11->event_source) {
+ wl_event_source_remove(x11->event_source);
+ }
wl_list_remove(&x11->display_destroy.link);
wl_event_source_remove(x11->frame_timer);
wlr_egl_finish(&x11->egl);
- xcb_disconnect(x11->xcb_conn);
+ if (x11->xcb_conn) {
+ xcb_disconnect(x11->xcb_conn);
+ }
+ if (x11->xlib_conn) {
+ XCloseDisplay(x11->xlib_conn);
+ }
free(x11);
}