xorg: work on Xorg driver

This commit is contained in:
Jay Sorg 2013-07-12 23:26:04 -07:00
parent 6eed5a1475
commit e2b4f8cf7e
4 changed files with 67 additions and 19 deletions

View File

@ -39,8 +39,16 @@ misc draw calls
#include "rdp.h"
#define XRDP_DRIVER_NAME "XRDPDEV"
#define XRDP_NAME "XRDPDEV"
#define XRDP_VERSION 1000
#define PACKAGE_VERSION_MAJOR 1
#define PACKAGE_VERSION_MINOR 0
#define PACKAGE_VERSION_PATCHLEVEL 0
/******************************************************************************/
#define LLOG_LEVEL 1
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
@ -57,7 +65,7 @@ rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
dev = XRDPPTR(pScrn);
pScreen->CreatePixmap = dev->CreatePixmap;
rv = pScreen->CreatePixmap(pScreen, 0, 0, 0, 0);
pScreen->CreatePixmap = XVivCreatePixmap;
pScreen->CreatePixmap = rdpCreatePixmap;
return rv;
}
@ -76,7 +84,7 @@ rdpDestroyPixmap(PixmapPtr pPixmap)
dev = XRDPPTR(pScrn);
pScreen->DestroyPixmap = dev->DestroyPixmap;
rv = pScreen->DestroyPixmap(pPixmap);
pScreen->DestroyPixmap = XVivDestroyPixmap;
pScreen->DestroyPixmap = rdpDestroyPixmap;
return rv;
}
@ -115,3 +123,38 @@ rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion)
dev->pScreen->CopyWindow(pWin, ptOldOrg, pOldRegion);
dev->pScreen->CopyWindow = rdpCopyWindow;
}
/*****************************************************************************/
static pointer
RDPSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
{
static int initialised = 0;
LLOGLN(0, ("RDPSetup:"));
if (!initialised)
{
initialised = 1;
//xf86AddModuleInfo(&THINC, Module);
//LoaderRefSymLists(cursorSymbols, NULL);
}
return (pointer) 1;
}
static MODULESETUPPROTO(RDPSetup);
static XF86ModuleVersionInfo RDPVersRec =
{
XRDP_DRIVER_NAME,
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
XORG_VERSION_CURRENT,
PACKAGE_VERSION_MAJOR,
PACKAGE_VERSION_MINOR,
PACKAGE_VERSION_PATCHLEVEL,
ABI_CLASS_VIDEODRV,
ABI_VIDEODRV_VERSION,
0,
{ 0, 0, 0, 0 }
};
XF86ModuleData xorgxrdpModuleData = { &RDPVersRec, RDPSetup, NULL };

11
xorg/server/readme.txt Normal file
View File

@ -0,0 +1,11 @@
Notes for building xrdpdev_drv.so and libxorgxrdp.so
to run it
create /etc/X11/xrdp
copy xorg.conf into it
Xorg -config xrdp/xorg.conf -logfile /tmp/Xjay.log :10

View File

@ -2,12 +2,12 @@
Section "ServerLayout"
Identifier "X11 Server"
Screen "Screen (xrdpdev)"
InputDevice "ScrollMouse" "CorePointer"
InputDevice "Keyboard" "CoreKeyboard"
InputDevice "xrdpMouse" "CorePointer"
InputDevice "xrdpKeyboard" "CoreKeyboard"
EndSection
Section "ServerFlags"
Option "DontVTSwitch" "off"
Option "DontVTSwitch" "on"
EndSection
Section "Files"
@ -26,23 +26,17 @@ Section "Module"
Load "record"
Load "vbe"
Load "xorgxrdp"
Load "fb"
EndSection
Section "InputDevice"
Identifier "Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
Identifier "xrdpKeyboard"
Driver "xrdpkeyb"
EndSection
Section "InputDevice"
Identifier "ScrollMouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Identifier "xrdpMouse"
Driver "xrdpmouse"
EndSection
Section "Monitor"
@ -58,7 +52,7 @@ EndSection
Section "Device"
Identifier "Video Card (xrdpdev)"
Driver "xrdp"
Driver "xrdpdev"
EndSection
Section "Screen"

View File

@ -534,7 +534,7 @@ Setup(pointer module, pointer opts, int *errmaj, int *errmin)
}
/* <drivername>ModuleData */
_X_EXPORT XF86ModuleData rdpModuleData =
_X_EXPORT XF86ModuleData xrdpdevModuleData =
{
&g_VersRec,
Setup,