From: Kristian Høgsberg Date: Sun, 15 Jan 2012 20:17:58 +0000 (-0500) Subject: tty: Leave tty in KD_GRAPHICS mode during vt switches X-Git-Tag: 0.85.0~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92734c567382633f81c3f7c30044ef292a4ead03;p=platform%2Fupstream%2Fweston.git tty: Leave tty in KD_GRAPHICS mode during vt switches Part of the point of KD_GRAPHICS mode is that the kernel doesn't try to restore the VT contents when we switch bach, but leaves that to the user mode process. This avoids ugly flicker of text mode contents before the compositor takes over. --- diff --git a/src/tty.c b/src/tty.c index bb979d3..f583eb5 100644 --- a/src/tty.c +++ b/src/tty.c @@ -48,14 +48,10 @@ struct tty { static int on_enter_vt(int signal_number, void *data) { struct tty *tty = data; - int ret; tty->vt_func(tty->compositor, TTY_ENTER_VT); ioctl(tty->fd, VT_RELDISP, VT_ACKACQ); - ret = ioctl(tty->fd, KDSETMODE, KD_GRAPHICS); - if (ret) - fprintf(stderr, "failed to set KD_GRAPHICS mode on console: %m\n"); return 1; } @@ -64,13 +60,8 @@ static int on_leave_vt(int signal_number, void *data) { struct tty *tty = data; - int ret; - ioctl (tty->fd, VT_RELDISP, 1); - ret = ioctl(tty->fd, KDSETMODE, KD_TEXT); - if (ret) - fprintf(stderr, - "failed to set KD_TEXT mode on console: %m\n"); + ioctl(tty->fd, VT_RELDISP, 1); tty->vt_func(tty->compositor, TTY_LEAVE_VT);