summaryrefslogtreecommitdiffstats
path: root/xrdp/xrdp_wm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xrdp/xrdp_wm.c')
-rw-r--r--xrdp/xrdp_wm.c41
1 files changed, 31 insertions, 10 deletions
diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c
index 7d15c3d0..7883d33e 100644
--- a/xrdp/xrdp_wm.c
+++ b/xrdp/xrdp_wm.c
@@ -56,6 +56,8 @@ xrdp_wm_create(struct xrdp_process* owner,
/* this will use built in keymap or load from file */
get_keymaps(self->session->client_info->keylayout, &(self->keymap));
xrdp_wm_set_login_mode(self, 0);
+ self->target_surface = self->screen;
+ self->current_surface_index = 0xffff; /* screen */
return self;
}
@@ -1389,21 +1391,25 @@ xrdp_wm_process_channel_data(struct xrdp_wm* self,
tbus param3, tbus param4)
{
int rv;
-
+ int chanid ;
rv = 1;
if (self->mm->mod != 0)
- {
- if (self->mm->usechansrv)
+ {
+ chanid = LOWORD(param1);
+ if(is_channel_allowed(self, chanid))
{
- rv = xrdp_mm_process_channel_data(self->mm, param1, param2,
+ if (self->mm->usechansrv)
+ {
+ rv = xrdp_mm_process_channel_data(self->mm, param1, param2,
param3, param4);
- }
- else
- {
- if (self->mm->mod->mod_event != 0)
+ }
+ else
{
- rv = self->mm->mod->mod_event(self->mm->mod, 0x5555, param1, param2,
+ if (self->mm->mod->mod_event != 0)
+ {
+ rv = self->mm->mod->mod_event(self->mm->mod, 0x5555, param1, param2,
param3, param4);
+ }
}
}
}
@@ -1554,6 +1560,21 @@ xrdp_wm_log_wnd_notify(struct xrdp_bitmap* wnd,
return 0;
}
+ void add_string_to_logwindow(char *msg,struct list* log)
+ {
+
+ char *new_part_message;
+ char *current_pointer = msg ;
+ int processedlen = 0;
+ do{
+ new_part_message = g_strndup(current_pointer,LOG_WINDOW_CHAR_PER_LINE) ;
+ g_writeln(new_part_message);
+ list_add_item(log, (long)new_part_message);
+ processedlen = processedlen + g_strlen(new_part_message);
+ current_pointer = current_pointer + g_strlen(new_part_message) ;
+ }while((processedlen<g_strlen(msg)) && (processedlen<DEFAULT_STRING_LEN));
+ }
+
/*****************************************************************************/
int APP_CC
xrdp_wm_log_msg(struct xrdp_wm* self, char* msg)
@@ -1568,7 +1589,7 @@ xrdp_wm_log_msg(struct xrdp_wm* self, char* msg)
{
return 0;
}
- list_add_item(self->log, (long)g_strdup(msg));
+ add_string_to_logwindow(msg,self->log);
if (self->log_wnd == 0)
{
w = DEFAULT_WND_LOG_W;