diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2013-08-01 23:30:23 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2013-08-01 23:30:23 -0700 |
commit | 4865b1dc6b37be40ff47df62dabafa2728c03e1d (patch) | |
tree | 9adffc0fadb6c5fefed0f5740d21fb81d7815c97 /xorg | |
parent | 6e3b7245aad0a768eecc66d52c4e32a6af8a7280 (diff) | |
download | xrdp-proprietary-4865b1dc6b37be40ff47df62dabafa2728c03e1d.tar.gz xrdp-proprietary-4865b1dc6b37be40ff47df62dabafa2728c03e1d.zip |
xorg driver, work on rdpup
Diffstat (limited to 'xorg')
-rw-r--r-- | xorg/server/module/rdpClientCon.c | 19 | ||||
-rw-r--r-- | xorg/server/module/rdpClientCon.h | 2 | ||||
-rw-r--r-- | xorg/server/module/rdpCursor.c | 8 | ||||
-rw-r--r-- | xorg/server/module/rdpMain.c | 36 | ||||
-rw-r--r-- | xorg/server/xrdpdev/xrdpdev.c | 9 | ||||
-rw-r--r-- | xorg/server/xrdpkeyb/rdpKeyboard.c | 16 | ||||
-rw-r--r-- | xorg/server/xrdpmouse/rdpMouse.c | 16 |
7 files changed, 78 insertions, 28 deletions
diff --git a/xorg/server/module/rdpClientCon.c b/xorg/server/module/rdpClientCon.c index 44ab97ff..3edd1e0c 100644 --- a/xorg/server/module/rdpClientCon.c +++ b/xorg/server/module/rdpClientCon.c @@ -195,7 +195,6 @@ rdpClientConCheck(ScreenPtr pScreen) int rdpClientConInit(rdpPtr dev) { - char text[256]; int i; if (!g_directory_exist("/tmp/.xrdp")) @@ -208,19 +207,18 @@ rdpClientConInit(rdpPtr dev) return 0; } } - g_chmod_hex("/tmp/.xrdp", 0x1777); } - i = atoi(display); - if (i < 1) { + LLOGLN(0, ("rdpClientConInit: can not run at display < 1")); return 0; } g_sprintf(dev->uds_data, "/tmp/.xrdp/xrdp_display_%s", display); if (dev->listen_sck == 0) { + unlink(dev->uds_data); dev->listen_sck = g_tcp_local_socket_stream(); if (g_tcp_local_bind(dev->listen_sck, dev->uds_data) != 0) { @@ -232,3 +230,16 @@ rdpClientConInit(rdpPtr dev) } return 0; } + +/******************************************************************************/ +int +rdpClientConDeinit(rdpPtr dev) +{ + LLOGLN(0, ("rdpClientConDeinit:")); + if (dev->listen_sck != 0) + { + close(dev->listen_sck); + unlink(dev->uds_data); + } + return 0; +} diff --git a/xorg/server/module/rdpClientCon.h b/xorg/server/module/rdpClientCon.h index 717e4359..85a3925a 100644 --- a/xorg/server/module/rdpClientCon.h +++ b/xorg/server/module/rdpClientCon.h @@ -38,5 +38,7 @@ int rdpClientConCheck(ScreenPtr pScreen); int rdpClientConInit(rdpPtr dev); +int +rdpClientConDeinit(rdpPtr dev); #endif diff --git a/xorg/server/module/rdpCursor.c b/xorg/server/module/rdpCursor.c index 82aafd78..1e5ad311 100644 --- a/xorg/server/module/rdpCursor.c +++ b/xorg/server/module/rdpCursor.c @@ -38,6 +38,7 @@ cursor #include <mi.h> #include "rdp.h" +#include "rdpMain.h" /******************************************************************************/ #define LOG_LEVEL 1 @@ -49,7 +50,7 @@ Bool rdpSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScr, CursorPtr pCurs) { LLOGLN(0, ("rdpSpriteRealizeCursor:")); - return 1; + return TRUE; } /******************************************************************************/ @@ -57,7 +58,7 @@ Bool rdpSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScr, CursorPtr pCurs) { LLOGLN(0, ("rdpSpriteUnrealizeCursor:")); - return 1; + return TRUE; } /******************************************************************************/ @@ -80,7 +81,7 @@ Bool rdpSpriteDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScr) { LLOGLN(0, ("rdpSpriteDeviceCursorInitialize:")); - return 1; + return TRUE; } /******************************************************************************/ @@ -88,4 +89,5 @@ void rdpSpriteDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScr) { LLOGLN(0, ("rdpSpriteDeviceCursorCleanup:")); + xorgxrdpDownDown(pScr); } diff --git a/xorg/server/module/rdpMain.c b/xorg/server/module/rdpMain.c index f68bcef3..f19b06cd 100644 --- a/xorg/server/module/rdpMain.c +++ b/xorg/server/module/rdpMain.c @@ -39,6 +39,8 @@ rdp module main #include "rdp.h" #include "rdpInput.h" +#include "rdpDraw.h" +#include "rdpClientCon.h" /******************************************************************************/ #define LOG_LEVEL 1 @@ -53,22 +55,43 @@ rdp module main #define PACKAGE_VERSION_MINOR 0 #define PACKAGE_VERSION_PATCHLEVEL 0 -static int g_initialised = 0; +static Bool g_initialised = FALSE; /*****************************************************************************/ static pointer -xorgxrdpSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor) +xorgxrdpSetup(pointer Module, pointer Options, + int *ErrorMajor, int *ErrorMinor) { LLOGLN(0, ("xorgxrdpSetup:")); if (!g_initialised) { - g_initialised = 1; + g_initialised = TRUE; } rdpInputInit(); rdpPrivateInit(); return (pointer) 1; } +/*****************************************************************************/ +static void +xorgxrdpTearDown(pointer Module) +{ + LLOGLN(0, ("xorgxrdpTearDown:")); +} + +/*****************************************************************************/ +void +xorgxrdpDownDown(ScreenPtr pScreen) +{ + LLOGLN(0, ("xorgxrdpDownDown:")); + if (g_initialised) + { + g_initialised = FALSE; + LLOGLN(0, ("xorgxrdpDownDown: 1")); + rdpClientConDeinit(rdpGetDevFromScreen(pScreen)); + } +} + static MODULESETUPPROTO(xorgxrdpSetup); static XF86ModuleVersionInfo RDPVersRec = { @@ -86,4 +109,9 @@ static XF86ModuleVersionInfo RDPVersRec = { 0, 0, 0, 0 } }; -XF86ModuleData xorgxrdpModuleData = { &RDPVersRec, xorgxrdpSetup, NULL }; +_X_EXPORT XF86ModuleData xorgxrdpModuleData = +{ + &RDPVersRec, + xorgxrdpSetup, + xorgxrdpTearDown +}; diff --git a/xorg/server/xrdpdev/xrdpdev.c b/xorg/server/xrdpdev/xrdpdev.c index 7f47d9fe..2bc6732a 100644 --- a/xorg/server/xrdpdev/xrdpdev.c +++ b/xorg/server/xrdpdev/xrdpdev.c @@ -714,10 +714,17 @@ xrdpdevSetup(pointer module, pointer opts, int *errmaj, int *errmin) } } +/*****************************************************************************/ +static void +xrdpdevTearDown(pointer Module) +{ + LLOGLN(0, ("xrdpdevTearDown:")); +} + /* <drivername>ModuleData */ _X_EXPORT XF86ModuleData xrdpdevModuleData = { &g_VersRec, xrdpdevSetup, - 0 + xrdpdevTearDown }; diff --git a/xorg/server/xrdpkeyb/rdpKeyboard.c b/xorg/server/xrdpkeyb/rdpKeyboard.c index efe1734a..26ba73b4 100644 --- a/xorg/server/xrdpkeyb/rdpKeyboard.c +++ b/xorg/server/xrdpkeyb/rdpKeyboard.c @@ -697,13 +697,6 @@ static InputDriverRec rdpkeyb = }; /******************************************************************************/ -static void -rdpkeybUnplug(pointer p) -{ - LLOGLN(0, ("rdpkeybUnplug:")); -} - -/******************************************************************************/ static pointer rdpkeybPlug(pointer module, pointer options, int *errmaj, int *errmin) { @@ -713,6 +706,13 @@ rdpkeybPlug(pointer module, pointer options, int *errmaj, int *errmin) } /******************************************************************************/ +static void +rdpkeybUnplug(pointer p) +{ + LLOGLN(0, ("rdpkeybUnplug:")); +} + +/******************************************************************************/ static XF86ModuleVersionInfo rdpkeybVersionRec = { XRDP_DRIVER_NAME, @@ -730,7 +730,7 @@ static XF86ModuleVersionInfo rdpkeybVersionRec = }; /******************************************************************************/ -XF86ModuleData xrdpkeybModuleData = +_X_EXPORT XF86ModuleData xrdpkeybModuleData = { &rdpkeybVersionRec, rdpkeybPlug, diff --git a/xorg/server/xrdpmouse/rdpMouse.c b/xorg/server/xrdpmouse/rdpMouse.c index ce7a26e7..6215c408 100644 --- a/xorg/server/xrdpmouse/rdpMouse.c +++ b/xorg/server/xrdpmouse/rdpMouse.c @@ -331,13 +331,6 @@ static InputDriverRec rdpmouse = }; /******************************************************************************/ -static void -rdpmouseUnplug(pointer p) -{ - LLOGLN(0, ("rdpmouseUnplug:")); -} - -/******************************************************************************/ static pointer rdpmousePlug(pointer module, pointer options, int *errmaj, int *errmin) { @@ -347,6 +340,13 @@ rdpmousePlug(pointer module, pointer options, int *errmaj, int *errmin) } /******************************************************************************/ +static void +rdpmouseUnplug(pointer p) +{ + LLOGLN(0, ("rdpmouseUnplug:")); +} + +/******************************************************************************/ static XF86ModuleVersionInfo rdpmouseVersionRec = { XRDP_DRIVER_NAME, @@ -364,7 +364,7 @@ static XF86ModuleVersionInfo rdpmouseVersionRec = }; /******************************************************************************/ -XF86ModuleData xrdpmouseModuleData = +_X_EXPORT XF86ModuleData xrdpmouseModuleData = { &rdpmouseVersionRec, rdpmousePlug, |