diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-15 15:17:58 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-15 15:25:06 -0500 |
commit | 92734c567382633f81c3f7c30044ef292a4ead03 (patch) | |
tree | 6eb06c85adfc2a1df18a44b4376616126603e424 | |
parent | c5b9ddb610611d236acde27c9d017bd92c5be52e (diff) |
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.
-rw-r--r-- | src/tty.c | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -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); |