aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Popov <arrowd@FreeBSD.org>2023-09-28 18:13:22 +0000
committerGleb Popov <arrowd@FreeBSD.org>2023-10-05 15:42:16 +0000
commit3f2ce0f6a0e48c004c02b00e79658180f424574c (patch)
tree09c3f5b7847ddb5be75af7d4b430fc3a7747ece2
parent44c8583a4634de650d5d7e4a7c74b059e29e19ca (diff)
downloadports-3f2ce0f6a0e48c004c02b00e79658180f424574c.tar.gz
ports-3f2ce0f6a0e48c004c02b00e79658180f424574c.zip
x11-servers/xorg-server: Implement -novtswitch option handling.
Sponsored by: Serenity Cybersecurity, LLC Differential Revision: https://reviews.freebsd.org/D42014
-rw-r--r--x11-servers/xorg-server/Makefile2
-rw-r--r--x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_bsd__init.c22
2 files changed, 21 insertions, 3 deletions
diff --git a/x11-servers/xorg-server/Makefile b/x11-servers/xorg-server/Makefile
index 089fe72c7c99..7903e64aa44c 100644
--- a/x11-servers/xorg-server/Makefile
+++ b/x11-servers/xorg-server/Makefile
@@ -1,6 +1,6 @@
PORTNAME= xorg
PORTVERSION= 21.1.8
-PORTREVISION= 5
+PORTREVISION= 6
PORTEPOCH= 1
CATEGORIES= x11-servers
MASTER_SITES= XORG/individual/xserver
diff --git a/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_bsd__init.c b/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_bsd__init.c
index 011f3becc26f..09ab0b818b37 100644
--- a/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_bsd__init.c
+++ b/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_bsd__init.c
@@ -1,5 +1,5 @@
---- hw/xfree86/os-support/bsd/bsd_init.c.orig 2022-01-02 23:41:56.000000000 +0100
-+++ hw/xfree86/os-support/bsd/bsd_init.c 2022-06-29 11:57:25.596851000 +0200
+--- hw/xfree86/os-support/bsd/bsd_init.c.orig 2023-03-29 12:55:03 UTC
++++ hw/xfree86/os-support/bsd/bsd_init.c
@@ -48,6 +48,8 @@ static int initialVT = -1;
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
static int VTnum = -1;
@@ -54,6 +54,15 @@
}
else { /* xf86Info.ShareVTs */
close(xf86Info.consoleFd);
+@@ -303,7 +329,7 @@ xf86OpenConsole()
+ else {
+ /* serverGeneration != 1 */
+ #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+- if (!xf86Info.ShareVTs &&
++ if (!xf86Info.ShareVTs && xf86Info.autoVTSwitch &&
+ (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT)) {
+ if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) {
+ xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
@@ -594,6 +620,8 @@ xf86CloseConsole()
case SYSCONS:
case PCVT:
@@ -63,3 +72,12 @@
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1) {
VT.mode = VT_AUTO;
ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); /* dflt vt handling */
+@@ -604,7 +632,7 @@ xf86CloseConsole()
+ strerror(errno));
+ }
+ #endif
+- if (initialVT != -1)
++ if (xf86Info.autoVTSwitch && initialVT != -1)
+ ioctl(xf86Info.consoleFd, VT_ACTIVATE, initialVT);
+ break;
+ #endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */