summaryrefslogtreecommitdiff
path: root/src/tty.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-01-16 10:57:14 -0500
committerKristian Høgsberg <krh@bitplanet.net>2012-01-16 10:57:14 -0500
commit353e57f908d291d5ce9b7b64263c75a2c47afcda (patch)
treec296ed83c2ad0e81c0809bafab561ec96004e03e /src/tty.c
parent23a47a80e203ee6eed705eaccad23e8a2f183d6a (diff)
tty: Fix order of VT ack/release ioctls and the vt handler
We can only set up once we've acquired the VT and we shouldn't release the VT until we've cleaned up. Before we would release the VT first, and then race to drop drm master as X tried to get drm master. Which would kill X.
Diffstat (limited to 'src/tty.c')
-rw-r--r--src/tty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tty.c b/src/tty.c
index f583eb5..7b68ff1 100644
--- a/src/tty.c
+++ b/src/tty.c
@@ -49,10 +49,10 @@ static int on_enter_vt(int signal_number, void *data)
{
struct tty *tty = data;
- tty->vt_func(tty->compositor, TTY_ENTER_VT);
-
ioctl(tty->fd, VT_RELDISP, VT_ACKACQ);
+ tty->vt_func(tty->compositor, TTY_ENTER_VT);
+
return 1;
}
@@ -61,10 +61,10 @@ on_leave_vt(int signal_number, void *data)
{
struct tty *tty = data;
- ioctl(tty->fd, VT_RELDISP, 1);
-
tty->vt_func(tty->compositor, TTY_LEAVE_VT);
+ ioctl(tty->fd, VT_RELDISP, 1);
+
return 1;
}