From 506238454b6a8c06f4a76141d9672a4c84d66958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 18 Feb 2013 15:02:27 -0500 Subject: [PATCH] compositor-drm: Remember to drop master in drm error handling Otherwise we'll kill whatever other display sever we're switching back to. The tricky thing here is that we never explicitly set drm master in the startup path, we get that implicitly from being the first to open the drm device. Even so, we need to drop it before switching VTs. --- src/compositor-drm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index f1f73439..37e82531 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -2535,6 +2535,8 @@ err_sprite: err_udev_dev: udev_device_unref(drm_device); err_tty: + if (weston_launcher_drm_set_master(&ec->base, ec->drm.fd, 0) < 0) + weston_log("failed to drop master: %m\n"); tty_destroy(ec->tty); err_udev: udev_unref(ec->udev);