ecore-drm: added vt switch key event handler
Summary:
Because vt mode of tty is set to VT_PROCESS,
ecore-drm is responsible for managing switch-to or switch-from other vt.
For that, ecore-drm has to handshake with kernel(tty driver).
On switch-from side(A):
1. Listen key event to satisfy vt switch key binding.
2. ioctl(fd, VT_ACTIVE, switch-to-vt) for activating switch-to vt.
3. Receive SIGUSR1(relsig) from kernel.
4. Prepare releasing vt, and ioctl(fd, VT_RELDISP, 1).
On switch-to side(B):
0. Kernel receive VT_RELDISP with value 1(ok) from switch-from vt.
1. Receive SIGUSR2(acqsig) from kernel.
2. ioctl(fd, VT_RELDISP, VT_ACKACQ), and start to setup vt.
This revision added A-1 step on above.
Test Plan:
On booted PC with systemd.
1. launch enlightenment_start with drm and wayland
ex) ECORE_DRM_TTY=/dev/tty1 \
E_WL_FORCE=drm \
ELM_ENGINE=wayland_shm enlightenment_start
2. try to switch vt by pressing "Ctrl + Alt + (F1 ~ F8)"
Reviewers: gwanglim, stefan_schmidt, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1280