programs/Xserver/hw/xfree86/common/xf86RandR.c
programs/Xserver/hw/xfree86/loader/xf86sym.c Add a new function xf86GetRotation to allow third party modules to obtain the current rotation.
This commit is contained in:
parent
cad18ec979
commit
2828d92c6c
|
@ -47,7 +47,7 @@ typedef struct _xf86RandRInfo {
|
|||
Rotation rotation;
|
||||
} XF86RandRInfoRec, *XF86RandRInfoPtr;
|
||||
|
||||
static int xf86RandRIndex;
|
||||
static int xf86RandRIndex = -1;
|
||||
static int xf86RandRGeneration;
|
||||
|
||||
#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) (p)->devPrivates[xf86RandRIndex].ptr)
|
||||
|
@ -317,6 +317,17 @@ xf86RandRCloseScreen (int index, ScreenPtr pScreen)
|
|||
return (*pScreen->CloseScreen) (index, pScreen);
|
||||
}
|
||||
|
||||
Rotation
|
||||
xf86GetRotation(ScreenPtr pScreen)
|
||||
{
|
||||
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
|
||||
|
||||
if (xf86RandRIndex == -1)
|
||||
return RR_Rotate_0;
|
||||
|
||||
return randrp->rotation;
|
||||
}
|
||||
|
||||
Bool
|
||||
xf86RandRInit (ScreenPtr pScreen)
|
||||
{
|
||||
|
|
|
@ -474,6 +474,7 @@ LOOKUP xfree86LookupTab[] = {
|
|||
SYMFUNC(xf86CommonSpecialKey)
|
||||
SYMFUNC(xf86IsPc98)
|
||||
SYMFUNC(xf86DisableRandR)
|
||||
SYMFUNC(xf86GetRotation)
|
||||
SYMFUNC(xf86GetVersion)
|
||||
SYMFUNC(xf86GetModuleVersion)
|
||||
SYMFUNC(xf86GetClocks)
|
||||
|
|
Loading…
Reference in New Issue
Block a user