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 xf86PrintBacktrace(void);
|
||||
extern _X_EXPORT Bool xf86VTOwner(void);
|
||||
extern _X_EXPORT void xf86VTLeave(void);
|
||||
extern _X_EXPORT void xf86VTEnter(void);
|
||||
|
||||
/* xf86Helper.c */
|
||||
|
||||
|
|
|
@ -407,30 +407,13 @@ xf86ReleaseKeys(DeviceIntPtr pDev)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* xf86VTSwitch --
|
||||
* Handle requests for switching the vt.
|
||||
*/
|
||||
static void
|
||||
xf86VTSwitch(void)
|
||||
void
|
||||
xf86VTLeave(void)
|
||||
{
|
||||
int i;
|
||||
InputInfoPtr pInfo;
|
||||
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",
|
||||
BOOLTOSTRING((dispatchException & DE_TERMINATE) ? TRUE : FALSE));
|
||||
#ifdef DPMSExtension
|
||||
|
@ -528,7 +511,14 @@ xf86VTSwitch(void)
|
|||
xf86DisableIO();
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
void
|
||||
xf86VTEnter(void)
|
||||
{
|
||||
int i;
|
||||
InputInfoPtr pInfo;
|
||||
IHPtr ih;
|
||||
|
||||
DebugF("xf86VTSwitch: Entering\n");
|
||||
if (!xf86VTSwitchTo())
|
||||
return;
|
||||
|
@ -579,6 +569,29 @@ xf86VTSwitch(void)
|
|||
|
||||
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 */
|
||||
|
|
Loading…
Reference in New Issue
Block a user