summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2005-10-11 14:45:01 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2005-10-11 14:45:01 +0000
commit2828d92c6ca400b603b6a20a221d9c858732292f (patch)
tree34abaf91f0d25a71a23aa48019a9fbffbc0d953d
parentcad18ec979e38ef80a606f0e4abf2142b9d0d2b1 (diff)
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.
-rw-r--r--hw/xfree86/common/xf86RandR.c13
-rw-r--r--hw/xfree86/loader/xf86sym.c1
2 files changed, 13 insertions, 1 deletions
diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c
index 7d79395a4..da8be9bd3 100644
--- a/hw/xfree86/common/xf86RandR.c
+++ b/hw/xfree86/common/xf86RandR.c
@@ -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)
{
diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index c68077834..b26ec8407 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -474,6 +474,7 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86CommonSpecialKey)
SYMFUNC(xf86IsPc98)
SYMFUNC(xf86DisableRandR)
+ SYMFUNC(xf86GetRotation)
SYMFUNC(xf86GetVersion)
SYMFUNC(xf86GetModuleVersion)
SYMFUNC(xf86GetClocks)