Move and rename xrdp_load_keyboard_layout()

xrdp_load_keyboard_layout() is used exclusively by the xup module to
work out the parameters to pass to xorgxrdp for XKB. This function
does not need to be called locally from the SEC module.

This commit moves the function to xrdp/lang.c and renames it as
xrdp_init_xkb_layout(). The module interface is modified so that xup can
call this function. Other modules do not need to call it.
This commit is contained in:
matt335672
2024-06-24 14:55:49 +01:00
parent d83fc8a93f
commit c9a2039858
10 changed files with 290 additions and 246 deletions
+6
View File
@@ -171,6 +171,12 @@ lib_mod_connect(struct mod *mod)
return 1;
}
// This is a good place to finalise any parameters that need to
// be set.
//
// Load the XKB layout
mod->server_init_xkb_layout(mod, &(mod->client_info));
make_stream(s);
g_sprintf(con_port, "%s", mod->port);
+4 -1
View File
@@ -34,6 +34,7 @@
#define CURRENT_MOD_VER 4
struct source_info;
struct xrdp_client_info;
struct mod
{
@@ -111,6 +112,8 @@ struct mod
int total_data_len, int flags);
int (*server_bell_trigger)(struct mod *v);
int (*server_chansrv_in_use)(struct mod *v);
void (*server_init_xkb_layout)(struct mod *v,
struct xrdp_client_info *client_info);
/* off screen bitmaps */
int (*server_create_os_surface)(struct mod *v, int rdpindex,
int width, int height);
@@ -176,7 +179,7 @@ struct mod
int (*server_egfx_cmd)(struct mod *v,
char *cmd, int cmd_bytes,
char *data, int data_bytes);
tintptr server_dumby[100 - 50]; /* align, 100 minus the number of server
tintptr server_dumby[100 - 51]; /* align, 100 minus the number of server
functions above */
/* common */
tintptr handle; /* pointer to self as long */