xfree86: Remove unused xf86EnableVTSwitch

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Adam Jackson 2017-06-16 15:44:43 -04:00
parent f44e0af4da
commit b723da8390
2 changed files with 3 additions and 42 deletions

View File

@ -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);

View File

@ -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)
{