summaryrefslogtreecommitdiffstats
path: root/tdekbdledsync/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdekbdledsync/main.cpp')
-rw-r--r--tdekbdledsync/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tdekbdledsync/main.cpp b/tdekbdledsync/main.cpp
index a22864f25..0096038a0 100644
--- a/tdekbdledsync/main.cpp
+++ b/tdekbdledsync/main.cpp
@@ -296,6 +296,9 @@ int main() {
// Get X server VT number
x11_vt_num = get_x_vtnum(display);
+ // Open console socket
+ vt_fd = getfd(NULL);
+
// Monitor for hotplugged keyboards
struct udev *udev;
struct udev_device *dev;
@@ -337,7 +340,6 @@ int main() {
while (1) {
// Get current active VT
- vt_fd = getfd(NULL);
if (ioctl(vt_fd, VT_GETSTATE, &vtstat)) {
fprintf(stderr, "[tdekbdledsync] Unable to get current VT!\n");
return -5;