Add optional fd parameter to mod_connect() method

The fd parameter can be used to immediately connect to a display
server, if an fd was obtained from sesman
This commit is contained in:
matt335672
2025-06-20 12:10:13 +01:00
parent 09e4a99bac
commit 3425ab6166
9 changed files with 45 additions and 14 deletions
+13 -3
View File
@@ -182,15 +182,25 @@ set_keyboard_overrides(struct mod *mod)
}
static int
lxrdp_connect(struct mod *mod)
lxrdp_connect(struct mod *mod, int fd)
{
boolean ok;
set_keyboard_overrides(mod);
LOG_DEVEL(LOG_LEVEL_TRACE, "lxrdp_connect:");
ok = freerdp_connect(mod->inst);
LOG_DEVEL(LOG_LEVEL_INFO, "lxrdp_connect: freerdp_connect returned %d", ok);
if (fd >= 0)
{
LOG(LOG_LEVEL_ERROR,
"NeutrinoRDP : Can't connect to a file descriptor");
ok = 0;
}
else
{
ok = freerdp_connect(mod->inst);
LOG_DEVEL(LOG_LEVEL_INFO,
"lxrdp_connect: freerdp_connect returned %d", ok);
}
if (!ok)
{