xf86Events: split xf86VTSwitch into xf86VTLeave and xf86VTEnter functions
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
33cec8af55
commit
78f0667d6d
|
@ -234,6 +234,8 @@ extern _X_EXPORT Bool xf86EnableVTSwitch(Bool new);
|
||||||
extern _X_EXPORT void xf86ProcessActionEvent(ActionEvent action, void *arg);
|
extern _X_EXPORT void xf86ProcessActionEvent(ActionEvent action, void *arg);
|
||||||
extern _X_EXPORT void xf86PrintBacktrace(void);
|
extern _X_EXPORT void xf86PrintBacktrace(void);
|
||||||
extern _X_EXPORT Bool xf86VTOwner(void);
|
extern _X_EXPORT Bool xf86VTOwner(void);
|
||||||
|
extern _X_EXPORT void xf86VTLeave(void);
|
||||||
|
extern _X_EXPORT void xf86VTEnter(void);
|
||||||
|
|
||||||
/* xf86Helper.c */
|
/* xf86Helper.c */
|
||||||
|
|
||||||
|
|
|
@ -407,30 +407,13 @@ xf86ReleaseKeys(DeviceIntPtr pDev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
void
|
||||||
* xf86VTSwitch --
|
xf86VTLeave(void)
|
||||||
* Handle requests for switching the vt.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
xf86VTSwitch(void)
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
InputInfoPtr pInfo;
|
InputInfoPtr pInfo;
|
||||||
IHPtr ih;
|
IHPtr ih;
|
||||||
|
|
||||||
DebugF("xf86VTSwitch()\n");
|
|
||||||
|
|
||||||
#ifdef XFreeXDGA
|
|
||||||
if (!DGAVTSwitch())
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Since all screens are currently all in the same state it is sufficient
|
|
||||||
* check the first. This might change in future.
|
|
||||||
*/
|
|
||||||
if (xf86VTOwner()) {
|
|
||||||
|
|
||||||
DebugF("xf86VTSwitch: Leaving, xf86Exiting is %s\n",
|
DebugF("xf86VTSwitch: Leaving, xf86Exiting is %s\n",
|
||||||
BOOLTOSTRING((dispatchException & DE_TERMINATE) ? TRUE : FALSE));
|
BOOLTOSTRING((dispatchException & DE_TERMINATE) ? TRUE : FALSE));
|
||||||
#ifdef DPMSExtension
|
#ifdef DPMSExtension
|
||||||
|
@ -527,8 +510,15 @@ xf86VTSwitch(void)
|
||||||
if (xorgHWAccess)
|
if (xorgHWAccess)
|
||||||
xf86DisableIO();
|
xf86DisableIO();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
|
void
|
||||||
|
xf86VTEnter(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
InputInfoPtr pInfo;
|
||||||
|
IHPtr ih;
|
||||||
|
|
||||||
DebugF("xf86VTSwitch: Entering\n");
|
DebugF("xf86VTSwitch: Entering\n");
|
||||||
if (!xf86VTSwitchTo())
|
if (!xf86VTSwitchTo())
|
||||||
return;
|
return;
|
||||||
|
@ -578,7 +568,30 @@ xf86VTSwitch(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
OsReleaseSIGIO();
|
OsReleaseSIGIO();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* xf86VTSwitch --
|
||||||
|
* Handle requests for switching the vt.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
xf86VTSwitch(void)
|
||||||
|
{
|
||||||
|
DebugF("xf86VTSwitch()\n");
|
||||||
|
|
||||||
|
#ifdef XFreeXDGA
|
||||||
|
if (!DGAVTSwitch())
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Since all screens are currently all in the same state it is sufficient
|
||||||
|
* check the first. This might change in future.
|
||||||
|
*/
|
||||||
|
if (xf86VTOwner())
|
||||||
|
xf86VTLeave();
|
||||||
|
else
|
||||||
|
xf86VTEnter();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Input handler registration */
|
/* Input handler registration */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user