Xorg: remove uds file on exit

ulab-next-nosound
Jay Sorg 10 years ago
parent 3acc5d9083
commit d3cd9cb7e9

@ -53,6 +53,7 @@ static struct input_proc_list g_input_proc[MAX_INPUT_PROC];
int
rdpRegisterInputCallback(int type, rdpInputEventProcPtr proc)
{
LLOGLN(0, ("rdpRegisterInputCallback: type %d proc %p", type, proc));
if (type == 0)
{
g_input_proc[0].proc = proc;
@ -73,12 +74,22 @@ int
rdpUnregisterInputCallback(rdpInputEventProcPtr proc)
{
int index;
char text[256];
LLOGLN(0, ("rdpUnregisterInputCallback: proc %p", proc));
for (index = 0; index < MAX_INPUT_PROC; index++)
{
if (g_input_proc[index].proc == proc)
{
g_input_proc[index].proc = 0;
if (index == 0)
{
/* hack to cleanup
remove when xrdpdevTearDown is working */
g_sprintf(text, "/tmp/.xrdp/xrdp_display_%s", display);
LLOGLN(0, ("rdpUnregisterInputCallback: deleting file %s", text));
unlink(text);
}
g_input_proc[index].proc = 0;
return 0;
}
}

@ -619,6 +619,17 @@ rdpValidMode(ScrnInfoPtr a, DisplayModePtr b, Bool c, int d)
return 0;
}
/*****************************************************************************/
static void
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 13, 0, 0, 0)
rdpFreeScreen(int a, int b)
#else
rdpFreeScreen(ScrnInfoPtr a)
#endif
{
LLOGLN(0, ("rdpFreeScreen:"));
}
/*****************************************************************************/
static Bool
rdpProbe(DriverPtr drv, int flags)
@ -670,7 +681,7 @@ rdpProbe(DriverPtr drv, int flags)
pscrn->EnterVT = rdpEnterVT;
pscrn->LeaveVT = rdpLeaveVT;
pscrn->ValidMode = rdpValidMode;
pscrn->FreeScreen = rdpFreeScreen;
xf86DrvMsg(pscrn->scrnIndex, X_INFO, "%s", "using default device\n");
}
}

@ -674,6 +674,7 @@ rdpkeybUnInit(InputDriverPtr drv, InputInfoPtr info, int flags)
{
LLOGLN(0, ("rdpkeybUnInit: drv %p info %p, flags 0x%x",
drv, info, flags));
rdpUnregisterInputCallback(rdpInputKeyboard);
}
/******************************************************************************/

@ -309,6 +309,7 @@ rdpmouseUnInit(InputDriverPtr drv, InputInfoPtr info, int flags)
{
LLOGLN(0, ("rdpmouseUnInit: drv %p info %p, flags 0x%x",
drv, info, flags));
rdpUnregisterInputCallback(rdpInputMouse);
}
/******************************************************************************/

Loading…
Cancel
Save