summaryrefslogtreecommitdiffstats
path: root/xorg
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2013-07-13 19:04:54 -0700
committerJay Sorg <jay.sorg@gmail.com>2013-07-13 19:04:54 -0700
commit0ff197f30c096e4fad52fd5722f0c40e012c42c7 (patch)
treec06f79925038a3d5f8788b59ea674d744b1fbd6a /xorg
parent39b749e09d0b3958d015b1ab04de6068c763776b (diff)
downloadxrdp-proprietary-0ff197f30c096e4fad52fd5722f0c40e012c42c7.tar.gz
xrdp-proprietary-0ff197f30c096e4fad52fd5722f0c40e012c42c7.zip
work on xorg driver
Diffstat (limited to 'xorg')
-rw-r--r--xorg/server/readme.txt6
-rw-r--r--xorg/server/xrdpdev/Makefile2
-rw-r--r--xorg/server/xrdpdev/xrdpdev.c47
3 files changed, 38 insertions, 17 deletions
diff --git a/xorg/server/readme.txt b/xorg/server/readme.txt
index 3c607e85..a6041f4d 100644
--- a/xorg/server/readme.txt
+++ b/xorg/server/readme.txt
@@ -7,5 +7,9 @@ to run it
create /etc/X11/xrdp
copy xorg.conf into it
-Xorg -config xrdp/xorg.conf -logfile /tmp/Xjay.log -novtswitch -sharevts -noreset :10
+copy xrdpdev_drv.so to /usr/lib/xorg/modules/drivers
+copy libxorgxrdp.so to /usr/lib/xorg/modules
+
+strat xserver like this
+Xorg -modulepath /usr/lib/xorg/modules -config xrdp/xorg.conf -logfile /tmp/Xjay.log -novtswitch -sharevts -noreset -nohwaccess -ac :10
diff --git a/xorg/server/xrdpdev/Makefile b/xorg/server/xrdpdev/Makefile
index 1c680268..0219959e 100644
--- a/xorg/server/xrdpdev/Makefile
+++ b/xorg/server/xrdpdev/Makefile
@@ -1,7 +1,7 @@
OBJS = xrdpdev.o
-CFLAGS = -O2 -Wall -fPIC -I/usr/include/xorg -I/usr/include/pixman-1 -I../module
+CFLAGS = -g -O2 -Wall -fPIC -I/usr/include/xorg -I/usr/include/pixman-1 -I../module
LDFLAGS =
diff --git a/xorg/server/xrdpdev/xrdpdev.c b/xorg/server/xrdpdev/xrdpdev.c
index 74c36a97..f4b2807a 100644
--- a/xorg/server/xrdpdev/xrdpdev.c
+++ b/xorg/server/xrdpdev/xrdpdev.c
@@ -41,6 +41,7 @@ This is the main driver file
#include "rdpPri.h"
#include "rdpDraw.h"
#include "rdpGC.h"
+#include "rdpCursor.h"
#define XRDP_DRIVER_NAME "XRDPDEV"
#define XRDP_NAME "XRDPDEV"
@@ -144,6 +145,8 @@ rdpPreInit(ScrnInfoPtr pScrn, int flags)
return 0;
}
+ rdpPrivateInit();
+
rdpAllocRec(pScrn);
dev = XRDPPTR(pScrn);
@@ -254,24 +257,22 @@ rdpPreInit(ScrnInfoPtr pScrn, int flags)
return 1;
}
-#if 0
static miPointerSpriteFuncRec g_rdpSpritePointerFuncs =
{
- /* these are in viv_cur.c */
+ /* these are in rdpCursor.c */
rdpSpriteRealizeCursor,
rdpSpriteUnrealizeCursor,
rdpSpriteSetCursor,
rdpSpriteMoveCursor,
- rdpDeviceCursorInitialize,
- rdpDeviceCursorCleanup
+ rdpSpriteDeviceCursorInitialize,
+ rdpSpriteDeviceCursorCleanup
};
-#endif
/******************************************************************************/
static Bool
rdpSaveScreen(ScreenPtr pScreen, int on)
{
- LLOGLN(10, ("rdpSaveScreen:"));
+ LLOGLN(0, ("rdpSaveScreen:"));
return 1;
}
@@ -284,18 +285,18 @@ rdpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
VisualPtr vis;
int vis_found;
- rdpPrivateInit();
-
pScrn = xf86Screens[scrnIndex];
dev = XRDPPTR(pScrn);
+ dev->pScreen = pScreen;
+
miClearVisualTypes();
miSetVisualTypes(pScrn->depth, miGetDefaultVisualMask(pScrn->depth),
pScrn->rgbBits, TrueColor);
miSetPixmapDepths();
LLOGLN(0, ("rdpScreenInit: virtualX %d virtualY %d",
pScrn->virtualX, pScrn->virtualY));
- dev->ptr = malloc(1024 * 768 * 4);
+ dev->ptr = malloc(dev->width * dev->height * 4);
if (!fbScreenInit(pScreen, dev->ptr, pScrn->virtualX, pScrn->virtualY,
pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth,
pScrn->bitsPerPixel))
@@ -331,10 +332,16 @@ rdpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
xf86SetBlackWhitePixels(pScreen);
xf86SetBackingStore(pScreen);
+#if 1
/* hardware cursor */
- //dev->pCursorFuncs = xf86GetPointerScreenFuncs();
- //miPointerInitialize(pScreen, &g_rdpSpritePointerFuncs,
- // dev->pCursorFuncs, 0);
+ dev->pCursorFuncs = xf86GetPointerScreenFuncs();
+ miPointerInitialize(pScreen, &g_rdpSpritePointerFuncs,
+ dev->pCursorFuncs, 0);
+#else
+ /* software cursor */
+ dev->pCursorFuncs = xf86GetPointerScreenFuncs();
+ miDCInitialize(pScreen, dev->pCursorFuncs);
+#endif
fbCreateDefColormap(pScreen);
@@ -358,7 +365,7 @@ rdpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
}
dev->privateKeyRecGC = rdpAllocateGCPrivate(pScreen, sizeof(rdpGCRec));
- dev->privateKeyRecPixmap =rdpAllocatePixmapPrivate(pScreen, sizeof(rdpPixmapRec));
+ dev->privateKeyRecPixmap = rdpAllocatePixmapPrivate(pScreen, sizeof(rdpPixmapRec));
dev->CopyWindow = pScreen->CopyWindow;
pScreen->CopyWindow = rdpCopyWindow;
@@ -488,8 +495,18 @@ rdpAvailableOptions(int chipid, int busid)
static Bool
rdpDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, pointer ptr)
{
- LLOGLN(0, ("rdpDriverFunc:"));
- return 0;
+ xorgHWFlags *flags;
+ int rv;
+
+ rv = 0;
+ LLOGLN(0, ("rdpDriverFunc: op %d", (int)op));
+ if (op == GET_REQUIRED_HW_INTERFACES)
+ {
+ flags = (xorgHWFlags *) ptr;
+ *flags = HW_SKIP_CONSOLE;
+ rv = 1;
+ }
+ return rv;
}
/*****************************************************************************/