2011-08-16 08:22:00 +04:00
|
|
|
/**
|
|
|
|
* FreeRDP: A Remote Desktop Protocol Client
|
|
|
|
* X11 RAIL
|
|
|
|
*
|
|
|
|
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2011-08-18 05:33:22 +04:00
|
|
|
#include <freerdp/utils/event.h>
|
2011-08-20 02:46:10 +04:00
|
|
|
#include <freerdp/utils/hexdump.h>
|
2011-08-22 03:04:21 +04:00
|
|
|
#include <freerdp/utils/rail.h>
|
2011-08-17 10:14:02 +04:00
|
|
|
#include <freerdp/rail/rail.h>
|
|
|
|
|
2011-08-20 02:46:10 +04:00
|
|
|
#include "xf_window.h"
|
2011-08-16 08:22:00 +04:00
|
|
|
#include "xf_rail.h"
|
|
|
|
|
2011-09-23 05:23:01 +04:00
|
|
|
void xf_rail_paint(xfInfo* xfi, rdpRail* rail, uint32 uleft, uint32 utop, uint32 uright, uint32 ubottom)
|
2011-08-17 10:14:02 +04:00
|
|
|
{
|
|
|
|
xfWindow* xfw;
|
|
|
|
rdpWindow* window;
|
2011-08-19 20:43:44 +04:00
|
|
|
boolean intersect;
|
2011-09-23 05:23:01 +04:00
|
|
|
uint32 iwidth, iheight;
|
|
|
|
uint32 ileft, itop, iright, ibottom;
|
2011-08-19 20:43:44 +04:00
|
|
|
uint32 wleft, wtop, wright, wbottom;
|
|
|
|
|
2011-08-17 10:14:02 +04:00
|
|
|
window_list_rewind(rail->list);
|
|
|
|
|
|
|
|
while (window_list_has_next(rail->list))
|
|
|
|
{
|
|
|
|
window = window_list_get_next(rail->list);
|
|
|
|
xfw = (xfWindow*) window->extra;
|
|
|
|
|
2011-09-23 05:23:01 +04:00
|
|
|
wleft = window->windowOffsetX;
|
|
|
|
wtop = window->windowOffsetY;
|
|
|
|
wright = window->windowOffsetX + window->windowWidth - 1;
|
|
|
|
wbottom = window->windowOffsetY + window->windowHeight - 1;
|
2011-08-19 20:43:44 +04:00
|
|
|
|
2011-09-23 05:23:01 +04:00
|
|
|
ileft = MAX(uleft, wleft);
|
|
|
|
itop = MAX(utop, wtop);
|
|
|
|
iright = MIN(uright, wright);
|
|
|
|
ibottom = MIN(ubottom, wbottom);
|
2011-08-17 10:14:02 +04:00
|
|
|
|
2011-09-23 05:23:01 +04:00
|
|
|
iwidth = iright - ileft + 1;
|
|
|
|
iheight = ibottom - itop + 1;
|
|
|
|
|
|
|
|
intersect = ((iright > ileft) && (ibottom > itop)) ? True : False;
|
2011-08-17 10:14:02 +04:00
|
|
|
|
2011-08-19 20:43:44 +04:00
|
|
|
if (intersect)
|
|
|
|
{
|
2011-09-23 05:23:01 +04:00
|
|
|
xf_UpdateWindowArea(xfi, xfw, ileft - wleft, itop - wtop, iwidth, iheight);
|
2011-08-19 20:43:44 +04:00
|
|
|
}
|
2011-08-17 10:14:02 +04:00
|
|
|
}
|
2011-09-23 05:23:01 +04:00
|
|
|
}
|
2011-08-19 20:43:44 +04:00
|
|
|
|
2011-09-23 05:23:01 +04:00
|
|
|
void xf_rail_FilterWindowInfo(rdpRail* rail, rdpWindow* window)
|
|
|
|
{
|
|
|
|
if (window->windowOffsetX < 0)
|
|
|
|
{
|
|
|
|
window->windowWidth += (window->windowOffsetX * 2);
|
|
|
|
window->windowOffsetX = 0;
|
|
|
|
}
|
2011-08-17 10:14:02 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void xf_rail_CreateWindow(rdpRail* rail, rdpWindow* window)
|
|
|
|
{
|
2011-08-18 07:26:12 +04:00
|
|
|
xfInfo* xfi;
|
2011-08-17 10:14:02 +04:00
|
|
|
xfWindow* xfw;
|
2011-08-17 22:13:44 +04:00
|
|
|
|
2011-08-18 07:26:12 +04:00
|
|
|
xfi = (xfInfo*) rail->extra;
|
|
|
|
|
2011-09-23 05:23:01 +04:00
|
|
|
xf_rail_FilterWindowInfo(rail, window);
|
2011-08-25 01:16:57 +04:00
|
|
|
|
2011-09-23 05:23:01 +04:00
|
|
|
xfw = xf_CreateWindow((xfInfo*) rail->extra, window,
|
2011-08-23 05:22:05 +04:00
|
|
|
window->windowOffsetX, window->windowOffsetY,
|
2011-08-22 07:54:02 +04:00
|
|
|
window->windowWidth, window->windowHeight,
|
|
|
|
window->windowId);
|
|
|
|
|
2011-08-25 01:16:57 +04:00
|
|
|
xf_SetWindowStyle(xfi, xfw, window->style, window->extendedStyle);
|
|
|
|
|
2011-08-30 23:06:50 +04:00
|
|
|
XStoreName(xfi->display, xfw->handle, window->title);
|
|
|
|
|
2011-08-17 10:14:02 +04:00
|
|
|
window->extra = (void*) xfw;
|
2011-08-18 00:45:09 +04:00
|
|
|
window->extraId = (void*) xfw->handle;
|
2011-08-17 10:14:02 +04:00
|
|
|
}
|
|
|
|
|
2011-08-18 06:50:49 +04:00
|
|
|
void xf_rail_MoveWindow(rdpRail* rail, rdpWindow* window)
|
|
|
|
{
|
2011-08-18 07:26:12 +04:00
|
|
|
xfInfo* xfi;
|
2011-08-18 06:50:49 +04:00
|
|
|
xfWindow* xfw;
|
2011-08-18 07:26:12 +04:00
|
|
|
|
|
|
|
xfi = (xfInfo*) rail->extra;
|
2011-08-18 06:50:49 +04:00
|
|
|
xfw = (xfWindow*) window->extra;
|
|
|
|
|
2011-09-23 05:23:01 +04:00
|
|
|
xf_rail_FilterWindowInfo(rail, window);
|
|
|
|
|
2011-08-18 06:50:49 +04:00
|
|
|
xf_MoveWindow((xfInfo*) rail->extra, xfw,
|
2011-08-23 05:22:05 +04:00
|
|
|
window->windowOffsetX, window->windowOffsetY,
|
2011-08-18 06:50:49 +04:00
|
|
|
window->windowWidth, window->windowHeight);
|
|
|
|
}
|
|
|
|
|
2011-08-22 07:15:19 +04:00
|
|
|
void xf_rail_ShowWindow(rdpRail* rail, rdpWindow* window, uint8 state)
|
|
|
|
{
|
|
|
|
xfInfo* xfi;
|
|
|
|
xfWindow* xfw;
|
|
|
|
|
|
|
|
xfi = (xfInfo*) rail->extra;
|
|
|
|
xfw = (xfWindow*) window->extra;
|
|
|
|
|
|
|
|
xf_ShowWindow((xfInfo*) rail->extra, xfw, state);
|
|
|
|
}
|
|
|
|
|
2011-08-20 06:21:09 +04:00
|
|
|
void xf_rail_SetWindowText(rdpRail* rail, rdpWindow* window)
|
|
|
|
{
|
|
|
|
xfInfo* xfi;
|
|
|
|
xfWindow* xfw;
|
|
|
|
|
|
|
|
xfi = (xfInfo*) rail->extra;
|
|
|
|
xfw = (xfWindow*) window->extra;
|
|
|
|
|
|
|
|
XStoreName(xfi->display, xfw->handle, window->title);
|
|
|
|
}
|
|
|
|
|
2011-08-22 01:32:18 +04:00
|
|
|
void xf_rail_SetWindowIcon(rdpRail* rail, rdpWindow* window, rdpIcon* icon)
|
|
|
|
{
|
|
|
|
xfInfo* xfi;
|
|
|
|
xfWindow* xfw;
|
|
|
|
|
|
|
|
xfi = (xfInfo*) rail->extra;
|
|
|
|
xfw = (xfWindow*) window->extra;
|
|
|
|
|
2011-09-14 03:03:06 +04:00
|
|
|
icon->extra = freerdp_icon_convert(icon->entry->bitsColor, NULL, icon->entry->bitsMask,
|
2011-08-22 06:30:49 +04:00
|
|
|
icon->entry->width, icon->entry->height, icon->entry->bpp, rail->clrconv);
|
|
|
|
|
2011-08-22 01:32:18 +04:00
|
|
|
xf_SetWindowIcon(xfi, xfw, icon);
|
|
|
|
}
|
|
|
|
|
2011-08-25 22:11:45 +04:00
|
|
|
void xf_rail_SetWindowRects(rdpRail* rail, rdpWindow* window)
|
2011-08-23 00:06:12 +04:00
|
|
|
{
|
|
|
|
xfInfo* xfi;
|
|
|
|
xfWindow* xfw;
|
|
|
|
|
|
|
|
xfi = (xfInfo*) rail->extra;
|
|
|
|
xfw = (xfWindow*) window->extra;
|
|
|
|
|
2011-08-25 22:11:45 +04:00
|
|
|
xf_SetWindowRects(xfi, xfw, window->windowRects, window->numWindowRects);
|
2011-08-23 00:06:12 +04:00
|
|
|
}
|
|
|
|
|
2011-08-30 22:21:16 +04:00
|
|
|
void xf_rail_SetWindowVisibilityRects(rdpRail* rail, rdpWindow* window)
|
|
|
|
{
|
|
|
|
xfInfo* xfi;
|
|
|
|
xfWindow* xfw;
|
|
|
|
|
|
|
|
xfi = (xfInfo*) rail->extra;
|
|
|
|
xfw = (xfWindow*) window->extra;
|
|
|
|
|
|
|
|
xf_SetWindowVisibilityRects(xfi, xfw, window->windowRects, window->numWindowRects);
|
|
|
|
}
|
|
|
|
|
2011-08-18 06:31:27 +04:00
|
|
|
void xf_rail_DestroyWindow(rdpRail* rail, rdpWindow* window)
|
|
|
|
{
|
|
|
|
xfWindow* xfw;
|
|
|
|
xfw = (xfWindow*) window->extra;
|
|
|
|
xf_DestroyWindow((xfInfo*) rail->extra, xfw);
|
|
|
|
}
|
|
|
|
|
2011-08-17 10:14:02 +04:00
|
|
|
void xf_rail_register_callbacks(xfInfo* xfi, rdpRail* rail)
|
|
|
|
{
|
|
|
|
rail->extra = (void*) xfi;
|
2011-08-31 10:01:49 +04:00
|
|
|
rail->rail_CreateWindow = xf_rail_CreateWindow;
|
|
|
|
rail->rail_MoveWindow = xf_rail_MoveWindow;
|
|
|
|
rail->rail_ShowWindow = xf_rail_ShowWindow;
|
|
|
|
rail->rail_SetWindowText = xf_rail_SetWindowText;
|
|
|
|
rail->rail_SetWindowIcon = xf_rail_SetWindowIcon;
|
|
|
|
rail->rail_SetWindowRects = xf_rail_SetWindowRects;
|
|
|
|
rail->rail_SetWindowVisibilityRects = xf_rail_SetWindowVisibilityRects;
|
|
|
|
rail->rail_DestroyWindow = xf_rail_DestroyWindow;
|
2011-08-17 10:14:02 +04:00
|
|
|
}
|
|
|
|
|
2011-08-22 03:04:21 +04:00
|
|
|
static void xf_on_free_rail_client_event(RDP_EVENT* event)
|
|
|
|
{
|
|
|
|
if (event->event_class == RDP_EVENT_CLASS_RAIL)
|
|
|
|
{
|
|
|
|
rail_free_cloned_order(event->event_type, event->user_data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void xf_send_rail_client_event(rdpChanMan* chanman, uint16 event_type, void* param)
|
|
|
|
{
|
|
|
|
RDP_EVENT* out_event = NULL;
|
|
|
|
void * payload = NULL;
|
|
|
|
|
|
|
|
payload = rail_clone_order(event_type, param);
|
|
|
|
if (payload != NULL)
|
|
|
|
{
|
|
|
|
out_event = freerdp_event_new(RDP_EVENT_CLASS_RAIL, event_type,
|
|
|
|
xf_on_free_rail_client_event, payload);
|
|
|
|
freerdp_chanman_send_event(chanman, out_event);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-09-02 02:02:22 +04:00
|
|
|
void xf_rail_send_windowmove(xfInfo* xfi, uint32 windowId, uint32 left, uint32 top, uint32 right, uint32 bottom)
|
|
|
|
{
|
|
|
|
rdpChanMan* chanman;
|
|
|
|
RAIL_WINDOW_MOVE_ORDER window_move;
|
|
|
|
|
|
|
|
chanman = GET_CHANMAN(xfi->instance);
|
|
|
|
|
|
|
|
window_move.windowId = windowId;
|
|
|
|
window_move.left = left;
|
|
|
|
window_move.top = top;
|
|
|
|
window_move.right = right;
|
|
|
|
window_move.bottom = bottom;
|
|
|
|
|
|
|
|
xf_send_rail_client_event(chanman, RDP_EVENT_TYPE_RAIL_CLIENT_WINDOW_MOVE, &window_move);
|
|
|
|
}
|
|
|
|
|
2011-08-25 02:22:06 +04:00
|
|
|
void xf_rail_send_activate(xfInfo* xfi, Window xwindow, boolean enabled)
|
|
|
|
{
|
|
|
|
rdpChanMan* chanman;
|
|
|
|
rdpWindow* rail_window;
|
|
|
|
RAIL_ACTIVATE_ORDER activate;
|
|
|
|
|
|
|
|
chanman = GET_CHANMAN(xfi->instance);
|
|
|
|
rail_window = window_list_get_by_extra_id(xfi->rail->list, (void*)xwindow);
|
|
|
|
|
|
|
|
if (rail_window == NULL) return;
|
|
|
|
|
|
|
|
activate.windowId = rail_window->windowId;
|
|
|
|
activate.enabled = enabled;
|
|
|
|
|
|
|
|
xf_send_rail_client_event(chanman, RDP_EVENT_TYPE_RAIL_CLIENT_ACTIVATE, &activate);
|
|
|
|
}
|
|
|
|
|
2011-08-22 07:39:56 +04:00
|
|
|
void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, uint16 command)
|
|
|
|
{
|
|
|
|
rdpChanMan* chanman;
|
2011-08-22 20:14:11 +04:00
|
|
|
RAIL_SYSCOMMAND_ORDER syscommand;
|
2011-08-22 07:39:56 +04:00
|
|
|
|
|
|
|
chanman = GET_CHANMAN(xfi->instance);
|
|
|
|
|
2011-08-22 20:14:11 +04:00
|
|
|
syscommand.windowId = windowId;
|
|
|
|
syscommand.command = command;
|
2011-08-22 07:39:56 +04:00
|
|
|
|
2011-08-22 20:14:11 +04:00
|
|
|
xf_send_rail_client_event(chanman, RDP_EVENT_TYPE_RAIL_CLIENT_SYSCOMMAND, &syscommand);
|
2011-08-22 07:39:56 +04:00
|
|
|
}
|
|
|
|
|
2011-08-18 05:33:22 +04:00
|
|
|
void xf_process_rail_get_sysparams_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVENT* event)
|
2011-08-16 08:22:00 +04:00
|
|
|
{
|
2011-08-18 05:33:22 +04:00
|
|
|
RAIL_SYSPARAM_ORDER* sysparam;
|
|
|
|
|
|
|
|
sysparam = (RAIL_SYSPARAM_ORDER*) event->user_data;
|
|
|
|
|
|
|
|
sysparam->workArea.left = xfi->workArea.x;
|
|
|
|
sysparam->workArea.top = xfi->workArea.y;
|
|
|
|
sysparam->workArea.right = xfi->workArea.x + xfi->workArea.width;
|
|
|
|
sysparam->workArea.bottom = xfi->workArea.y + xfi->workArea.height;
|
|
|
|
|
|
|
|
sysparam->taskbarPos.left = 0;
|
|
|
|
sysparam->taskbarPos.top = 0;
|
|
|
|
sysparam->taskbarPos.right = 0;
|
|
|
|
sysparam->taskbarPos.bottom = 0;
|
|
|
|
|
2011-08-25 23:05:07 +04:00
|
|
|
sysparam->dragFullWindows = False;
|
|
|
|
|
2011-08-22 03:04:21 +04:00
|
|
|
xf_send_rail_client_event(chanman, RDP_EVENT_TYPE_RAIL_CLIENT_SET_SYSPARAMS, sysparam);
|
2011-08-18 05:33:22 +04:00
|
|
|
}
|
|
|
|
|
2011-08-20 06:21:09 +04:00
|
|
|
const char* error_code_names[] =
|
|
|
|
{
|
|
|
|
"RAIL_EXEC_S_OK",
|
|
|
|
"RAIL_EXEC_E_HOOK_NOT_LOADED",
|
|
|
|
"RAIL_EXEC_E_DECODE_FAILED",
|
|
|
|
"RAIL_EXEC_E_NOT_IN_ALLOWLIST",
|
|
|
|
"RAIL_EXEC_E_FILE_NOT_FOUND",
|
|
|
|
"RAIL_EXEC_E_FAIL",
|
|
|
|
"RAIL_EXEC_E_SESSION_LOCKED"
|
|
|
|
};
|
|
|
|
|
2011-08-19 18:10:08 +04:00
|
|
|
void xf_process_rail_exec_result_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVENT* event)
|
|
|
|
{
|
2011-08-20 06:21:09 +04:00
|
|
|
RAIL_EXEC_RESULT_ORDER* exec_result;
|
|
|
|
|
|
|
|
exec_result = (RAIL_EXEC_RESULT_ORDER*) event->user_data;
|
2011-08-19 18:10:08 +04:00
|
|
|
|
|
|
|
if (exec_result->execResult != RAIL_EXEC_S_OK)
|
|
|
|
{
|
|
|
|
printf("RAIL exec error: execResult=%s NtError=0x%X\n",
|
|
|
|
error_code_names[exec_result->execResult], exec_result->rawResult);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-08-20 02:46:10 +04:00
|
|
|
void xf_process_rail_server_sysparam_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVENT* event)
|
|
|
|
{
|
2011-09-02 21:29:17 +04:00
|
|
|
RAIL_SYSPARAM_ORDER* sysparam = (RAIL_SYSPARAM_ORDER*) event->user_data;
|
2011-08-20 02:46:10 +04:00
|
|
|
|
|
|
|
switch (sysparam->param)
|
|
|
|
{
|
2011-08-22 01:32:18 +04:00
|
|
|
case SPI_SET_SCREEN_SAVE_ACTIVE:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SPI_SET_SCREEN_SAVE_SECURE:
|
|
|
|
break;
|
2011-08-20 02:46:10 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void xf_process_rail_server_minmaxinfo_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVENT* event)
|
|
|
|
{
|
|
|
|
RAIL_MINMAXINFO_ORDER* minmax = (RAIL_MINMAXINFO_ORDER*)event->user_data;
|
2011-09-01 02:02:22 +04:00
|
|
|
rdpWindow* rail_window = NULL;
|
2011-08-20 02:46:10 +04:00
|
|
|
|
2011-09-01 02:02:22 +04:00
|
|
|
rail_window = window_list_get_by_id(xfi->rail->list, minmax->windowId);
|
|
|
|
|
|
|
|
if (rail_window != NULL)
|
|
|
|
{
|
|
|
|
xfWindow * window = NULL;
|
|
|
|
window = (xfWindow *) rail_window->extra;
|
|
|
|
|
2011-09-04 00:38:01 +04:00
|
|
|
DEBUG_X11_LMS("windowId=0x%X maxWidth=%d maxHeight=%d maxPosX=%d maxPosY=%d "
|
2011-09-03 20:50:26 +04:00
|
|
|
"minTrackWidth=%d minTrackHeight=%d maxTrackWidth=%d maxTrackHeight=%d",
|
2011-09-01 02:02:22 +04:00
|
|
|
minmax->windowId, minmax->maxWidth, minmax->maxHeight,
|
|
|
|
(sint16)minmax->maxPosX, (sint16)minmax->maxPosY,
|
|
|
|
minmax->minTrackWidth, minmax->minTrackHeight,
|
|
|
|
minmax->maxTrackWidth, minmax->maxTrackHeight);
|
|
|
|
|
|
|
|
xf_SetWindowMinMaxInfo(xfi, window, minmax->maxWidth, minmax->maxHeight, minmax->maxPosX, minmax->maxPosY,
|
2011-09-03 20:50:26 +04:00
|
|
|
minmax->minTrackWidth, minmax->minTrackHeight, minmax->maxTrackWidth, minmax->maxTrackHeight);
|
2011-09-01 02:02:22 +04:00
|
|
|
}
|
2011-08-20 02:46:10 +04:00
|
|
|
}
|
|
|
|
|
2011-08-22 01:32:18 +04:00
|
|
|
const char* movetype_names[] =
|
2011-08-20 02:46:10 +04:00
|
|
|
{
|
|
|
|
"(invalid)",
|
|
|
|
"RAIL_WMSZ_LEFT",
|
|
|
|
"RAIL_WMSZ_RIGHT",
|
|
|
|
"RAIL_WMSZ_TOP",
|
|
|
|
"RAIL_WMSZ_TOPLEFT",
|
|
|
|
"RAIL_WMSZ_TOPRIGHT",
|
|
|
|
"RAIL_WMSZ_BOTTOM",
|
|
|
|
"RAIL_WMSZ_BOTTOMLEFT",
|
|
|
|
"RAIL_WMSZ_BOTTOMRIGHT",
|
|
|
|
"RAIL_WMSZ_MOVE",
|
|
|
|
"RAIL_WMSZ_KEYMOVE",
|
2011-08-22 01:32:18 +04:00
|
|
|
"RAIL_WMSZ_KEYSIZE"
|
|
|
|
};
|
|
|
|
|
|
|
|
void xf_process_rail_server_localmovesize_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVENT* event)
|
|
|
|
{
|
2011-09-01 02:02:22 +04:00
|
|
|
rdpWindow* rail_window = NULL;
|
2011-09-23 05:23:01 +04:00
|
|
|
RAIL_LOCALMOVESIZE_ORDER* movesize = (RAIL_LOCALMOVESIZE_ORDER*) event->user_data;
|
2011-09-01 02:02:22 +04:00
|
|
|
|
|
|
|
rail_window = window_list_get_by_id(xfi->rail->list, movesize->windowId);
|
|
|
|
|
|
|
|
if (rail_window != NULL)
|
|
|
|
{
|
2011-09-23 05:23:01 +04:00
|
|
|
xfWindow* window = NULL;
|
|
|
|
window = (xfWindow*) rail_window->extra;
|
2011-09-01 02:02:22 +04:00
|
|
|
|
2011-09-04 00:38:01 +04:00
|
|
|
DEBUG_X11_LMS("windowId=0x%X isMoveSizeStart=%d moveSizeType=%s PosX=%d PosY=%d",
|
2011-09-01 02:02:22 +04:00
|
|
|
movesize->windowId, movesize->isMoveSizeStart,
|
2011-09-23 05:23:01 +04:00
|
|
|
movetype_names[movesize->moveSizeType], (sint16) movesize->posX, (sint16) movesize->posY);
|
2011-09-01 02:02:22 +04:00
|
|
|
|
|
|
|
if (movesize->isMoveSizeStart)
|
2011-09-02 20:39:56 +04:00
|
|
|
xf_StartLocalMoveSize(xfi, window, movesize->moveSizeType, (int) movesize->posX, (int) movesize->posY);
|
2011-09-01 02:02:22 +04:00
|
|
|
else
|
2011-09-02 20:39:56 +04:00
|
|
|
xf_StopLocalMoveSize(xfi, window, movesize->moveSizeType, (int) movesize->posX, (int) movesize->posY);
|
2011-09-01 02:02:22 +04:00
|
|
|
}
|
2011-08-20 02:46:10 +04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void xf_process_rail_appid_resp_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVENT* event)
|
|
|
|
{
|
|
|
|
RAIL_GET_APPID_RESP_ORDER* appid_resp =
|
|
|
|
(RAIL_GET_APPID_RESP_ORDER*)event->user_data;
|
|
|
|
|
|
|
|
printf("Server Application ID Response PDU: windowId=0x%X "
|
|
|
|
"applicationId=(length=%d dump)\n",
|
2011-08-22 01:32:18 +04:00
|
|
|
appid_resp->windowId, appid_resp->applicationId.length);
|
|
|
|
|
2011-08-20 02:46:10 +04:00
|
|
|
freerdp_hexdump(appid_resp->applicationId.string, appid_resp->applicationId.length);
|
|
|
|
}
|
|
|
|
|
|
|
|
void xf_process_rail_langbarinfo_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVENT* event)
|
|
|
|
{
|
|
|
|
RAIL_LANGBAR_INFO_ORDER* langbar =
|
2011-08-22 01:32:18 +04:00
|
|
|
(RAIL_LANGBAR_INFO_ORDER*) event->user_data;
|
2011-08-20 02:46:10 +04:00
|
|
|
|
|
|
|
printf("Language Bar Information PDU: languageBarStatus=0x%X\n",
|
2011-08-22 01:32:18 +04:00
|
|
|
langbar->languageBarStatus);
|
2011-08-20 02:46:10 +04:00
|
|
|
}
|
|
|
|
|
2011-08-18 05:33:22 +04:00
|
|
|
void xf_process_rail_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVENT* event)
|
|
|
|
{
|
|
|
|
switch (event->event_type)
|
|
|
|
{
|
|
|
|
case RDP_EVENT_TYPE_RAIL_CHANNEL_GET_SYSPARAMS:
|
|
|
|
xf_process_rail_get_sysparams_event(xfi, chanman, event);
|
|
|
|
break;
|
|
|
|
|
2011-08-19 18:10:08 +04:00
|
|
|
case RDP_EVENT_TYPE_RAIL_CHANNEL_EXEC_RESULTS:
|
|
|
|
xf_process_rail_exec_result_event(xfi, chanman, event);
|
|
|
|
break;
|
|
|
|
|
2011-08-20 02:46:10 +04:00
|
|
|
case RDP_EVENT_TYPE_RAIL_CHANNEL_SERVER_SYSPARAM:
|
|
|
|
xf_process_rail_server_sysparam_event(xfi, chanman, event);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case RDP_EVENT_TYPE_RAIL_CHANNEL_SERVER_MINMAXINFO:
|
|
|
|
xf_process_rail_server_minmaxinfo_event(xfi, chanman, event);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case RDP_EVENT_TYPE_RAIL_CHANNEL_SERVER_LOCALMOVESIZE:
|
|
|
|
xf_process_rail_server_localmovesize_event(xfi, chanman, event);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case RDP_EVENT_TYPE_RAIL_CHANNEL_APPID_RESP:
|
|
|
|
xf_process_rail_appid_resp_event(xfi, chanman, event);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case RDP_EVENT_TYPE_RAIL_CHANNEL_LANGBARINFO:
|
|
|
|
xf_process_rail_langbarinfo_event(xfi, chanman, event);
|
|
|
|
break;
|
|
|
|
|
2011-08-18 05:33:22 +04:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2011-08-16 08:22:00 +04:00
|
|
|
}
|