summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2017-06-16 15:44:43 -0400
committerAdam Jackson <ajax@redhat.com>2017-06-20 16:37:24 -0400
commitb723da8390d2fe1bf048247302416b37972a0cc3 (patch)
treecb7ab9de7c06d7acdfe6dae1f6261589b9decbbf
parentf44e0af4daaad5b18d79f2076bc98d6e79f638af (diff)
xfree86: Remove unused xf86EnableVTSwitch
Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Keith Packard <keithp@keithp.com>
-rw-r--r--hw/xfree86/common/xf86.h3
-rw-r--r--hw/xfree86/common/xf86Events.c42
2 files changed, 3 insertions, 42 deletions
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 877b9e9e7..674e83cb1 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -77,8 +77,6 @@ extern _X_EXPORT int platformSlotClaimed;
extern _X_EXPORT confDRIRec xf86ConfigDRI;
extern _X_EXPORT Bool xf86DRI2Enabled(void);
-extern _X_EXPORT Bool VTSwitchEnabled; /* kbd driver */
-
#define XF86SCRNINFO(p) xf86ScreenToScrn(p)
#define XF86FLIP_PIXELS() \
@@ -219,7 +217,6 @@ extern _X_EXPORT InputHandlerProc xf86SetConsoleHandler(InputHandlerProc
handler, void *data);
extern _X_EXPORT void xf86InterceptSignals(int *signo);
extern _X_EXPORT void xf86InterceptSigIll(void (*sigillhandler) (void));
-extern _X_EXPORT Bool xf86EnableVTSwitch(Bool new);
extern _X_EXPORT void xf86ProcessActionEvent(ActionEvent action, void *arg);
extern _X_EXPORT void xf86PrintBacktrace(void);
extern _X_EXPORT Bool xf86VTOwner(void);
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 7b5d1df65..53ec74f26 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -86,20 +86,6 @@
#include "xf86platformBus.h"
#include "systemd-logind.h"
-/*
- * This is a toggling variable:
- * FALSE = No VT switching keys have been pressed last time around
- * TRUE = Possible VT switch Pending
- * (DWH - 12/2/93)
- *
- * This has been generalised to work with Linux and *BSD+syscons (DHD)
- */
-
-Bool VTSwitchEnabled = TRUE; /* Allows run-time disabling for
- *BSD and for avoiding VT
- switches when using the DRI
- automatic full screen mode.*/
-
#ifdef XF86PM
extern void (*xf86OSPMClose) (void);
#endif
@@ -197,7 +183,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
xf86ZoomViewport(xf86Info.currentScreen, -1);
break;
case ACTION_SWITCHSCREEN:
- if (VTSwitchEnabled && !xf86Info.dontVTSwitch && arg) {
+ if (!xf86Info.dontVTSwitch && arg) {
int vtno = *((int *) arg);
if (vtno != xf86Info.vtno) {
@@ -209,7 +195,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
}
break;
case ACTION_SWITCHSCREEN_NEXT:
- if (VTSwitchEnabled && !xf86Info.dontVTSwitch) {
+ if (!xf86Info.dontVTSwitch) {
if (!xf86VTActivate(xf86Info.vtno + 1)) {
/* If first try failed, assume this is the last VT and
* try wrapping around to the first vt.
@@ -222,7 +208,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
}
break;
case ACTION_SWITCHSCREEN_PREV:
- if (VTSwitchEnabled && !xf86Info.dontVTSwitch && xf86Info.vtno > 0) {
+ if (!xf86Info.dontVTSwitch && xf86Info.vtno > 0) {
if (!xf86VTActivate(xf86Info.vtno - 1)) {
/* Don't know what the maximum VT is, so can't wrap around */
ErrorF("Failed to switch from vt%02d to previous vt: %s\n",
@@ -770,28 +756,6 @@ xf86EnableGeneralHandler(void *handler)
SetNotifyFd(ih->fd, xf86InputHandlerNotify, X_NOTIFY_READ, ih);
}
-/*
- * As used currently by the DRI, the return value is ignored.
- */
-Bool
-xf86EnableVTSwitch(Bool new)
-{
- static Bool def = TRUE;
- Bool old;
-
- old = VTSwitchEnabled;
- if (!new) {
- /* Disable VT switching */
- def = VTSwitchEnabled;
- VTSwitchEnabled = FALSE;
- }
- else {
- /* Restore VT switching to default */
- VTSwitchEnabled = def;
- }
- return old;
-}
-
void
DDXRingBell(int volume, int pitch, int duration)
{