|
|
@ -1140,9 +1140,13 @@ int xrdp_bitmap_def_proc(struct xrdp_bitmap* self, int msg,
|
|
|
|
struct xrdp_bitmap* focus_out_control;
|
|
|
|
struct xrdp_bitmap* focus_out_control;
|
|
|
|
|
|
|
|
|
|
|
|
if (self == 0)
|
|
|
|
if (self == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
if (self->wm == 0)
|
|
|
|
if (self->wm == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
if (self->type == WND_TYPE_WND)
|
|
|
|
if (self->type == WND_TYPE_WND)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (msg == WM_KEYDOWN)
|
|
|
|
if (msg == WM_KEYDOWN)
|
|
|
@ -1154,19 +1158,25 @@ int xrdp_bitmap_def_proc(struct xrdp_bitmap* self, int msg,
|
|
|
|
shift = self->wm->keys[42] || self->wm->keys[54];
|
|
|
|
shift = self->wm->keys[42] || self->wm->keys[54];
|
|
|
|
i = -1;
|
|
|
|
i = -1;
|
|
|
|
if (self->child_list != 0)
|
|
|
|
if (self->child_list != 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
i = xrdp_list_index_of(self->child_list, (long)self->focused_control);
|
|
|
|
i = xrdp_list_index_of(self->child_list, (long)self->focused_control);
|
|
|
|
|
|
|
|
}
|
|
|
|
if (shift)
|
|
|
|
if (shift)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
i--;
|
|
|
|
i--;
|
|
|
|
if (i < 0)
|
|
|
|
if (i < 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
i = self->child_list->count - 1;
|
|
|
|
i = self->child_list->count - 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
i++;
|
|
|
|
i++;
|
|
|
|
if (i >= self->child_list->count)
|
|
|
|
if (i >= self->child_list->count)
|
|
|
|
|
|
|
|
{
|
|
|
|
i = 0;
|
|
|
|
i = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
n = self->child_list->count;
|
|
|
|
n = self->child_list->count;
|
|
|
|
b = (struct xrdp_bitmap*)xrdp_list_get_item(self->child_list, i);
|
|
|
|
b = (struct xrdp_bitmap*)xrdp_list_get_item(self->child_list, i);
|
|
|
|
while (b != self->focused_control && b != 0 && n > 0)
|
|
|
|
while (b != self->focused_control && b != 0 && n > 0)
|
|
|
@ -1184,17 +1194,45 @@ int xrdp_bitmap_def_proc(struct xrdp_bitmap* self, int msg,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
i--;
|
|
|
|
i--;
|
|
|
|
if (i < 0)
|
|
|
|
if (i < 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
i = self->child_list->count - 1;
|
|
|
|
i = self->child_list->count - 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
i++;
|
|
|
|
i++;
|
|
|
|
if (i >= self->child_list->count)
|
|
|
|
if (i >= self->child_list->count)
|
|
|
|
|
|
|
|
{
|
|
|
|
i = 0;
|
|
|
|
i = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
b = (struct xrdp_bitmap*)xrdp_list_get_item(self->child_list, i);
|
|
|
|
b = (struct xrdp_bitmap*)xrdp_list_get_item(self->child_list, i);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (scan_code == 28) /* enter */
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (self->default_button != 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (self->notify != 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
/* I think this should use def_proc */
|
|
|
|
|
|
|
|
self->notify(self, self->default_button, 1, 0, 0);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (scan_code == 1) /* esc */
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (self->esc_button != 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (self->notify != 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
/* I think this should use def_proc */
|
|
|
|
|
|
|
|
self->notify(self, self->esc_button, 1, 0, 0);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (self->focused_control != 0)
|
|
|
|
if (self->focused_control != 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|