aboutsummaryrefslogtreecommitdiffstats
path: root/sway/server.c
diff options
context:
space:
mode:
authorLibravatar sghctoma <sghctoma@gmail.com>2018-08-30 10:05:04 +0200
committerLibravatar sghctoma <sghctoma@gmail.com>2018-08-30 10:05:04 +0200
commitac7a0aa038fd40472823c4514a846996c7fd2857 (patch)
tree04f878929f0783a1fd4a4236beccfc8eedfcd92c /sway/server.c
parentAdd FreeBSD-specific PAM configuration (diff)
downloadsway-ac7a0aa038fd40472823c4514a846996c7fd2857.tar.gz
sway-ac7a0aa038fd40472823c4514a846996c7fd2857.tar.zst
sway-ac7a0aa038fd40472823c4514a846996c7fd2857.zip
Add missing destroy calls to server_fini
Rootston calls "wlr_xwayland_destroy" and "wl_display_destroy_clients" on shutdown, but these were not called by Sway. Without them, Sway crashes on exit before the display destroy event handler could be called. This causes two problems: - The TTY is not reset, and it locks up after exiting Sway. - drmDropMaster is not called, and the implicit drop (that should occur when the DRM fd is closed) seems not to be working in some scenarios (e.g. if you have a tmux session running - maybe the fd is retained somehow by tmux?). In other words, it you exit Sway, you can't start it (or any other program that wants to be DRM master) again until you close all your tmux sessions.
Diffstat (limited to 'sway/server.c')
-rw-r--r--sway/server.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/server.c b/sway/server.c
index 7fa6007e..92ed5595 100644
--- a/sway/server.c
+++ b/sway/server.c
@@ -142,6 +142,10 @@ bool server_init(struct sway_server *server) {
142 142
143void server_fini(struct sway_server *server) { 143void server_fini(struct sway_server *server) {
144 // TODO: free sway-specific resources 144 // TODO: free sway-specific resources
145#ifdef HAVE_XWAYLAND
146 wlr_xwayland_destroy(server->xwayland.wlr_xwayland);
147#endif
148 wl_display_destroy_clients(server->wl_display);
145 wl_display_destroy(server->wl_display); 149 wl_display_destroy(server->wl_display);
146 list_free(server->dirty_containers); 150 list_free(server->dirty_containers);
147 list_free(server->transactions); 151 list_free(server->transactions);