xorg driver, work on rdpup

ulab-next
Jay Sorg 11 years ago
parent 6e3b7245aa
commit 4865b1dc6b

@ -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;
}

@ -38,5 +38,7 @@ int
rdpClientConCheck(ScreenPtr pScreen);
int
rdpClientConInit(rdpPtr dev);
int
rdpClientConDeinit(rdpPtr dev);
#endif

@ -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);
}

@ -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
};

@ -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
};

@ -696,13 +696,6 @@ static InputDriverRec rdpkeyb =
0 /* ref count */
};
/******************************************************************************/
static void
rdpkeybUnplug(pointer p)
{
LLOGLN(0, ("rdpkeybUnplug:"));
}
/******************************************************************************/
static pointer
rdpkeybPlug(pointer module, pointer options, int *errmaj, int *errmin)
@ -712,6 +705,13 @@ rdpkeybPlug(pointer module, pointer options, int *errmaj, int *errmin)
return module;
}
/******************************************************************************/
static void
rdpkeybUnplug(pointer p)
{
LLOGLN(0, ("rdpkeybUnplug:"));
}
/******************************************************************************/
static XF86ModuleVersionInfo rdpkeybVersionRec =
{
@ -730,7 +730,7 @@ static XF86ModuleVersionInfo rdpkeybVersionRec =
};
/******************************************************************************/
XF86ModuleData xrdpkeybModuleData =
_X_EXPORT XF86ModuleData xrdpkeybModuleData =
{
&rdpkeybVersionRec,
rdpkeybPlug,

@ -330,13 +330,6 @@ static InputDriverRec rdpmouse =
0 /* ref count */
};
/******************************************************************************/
static void
rdpmouseUnplug(pointer p)
{
LLOGLN(0, ("rdpmouseUnplug:"));
}
/******************************************************************************/
static pointer
rdpmousePlug(pointer module, pointer options, int *errmaj, int *errmin)
@ -346,6 +339,13 @@ rdpmousePlug(pointer module, pointer options, int *errmaj, int *errmin)
return module;
}
/******************************************************************************/
static void
rdpmouseUnplug(pointer p)
{
LLOGLN(0, ("rdpmouseUnplug:"));
}
/******************************************************************************/
static XF86ModuleVersionInfo rdpmouseVersionRec =
{
@ -364,7 +364,7 @@ static XF86ModuleVersionInfo rdpmouseVersionRec =
};
/******************************************************************************/
XF86ModuleData xrdpmouseModuleData =
_X_EXPORT XF86ModuleData xrdpmouseModuleData =
{
&rdpmouseVersionRec,
rdpmousePlug,

Loading…
Cancel
Save