summaryrefslogtreecommitdiffstats
path: root/xorg
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2013-07-20 22:07:53 -0700
committerJay Sorg <jay.sorg@gmail.com>2013-07-20 22:07:53 -0700
commit47dddfed0c211e49410673684832953d717f9a93 (patch)
tree3de5eb3f33b68b5ecb388c612c2934410934e9da /xorg
parent5c581ff5a5e43ee9abd4d4b5043a7978f24280dd (diff)
downloadxrdp-proprietary-47dddfed0c211e49410673684832953d717f9a93.tar.gz
xrdp-proprietary-47dddfed0c211e49410673684832953d717f9a93.zip
xorg driver, randr
Diffstat (limited to 'xorg')
-rw-r--r--xorg/server/module/rdpRandR.c58
-rw-r--r--xorg/server/xrdpdev/xrdpdev.c13
-rw-r--r--xorg/server/xrdpkeyb/rdpKeyboard.c16
3 files changed, 71 insertions, 16 deletions
diff --git a/xorg/server/module/rdpRandR.c b/xorg/server/module/rdpRandR.c
index e5ce814b..fd080184 100644
--- a/xorg/server/module/rdpRandR.c
+++ b/xorg/server/module/rdpRandR.c
@@ -69,8 +69,29 @@ Bool
rdpRRSetConfig(ScreenPtr pScreen, Rotation rotateKind, int rate,
RRScreenSizePtr pSize)
{
+ ScrnInfoPtr pScrn;
+ rdpPtr dev;
+ rrScrPrivPtr pRRScrPriv;
+ Bool rv;
+
LLOGLN(0, ("rdpRRSetConfig:"));
- return TRUE;
+ rv = TRUE;
+ pScrn = xf86Screens[pScreen->myNum];
+ dev = XRDPPTR(pScrn);
+#if 0
+ pRRScrPriv = rrGetScrPriv(pScreen);
+ if (pRRScrPriv != 0)
+ {
+ if (dev->rrSetConfig != 0)
+ {
+ LLOGLN(0, ("rdpRRSetConfig: here"));
+ pRRScrPriv->rrSetConfig = dev->rrSetConfig;
+ rv = pRRScrPriv->rrSetConfig(pScreen, rotateKind, rate, pSize);
+ pRRScrPriv->rrSetConfig = rdpRRSetConfig;
+ }
+ }
+#endif
+ return rv;
}
/******************************************************************************/
@@ -81,15 +102,32 @@ rdpRRGetInfo(ScreenPtr pScreen, Rotation *pRotations)
int height;
ScrnInfoPtr pScrn;
rdpPtr dev;
+ rrScrPrivPtr pRRScrPriv;
+ Bool rv;
LLOGLN(0, ("rdpRRGetInfo:"));
+ rv = TRUE;
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
+#if 0
+ pRRScrPriv = rrGetScrPriv(pScreen);
+ if (pRRScrPriv != 0)
+ {
+ if (dev->rrGetInfo != 0)
+ {
+ LLOGLN(0, ("rdpRRGetInfo: here"));
+ pRRScrPriv->rrGetInfo = dev->rrGetInfo;
+ rv = pRRScrPriv->rrGetInfo(pScreen, pRotations);
+ pRRScrPriv->rrGetInfo = rdpRRGetInfo;
+ }
+ }
+#else
*pRotations = RR_Rotate_0;
width = dev->width;
height = dev->height;
rdpRRRegisterSize(pScreen, width, height);
- return TRUE;
+#endif
+ return rv;
}
/******************************************************************************/
@@ -144,8 +182,9 @@ rdpRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
ResizeChildrenWinSize(root, 0, 0, 0, 0);
RRGetInfo(pScreen, 1);
LLOGLN(0, (" screen resized to %dx%d", pScreen->width, pScreen->height));
- xf86EnableDisableFBAccess(pScreen->myNum, 0);
- xf86EnableDisableFBAccess(pScreen->myNum, 1);
+ RRScreenSizeNotify(pScreen);
+ xf86EnableDisableFBAccess(pScreen->myNum, FALSE);
+ xf86EnableDisableFBAccess(pScreen->myNum, TRUE);
return TRUE;
}
@@ -171,20 +210,20 @@ rdpRRCrtcSetGamma(ScreenPtr pScreen, RRCrtcPtr crtc)
Bool
rdpRRCrtcGetGamma(ScreenPtr pScreen, RRCrtcPtr crtc)
{
- LLOGLN(0, ("rdpRRCrtcGetGamma: %p %p %p", crtc->gammaRed,
+ LLOGLN(0, ("rdpRRCrtcGetGamma: %p %p %p %p", crtc, crtc->gammaRed,
crtc->gammaBlue, crtc->gammaGreen));
crtc->gammaSize = 1;
if (crtc->gammaRed == NULL)
{
- crtc->gammaRed = xnfcalloc(2, 16);
+ crtc->gammaRed = g_malloc(32, 1);
}
if (crtc->gammaBlue == NULL)
{
- crtc->gammaBlue = xnfcalloc(2, 16);
+ crtc->gammaBlue = g_malloc(32, 1);
}
if (crtc->gammaGreen == NULL)
{
- crtc->gammaGreen = xnfcalloc(2, 16);
+ crtc->gammaGreen = g_malloc(32, 1);
}
return TRUE;
}
@@ -230,7 +269,7 @@ rdpRRGetPanning(ScreenPtr pScreen, RRCrtcPtr crtc, BoxPtr totalArea,
ScrnInfoPtr pScrn;
rdpPtr dev;
- LLOGLN(0, ("rdpRRGetPanning:"));
+ LLOGLN(0, ("rdpRRGetPanning: %p", crtc));
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
@@ -257,7 +296,6 @@ rdpRRGetPanning(ScreenPtr pScreen, RRCrtcPtr crtc, BoxPtr totalArea,
border[2] = 0;
border[3] = 0;
}
-
return TRUE;
}
diff --git a/xorg/server/xrdpdev/xrdpdev.c b/xorg/server/xrdpdev/xrdpdev.c
index 9e3095c2..a4f39b46 100644
--- a/xorg/server/xrdpdev/xrdpdev.c
+++ b/xorg/server/xrdpdev/xrdpdev.c
@@ -345,6 +345,19 @@ rdpDeferredRandR(OsTimerPtr timer, CARD32 now, pointer arg)
dev->rrGetPanning = pRRScrPriv->rrGetPanning;
dev->rrSetPanning = pRRScrPriv->rrSetPanning;
+ LLOGLN(10, (" rrSetConfig = %p", dev->rrSetConfig));
+ LLOGLN(10, (" rrGetInfo = %p", dev->rrGetInfo));
+ LLOGLN(10, (" rrScreenSetSize = %p", dev->rrScreenSetSize));
+ LLOGLN(10, (" rrCrtcSet = %p", dev->rrCrtcSet));
+ LLOGLN(10, (" rrCrtcSetGamma = %p", dev->rrCrtcSetGamma));
+ LLOGLN(10, (" rrCrtcGetGamma = %p", dev->rrCrtcGetGamma));
+ LLOGLN(10, (" rrOutputSetProperty = %p", dev->rrOutputSetProperty));
+ LLOGLN(10, (" rrOutputValidateMode = %p", dev->rrOutputValidateMode));
+ LLOGLN(10, (" rrModeDestroy = %p", dev->rrModeDestroy));
+ LLOGLN(10, (" rrOutputGetProperty = %p", dev->rrOutputGetProperty));
+ LLOGLN(10, (" rrGetPanning = %p", dev->rrGetPanning));
+ LLOGLN(10, (" rrSetPanning = %p", dev->rrSetPanning));
+
pRRScrPriv->rrSetConfig = rdpRRSetConfig;
pRRScrPriv->rrGetInfo = rdpRRGetInfo;
pRRScrPriv->rrScreenSetSize = rdpRRScreenSetSize;
diff --git a/xorg/server/xrdpkeyb/rdpKeyboard.c b/xorg/server/xrdpkeyb/rdpKeyboard.c
index ac7d284d..4fda5e76 100644
--- a/xorg/server/xrdpkeyb/rdpKeyboard.c
+++ b/xorg/server/xrdpkeyb/rdpKeyboard.c
@@ -43,6 +43,9 @@ xrdp keyboard module
#include "rdp.h"
+/* if 1, a keystroke is done every minute, down, then up */
+#define XRDPKB_TEST 0
+
/******************************************************************************/
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
@@ -207,15 +210,17 @@ rdpEnqueueKey(int type, int scancode)
{
if (type == KeyPress)
{
- xf86PostKeyboardEvent(g_keyboard, scancode, 1);
+ /* need this cause rdp and X11 repeats are different */
+ xf86PostKeyboardEvent(g_keyboard, scancode, FALSE);
+ xf86PostKeyboardEvent(g_keyboard, scancode, TRUE);
}
else
{
- xf86PostKeyboardEvent(g_keyboard, scancode, 0);
+ xf86PostKeyboardEvent(g_keyboard, scancode, FALSE);
}
}
-#if 1
+#if XRDPKB_TEST
/******************************************************************************/
static CARD32
rdpDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg)
@@ -225,9 +230,6 @@ rdpDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg)
rdpEnqueueKey(KeyPress, 115);
rdpEnqueueKey(KeyRelease, 115);
- //xf86PostKeyboardEvent(g_keyboard, 115, 1);
- //xf86PostKeyboardEvent(g_keyboard, 115, 0);
-
g_timer = TimerSet(g_timer, 0, 1000, rdpDeferredUpdateCallback, 0);
return 0;
}
@@ -337,7 +339,9 @@ rdpkeybControl(DeviceIntPtr device, int what)
InitKeyboardDeviceStruct(device, &set, rdpkeybBell,
rdpkeybChangeKeyboardControl);
g_keyboard = device;
+#if XRDPKB_TEST
g_timer = TimerSet(g_timer, 0, 1000, rdpDeferredUpdateCallback, 0);
+#endif
break;
case DEVICE_ON:
pDev->on = 1;