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.
dev
Kristian Høgsberg 13 years ago
parent 23a47a80e2
commit 353e57f908
  1. 8
      src/tty.c

@ -49,10 +49,10 @@ static int on_enter_vt(int signal_number, void *data)
{ {
struct tty *tty = data; struct tty *tty = data;
tty->vt_func(tty->compositor, TTY_ENTER_VT);
ioctl(tty->fd, VT_RELDISP, VT_ACKACQ); ioctl(tty->fd, VT_RELDISP, VT_ACKACQ);
tty->vt_func(tty->compositor, TTY_ENTER_VT);
return 1; return 1;
} }
@ -61,10 +61,10 @@ on_leave_vt(int signal_number, void *data)
{ {
struct tty *tty = data; struct tty *tty = data;
ioctl(tty->fd, VT_RELDISP, 1);
tty->vt_func(tty->compositor, TTY_LEAVE_VT); tty->vt_func(tty->compositor, TTY_LEAVE_VT);
ioctl(tty->fd, VT_RELDISP, 1);
return 1; return 1;
} }

Loading…
Cancel
Save