aboutsummaryrefslogtreecommitdiff
path: root/x11/sddm/files/patch-src_common_VirtualTerminal.cpp
diff options
context:
space:
mode:
authorMax Brazhnikov <makc@FreeBSD.org>2025-10-24 11:45:43 +0000
committerMax Brazhnikov <makc@FreeBSD.org>2025-10-24 11:45:57 +0000
commitb7d53d8438e66f84768f28cbccc92a04d5df76b8 (patch)
tree464fac32c0d927cfd17c8f164398e24542970589 /x11/sddm/files/patch-src_common_VirtualTerminal.cpp
parenta2ca81bc802991772559ed81ecfd44efdeda98a9 (diff)
Diffstat (limited to 'x11/sddm/files/patch-src_common_VirtualTerminal.cpp')
-rw-r--r--x11/sddm/files/patch-src_common_VirtualTerminal.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/x11/sddm/files/patch-src_common_VirtualTerminal.cpp b/x11/sddm/files/patch-src_common_VirtualTerminal.cpp
new file mode 100644
index 000000000000..89717f5bd0b9
--- /dev/null
+++ b/x11/sddm/files/patch-src_common_VirtualTerminal.cpp
@@ -0,0 +1,30 @@
+--- src/common/VirtualTerminal.cpp.orig 2025-01-31 09:57:01 UTC
++++ src/common/VirtualTerminal.cpp
+@@ -29,6 +29,7 @@
+ #include <signal.h>
+ #ifdef __FreeBSD__
+ #include <sys/consio.h>
++#include <termios.h>
+ #else
+ #include <linux/vt.h>
+ #include <linux/kd.h>
+@@ -217,6 +218,19 @@ out:
+ // set graphics mode to prevent flickering
+ if (ioctl(fd, KDSETMODE, KD_GRAPHICS) < 0)
+ qWarning("Failed to set graphics mode for VT %d: %s", vt, strerror(errno));
++
++#ifdef __FreeBSD__
++ struct termios tios;
++
++ if (tcgetattr(fd, &tios) != 0) {
++ qFatal("Failed to get term attrs for VT %d: %s", vt, strerror(errno));
++ } else {
++ cfmakeraw(&tios);
++ if (tcsetattr(fd, TCSAFLUSH, &tios) != 0) {
++ qWarning("Failed to set term attrs for VT %d: %s", vt, strerror(errno));
++ }
++ }
++#endif
+
+ // it's possible that the current VT was left in a broken
+ // combination of states (KD_GRAPHICS with VT_AUTO) that we