#include <unistd.h>
#include <signal.h>
+#include <linux/kd.h>
#include <linux/vt.h>
#include <linux/input.h>
fprintf(stderr, "enter vt\n");
ioctl(ec->tty_fd, VT_RELDISP, VT_ACKACQ);
+ ret = ioctl(ec->tty_fd, KDSETMODE, KD_GRAPHICS);
+ if (ret)
+ fprintf(stderr, "failed to set KD_GRAPHICS mode on console: %m\n");
ec->vt_active = 1;
wl_list_for_each(output, &ec->base.output_list, base.link) {
}
ioctl (ec->tty_fd, VT_RELDISP, 1);
+ ret = ioctl(ec->tty_fd, KDSETMODE, KD_TEXT);
+ if (ret)
+ fprintf(stderr, "failed to set KD_TEXT mode on console: %m\n");
ec->vt_active = 0;
}
{
struct termios raw_attributes;
struct vt_mode mode = { 0 };
+ int ret;
ec->tty_fd = open("/dev/tty0", O_RDWR | O_NOCTTY);
if (ec->tty_fd <= 0) {
wl_event_loop_add_fd(loop, ec->tty_fd,
WL_EVENT_READABLE, on_tty_input, ec);
+ ret = ioctl(ec->tty_fd, KDSETMODE, KD_GRAPHICS);
+ if (ret)
+ fprintf(stderr, "failed to set KD_GRAPHICS mode on tty: %m\n");
+
ec->vt_active = 1;
mode.mode = VT_PROCESS;
mode.relsig = SIGUSR1;