Move OS-specific VT key handler code from common to os-support

Adds new function xf86Activate to the OS-specific *VTsw*.c files
and calls it from xf86ProcessActionEvent

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (GNU/Linux)
This commit is contained in:
Alan Coopersmith 2009-12-15 19:07:38 -08:00
commit 39ab474197
7 changed files with 74 additions and 35 deletions

View file

@ -52,3 +52,9 @@ xf86VTSwitchTo(void)
{
return(TRUE);
}
Bool
xf86VTActivate(int vtno)
{
return(TRUE);
}

View file

@ -88,3 +88,14 @@ xf86VTSwitchTo(void)
return(TRUE);
}
}
Bool
xf86VTActivate(int vtno)
{
#ifdef VT_ACTIVATE
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) {
return(FALSE);
}
#endif
return(TRUE);
}