mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-12-04 15:23:32 +08:00
debug: cleanup printf's all over the place
This commit is contained in:
parent
bc2e0c6d11
commit
6fdecdb01b
@ -23,6 +23,7 @@
|
||||
#define __RAIL_MAIN_H
|
||||
|
||||
#include <freerdp/rail.h>
|
||||
#include <freerdp/utils/debug.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
|
||||
@ -59,8 +60,6 @@ typedef struct rail_plugin railPlugin;
|
||||
void rail_send_channel_event(void* rail_object, uint16 event_type, void* param);
|
||||
void rail_send_channel_data(void* rail_object, void* data, size_t length);
|
||||
|
||||
#define WITH_DEBUG_RAIL 1
|
||||
|
||||
#ifdef WITH_DEBUG_RAIL
|
||||
#define DEBUG_RAIL(fmt, ...) DEBUG_CLASS(RAIL, fmt, ## __VA_ARGS__)
|
||||
#else
|
||||
|
@ -111,7 +111,7 @@ void rail_send_pdu(rdpRailOrder* rail_order, STREAM* s, uint16 orderType)
|
||||
stream_set_pos(s, orderLength);
|
||||
|
||||
/* send */
|
||||
printf("Sending %s PDU, length:%d\n",
|
||||
DEBUG_RAIL("Sending %s PDU, length:%d",
|
||||
RAIL_ORDER_TYPE_STRINGS[((orderType & 0xF0) >> 3) + (orderType & 0x0F)], orderLength);
|
||||
|
||||
rail_send_channel_data(rail_order->plugin, s->data, orderLength);
|
||||
@ -405,7 +405,7 @@ void rail_order_recv(rdpRailOrder* rail_order, STREAM* s)
|
||||
|
||||
rail_read_pdu_header(s, &orderType, &orderLength);
|
||||
|
||||
printf("Received %s PDU, length:%d\n",
|
||||
DEBUG_RAIL("Received %s PDU, length:%d",
|
||||
RAIL_ORDER_TYPE_STRINGS[((orderType & 0xF0) >> 3) + (orderType & 0x0F)], orderLength);
|
||||
|
||||
switch (orderType)
|
||||
|
@ -195,7 +195,7 @@ static int df_process_plugin_args(rdpSettings* settings, const char* name,
|
||||
{
|
||||
rdpChanMan* chanman = (rdpChanMan*) user_data;
|
||||
|
||||
printf("Load plugin %s\n", name);
|
||||
printf("loading plugin %s\n", name);
|
||||
freerdp_chanman_load_plugin(chanman, settings, name, plugin_data);
|
||||
|
||||
return 1;
|
||||
|
@ -423,18 +423,6 @@ boolean xf_event_ConfigureNotify(xfInfo* xfi, XEvent* event, boolean app)
|
||||
{
|
||||
rdpWindow* window;
|
||||
|
||||
printf( "ConfigureNotify event: send_event=%d eventWindow=0x%X window=0x%X above=0x%X x=%d y=%d "
|
||||
"width=%d height=%d override_redirect=%d\n",
|
||||
event->xconfigure.send_event,
|
||||
(uint32)event->xconfigure.event,
|
||||
(uint32)event->xconfigure.window,
|
||||
(uint32)event->xconfigure.above,
|
||||
event->xconfigure.x,
|
||||
event->xconfigure.y,
|
||||
event->xconfigure.width,
|
||||
event->xconfigure.height,
|
||||
event->xconfigure.override_redirect);
|
||||
|
||||
window = window_list_get_by_extra_id(xfi->rail->list, (void*) event->xconfigure.window);
|
||||
|
||||
if (window != NULL)
|
||||
@ -498,9 +486,9 @@ boolean xf_event_process(freerdp* instance, XEvent* event)
|
||||
app = True;
|
||||
}
|
||||
|
||||
#if 1
|
||||
#if WITH_DEBUG_X11
|
||||
if (event->type != MotionNotify)
|
||||
printf("X11 %s Event: wnd=0x%X\n", X11_EVENT_STRINGS[event->type], (uint32)event->xany.window);
|
||||
DEBUG_X11("%s Event: wnd=0x%04X", X11_EVENT_STRINGS[event->type], (uint32) event->xany.window);
|
||||
#endif
|
||||
|
||||
switch (event->type)
|
||||
@ -575,7 +563,7 @@ boolean xf_event_process(freerdp* instance, XEvent* event)
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("xf_event_process unknown event %d\n", event->type);
|
||||
DEBUG_X11("xf_event_process unknown event %d", event->type);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -87,9 +87,6 @@ boolean xf_detect_monitors(xfInfo* xfi, rdpSettings* settings)
|
||||
|
||||
settings->num_monitors = vscreen->nmonitors;
|
||||
|
||||
settings->width = 0;
|
||||
settings->height = 0;
|
||||
|
||||
for (i = 0; i < vscreen->nmonitors; i++)
|
||||
{
|
||||
settings->monitors[i].x = vscreen->monitors[i].area.left;
|
||||
@ -98,9 +95,14 @@ boolean xf_detect_monitors(xfInfo* xfi, rdpSettings* settings)
|
||||
settings->monitors[i].height = vscreen->monitors[i].area.bottom - vscreen->monitors[i].area.top + 1;
|
||||
settings->monitors[i].is_primary = vscreen->monitors[i].primary;
|
||||
|
||||
settings->width += settings->monitors[i].width;
|
||||
settings->height = settings->monitors[i].height;
|
||||
vscreen->area.left = MIN(vscreen->monitors[i].area.left, vscreen->area.left);
|
||||
vscreen->area.right = MAX(vscreen->monitors[i].area.right, vscreen->area.right);
|
||||
vscreen->area.top = MIN(vscreen->monitors[i].area.top, vscreen->area.top);
|
||||
vscreen->area.bottom = MAX(vscreen->monitors[i].area.bottom, vscreen->area.bottom);
|
||||
}
|
||||
|
||||
settings->width = vscreen->area.right - vscreen->area.left + 1;
|
||||
settings->height = vscreen->area.bottom - vscreen->area.top + 1;
|
||||
|
||||
return True;
|
||||
}
|
||||
|
@ -78,9 +78,6 @@ void xf_rail_CreateWindow(rdpRail* rail, rdpWindow* window)
|
||||
|
||||
xfi = (xfInfo*) rail->extra;
|
||||
|
||||
printf("xf_rail_CreateWindow: wid=0x%X own_wid=0x%X\n",
|
||||
window->windowId, window->ownerWindowId);
|
||||
|
||||
xfparent = NULL;
|
||||
|
||||
if (window->ownerWindowId != 0)
|
||||
@ -90,7 +87,7 @@ void xf_rail_CreateWindow(rdpRail* rail, rdpWindow* window)
|
||||
p = window_list_get_by_id(xfi->rail->list, window->ownerWindowId);
|
||||
|
||||
if (p != NULL)
|
||||
xfparent = (xfWindow *) p->extra;
|
||||
xfparent = (xfWindow*) p->extra;
|
||||
}
|
||||
|
||||
xfw = xf_CreateWindow((xfInfo*) rail->extra, xfparent,
|
||||
@ -312,18 +309,14 @@ void xf_process_rail_exec_result_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVE
|
||||
|
||||
void xf_process_rail_server_sysparam_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVENT* event)
|
||||
{
|
||||
RAIL_SYSPARAM_ORDER* sysparam = (RAIL_SYSPARAM_ORDER*)event->user_data;
|
||||
RAIL_SYSPARAM_ORDER* sysparam = (RAIL_SYSPARAM_ORDER*) event->user_data;
|
||||
|
||||
switch (sysparam->param)
|
||||
{
|
||||
case SPI_SET_SCREEN_SAVE_ACTIVE:
|
||||
printf("xf_process_rail_server_sysparam_event: Server System Param PDU: setScreenSaveActive=%d\n",
|
||||
sysparam->setScreenSaveActive);
|
||||
break;
|
||||
|
||||
case SPI_SET_SCREEN_SAVE_SECURE:
|
||||
printf("xf_process_rail_server_sysparam_event: Server System Param PDU: setScreenSaveSecure=%d\n",
|
||||
sysparam->setScreenSaveSecure);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -70,8 +70,6 @@ void xf_SetWindowFullscreen(xfInfo* xfi, xfWindow* window, boolean fullscreen)
|
||||
if (window->decorations)
|
||||
xf_SetWindowDecorations(xfi, window, False);
|
||||
|
||||
printf("width:%d height:%d\n", window->width, window->height);
|
||||
|
||||
XMoveResizeWindow(xfi->display, window->handle, 0, 0, window->width, window->height);
|
||||
XMapRaised(xfi->display, window->handle);
|
||||
//XGrabPointer(xfi->display, window->handle, True, 0, GrabModeAsync, GrabModeAsync, window->handle, 0L, CurrentTime);
|
||||
@ -252,17 +250,31 @@ xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height)
|
||||
return window;
|
||||
}
|
||||
|
||||
void xf_FixWindowCoordinates(int* x, int* y, int* width, int* height)
|
||||
void xf_FixWindowCoordinates(xfInfo* xfi, int* x, int* y, int* width, int* height)
|
||||
{
|
||||
if (*x < 0)
|
||||
int vscreen_width;
|
||||
int vscreen_height;
|
||||
|
||||
vscreen_width = xfi->vscreen.area.right - xfi->vscreen.area.left + 1;
|
||||
vscreen_height = xfi->vscreen.area.bottom - xfi->vscreen.area.top + 1;
|
||||
|
||||
if (*x < xfi->vscreen.area.left)
|
||||
{
|
||||
*width += *x;
|
||||
*x = 0;
|
||||
*x = xfi->vscreen.area.left;
|
||||
}
|
||||
if (*y < 0)
|
||||
if (*y < xfi->vscreen.area.top)
|
||||
{
|
||||
*height += *y;
|
||||
*y = 0;
|
||||
*y = xfi->vscreen.area.top;
|
||||
}
|
||||
if (*width > vscreen_width)
|
||||
{
|
||||
*width = vscreen_width;
|
||||
}
|
||||
if (*height > vscreen_height)
|
||||
{
|
||||
*height = vscreen_height;
|
||||
}
|
||||
}
|
||||
|
||||
@ -277,7 +289,7 @@ xfWindow* xf_CreateWindow(xfInfo* xfi, xfWindow* parent, int x, int y, int width
|
||||
if ((width * height) < 1)
|
||||
return NULL;
|
||||
|
||||
xf_FixWindowCoordinates(&x, &y, &width, &height);
|
||||
xf_FixWindowCoordinates(xfi, &x, &y, &width, &height);
|
||||
|
||||
window->left = x;
|
||||
window->top = y;
|
||||
@ -292,7 +304,6 @@ xfWindow* xf_CreateWindow(xfInfo* xfi, xfWindow* parent, int x, int y, int width
|
||||
int input_mask;
|
||||
XClassHint* class_hints;
|
||||
|
||||
window->ref_count = 0;
|
||||
window->decorations = False;
|
||||
window->fullscreen = False;
|
||||
window->parent = parent;
|
||||
@ -338,21 +349,11 @@ xfWindow* xf_CreateWindow(xfInfo* xfi, xfWindow* parent, int x, int y, int width
|
||||
}
|
||||
|
||||
void xf_SetWindowMinMaxInfo(xfInfo* xfi, xfWindow* window,
|
||||
int maxWidth, int maxHeight,
|
||||
int maxPosX, int maxPosY,
|
||||
int minTrackWidth, int minTrackHeight,
|
||||
int maxTrackWidth, int maxTrackHeight)
|
||||
int maxWidth, int maxHeight, int maxPosX, int maxPosY,
|
||||
int minTrackWidth, int minTrackHeight, int maxTrackWidth, int maxTrackHeight)
|
||||
{
|
||||
XSizeHints* size_hints;
|
||||
|
||||
printf("xf_SetWindowMinMaxInfo: windowHandle=0x%X "
|
||||
"maxWidth=%d maxHeight=%d maxPosX=%d maxPosY=%d "
|
||||
"minTrackWidth=%d minTrackHeight=%d maxTrackWidth=%d maxTrackHeight=%d\n",
|
||||
(uint32)window->handle, maxWidth, maxHeight,
|
||||
(sint16)maxPosX, (sint16)maxPosY,
|
||||
minTrackWidth, minTrackHeight,
|
||||
maxTrackWidth, maxTrackHeight);
|
||||
|
||||
size_hints = XAllocSizeHints();
|
||||
|
||||
if (size_hints)
|
||||
@ -434,14 +435,10 @@ void xf_StartLocalMoveSize(xfInfo* xfi, xfWindow* window, uint16 moveSizeType, i
|
||||
{ RAIL_WMSZ_KEYSIZE, XF_NET_WM_MOVERESIZE_SIZE_KEYBOARD },
|
||||
};
|
||||
|
||||
int i = 0;
|
||||
int x_root = 0;
|
||||
int y_root = 0;
|
||||
int direction = -1;
|
||||
int i = 0;
|
||||
|
||||
|
||||
printf("xf_StartLocalMoveSize: window=0x%X moveSizeType=0x%X PosX=%d PosY=%d\n",
|
||||
(uint32) window->handle, moveSizeType, posX, posY);
|
||||
|
||||
window->isLocalMoveSizeModeEnabled = True;
|
||||
x_root = posX;
|
||||
@ -465,7 +462,7 @@ void xf_StartLocalMoveSize(xfInfo* xfi, xfWindow* window, uint16 moveSizeType, i
|
||||
if (direction == -1)
|
||||
{
|
||||
printf("xf_StartLocalMoveSize: unknown moveSizeType. (window=0x%X moveSizeType=0x%X)\n",
|
||||
(uint32)window->handle, moveSizeType);
|
||||
(uint32) window->handle, moveSizeType);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -475,8 +472,6 @@ void xf_StartLocalMoveSize(xfInfo* xfi, xfWindow* window, uint16 moveSizeType, i
|
||||
void xf_StopLocalMoveSize(xfInfo* xfi, xfWindow* window, uint16 moveSizeType, int topLeftX, int topLeftY)
|
||||
{
|
||||
window->isLocalMoveSizeModeEnabled = False;
|
||||
printf("xf_StopLocalMoveSize: window=0x%X moveSizeType=0x%X PosX=%d PosY=%d\n",
|
||||
(uint32) window->handle, moveSizeType, topLeftX, topLeftY);
|
||||
|
||||
if (moveSizeType == RAIL_WMSZ_MOVE)
|
||||
{
|
||||
@ -494,7 +489,7 @@ void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int h
|
||||
if (window->isLocalMoveSizeModeEnabled)
|
||||
return;
|
||||
|
||||
xf_FixWindowCoordinates(&x, &y, &width, &height);
|
||||
xf_FixWindowCoordinates(xfi, &x, &y, &width, &height);
|
||||
|
||||
XMoveResizeWindow(xfi->display, window->handle, x, y, width, height);
|
||||
|
||||
|
@ -42,8 +42,6 @@ struct xf_window
|
||||
boolean fullscreen;
|
||||
boolean decorations;
|
||||
xfWindow* parent;
|
||||
size_t ref_count;
|
||||
|
||||
boolean isLocalMoveSizeModeEnabled;
|
||||
};
|
||||
|
||||
|
@ -439,7 +439,7 @@ int xf_process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_D
|
||||
{
|
||||
rdpChanMan* chanman = (rdpChanMan*) user_data;
|
||||
|
||||
printf("Load plugin %s\n", name);
|
||||
printf("loading plugin %s\n", name);
|
||||
freerdp_chanman_load_plugin(chanman, settings, name, plugin_data);
|
||||
|
||||
return 1;
|
||||
|
@ -110,4 +110,10 @@ struct xf_info
|
||||
|
||||
void xf_toggle_fullscreen(xfInfo* xfi);
|
||||
|
||||
#ifdef WITH_DEBUG_X11
|
||||
#define DEBUG_X11(fmt, ...) DEBUG_CLASS(X11, fmt, ## __VA_ARGS__)
|
||||
#else
|
||||
#define DEBUG_X11(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#endif /* __XFREERDP_H */
|
||||
|
@ -235,8 +235,6 @@ boolean rdp_recv_deactivate_all(rdpRdp* rdp, STREAM* s)
|
||||
{
|
||||
uint16 lengthSourceDescriptor;
|
||||
|
||||
printf("Deactivate All PDU\n");
|
||||
|
||||
stream_read_uint32(s, rdp->settings->share_id); /* shareId (4 bytes) */
|
||||
stream_read_uint16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */
|
||||
stream_seek(s, lengthSourceDescriptor); /* sourceDescriptor (should be 0x00) */
|
||||
|
@ -235,7 +235,7 @@ void certificate_free_x509_certificate_chain(rdpX509CertChain* x509_cert_chain)
|
||||
|
||||
void certificate_read_server_proprietary_certificate(rdpCertificate* certificate, STREAM* s)
|
||||
{
|
||||
printf("Server Proprietary Certificate\n");
|
||||
DEBUG_CERTIFICATE("Server Proprietary Certificate");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -209,8 +209,6 @@ boolean rdp_client_connect_license(rdpRdp* rdp, STREAM* s)
|
||||
|
||||
if (rdp->license->state == LICENSE_STATE_COMPLETED)
|
||||
{
|
||||
printf("license connection sequence completed.\n");
|
||||
|
||||
rdp->state = CONNECTION_STATE_CAPABILITY;
|
||||
}
|
||||
|
||||
@ -248,8 +246,6 @@ boolean rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s)
|
||||
rdp->update->switch_surface.bitmapId = SCREEN_BITMAP_SURFACE;
|
||||
IFCALL(rdp->update->SwitchSurface, rdp->update, &(rdp->update->switch_surface));
|
||||
|
||||
printf("client is activated\n");
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
|
@ -662,7 +662,7 @@ boolean rdp_recv_save_session_info(rdpRdp* rdp, STREAM* s)
|
||||
|
||||
stream_read_uint32(s, infoType); /* infoType (4 bytes) */
|
||||
|
||||
printf("%s\n", INFO_TYPE_LOGON_STRINGS[infoType]);
|
||||
//printf("%s\n", INFO_TYPE_LOGON_STRINGS[infoType]);
|
||||
|
||||
switch (infoType)
|
||||
{
|
||||
|
@ -307,8 +307,10 @@ void rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s)
|
||||
|
||||
rdp_read_share_data_header(s, &length, &type, &share_id);
|
||||
|
||||
#ifdef WITH_DEBUG_RDP
|
||||
if (type != DATA_PDU_TYPE_UPDATE)
|
||||
printf("recv %s Data PDU (0x%02X), length:%d\n", DATA_PDU_TYPE_STRINGS[type], type, length);
|
||||
#endif
|
||||
|
||||
switch (type)
|
||||
{
|
||||
|
@ -40,6 +40,7 @@ typedef struct rdp_rdp rdpRdp;
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/settings.h>
|
||||
#include <freerdp/utils/debug.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
|
||||
/* Security Header Flags */
|
||||
@ -158,4 +159,10 @@ int rdp_check_fds(rdpRdp* rdp);
|
||||
rdpRdp* rdp_new(freerdp* instance);
|
||||
void rdp_free(rdpRdp* rdp);
|
||||
|
||||
#ifdef WITH_DEBUG_RDP
|
||||
#define DEBUG_RDP(fmt, ...) DEBUG_CLASS(RDP, fmt, ## __VA_ARGS__)
|
||||
#else
|
||||
#define DEBUG_RDP(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#endif /* __RDP_H */
|
||||
|
@ -66,8 +66,6 @@ boolean tls_connect(rdpTls* tls)
|
||||
return False;
|
||||
}
|
||||
|
||||
printf("TLS connection established\n");
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,8 @@ set(FREERDP_RAIL_SRCS
|
||||
window_list.c
|
||||
window.c
|
||||
icon.c
|
||||
rail.c)
|
||||
rail.c
|
||||
librail.h)
|
||||
|
||||
add_library(freerdp-rail ${FREERDP_RAIL_SRCS})
|
||||
|
||||
|
31
libfreerdp-rail/librail.h
Normal file
31
libfreerdp-rail/librail.h
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol Client
|
||||
* Remote Applications Integrated Locally (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.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRAIL_H
|
||||
#define __LIBRAIL_H
|
||||
|
||||
#include <freerdp/utils/debug.h>
|
||||
|
||||
#ifdef WITH_DEBUG_RAIL
|
||||
#define DEBUG_RAIL(fmt, ...) DEBUG_CLASS(RAIL, fmt, ## __VA_ARGS__)
|
||||
#else
|
||||
#define DEBUG_RAIL(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#endif /* __LIBRAIL_H */
|
@ -20,6 +20,8 @@
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/memory.h>
|
||||
|
||||
#include "librail.h"
|
||||
|
||||
#include <freerdp/rail/rail.h>
|
||||
#include <freerdp/rail/window_list.h>
|
||||
|
||||
@ -62,7 +64,7 @@ static void rail_WindowIcon(rdpUpdate* update, WINDOW_ORDER_INFO* orderInfo, WIN
|
||||
icon->entry = window_icon->iconInfo;
|
||||
icon->big = (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_ICON_BIG) ? True : False;
|
||||
|
||||
printf("Window Icon: %dx%d@%dbpp cbBitsColor:%d cbBitsMask:%d cbColorTable:%d\n",
|
||||
DEBUG_RAIL("Window Icon: %dx%d@%dbpp cbBitsColor:%d cbBitsMask:%d cbColorTable:%d",
|
||||
window_icon->iconInfo->width, window_icon->iconInfo->height, window_icon->iconInfo->bpp,
|
||||
window_icon->iconInfo->cbBitsColor, window_icon->iconInfo->cbBitsMask, window_icon->iconInfo->cbColorTable);
|
||||
|
||||
@ -78,43 +80,36 @@ static void rail_WindowCachedIcon(rdpUpdate* update, WINDOW_ORDER_INFO* orderInf
|
||||
{
|
||||
rdpRail* rail;
|
||||
rail = (rdpRail*) update->rail;
|
||||
|
||||
printf("rail_WindowCachedIcon\n");
|
||||
}
|
||||
|
||||
static void rail_NotifyIconCreate(rdpUpdate* update, WINDOW_ORDER_INFO* orderInfo, NOTIFY_ICON_STATE_ORDER* notify_icon_state)
|
||||
{
|
||||
rdpRail* rail;
|
||||
rail = (rdpRail*) update->rail;
|
||||
printf("NotifyIconCreate\n");
|
||||
}
|
||||
|
||||
static void rail_NotifyIconUpdate(rdpUpdate* update, WINDOW_ORDER_INFO* orderInfo, NOTIFY_ICON_STATE_ORDER* notify_icon_state)
|
||||
{
|
||||
rdpRail* rail;
|
||||
rail = (rdpRail*) update->rail;
|
||||
printf("NotifyIconUpdate\n");
|
||||
}
|
||||
|
||||
static void rail_NotifyIconDelete(rdpUpdate* update, WINDOW_ORDER_INFO* orderInfo)
|
||||
{
|
||||
rdpRail* rail;
|
||||
rail = (rdpRail*) update->rail;
|
||||
printf("NotifyIconDelete\n");
|
||||
}
|
||||
|
||||
static void rail_MonitoredDesktop(rdpUpdate* update, WINDOW_ORDER_INFO* orderInfo, MONITORED_DESKTOP_ORDER* monitored_desktop)
|
||||
{
|
||||
rdpRail* rail;
|
||||
rail = (rdpRail*) update->rail;
|
||||
printf("MonitoredDesktop\n");
|
||||
}
|
||||
|
||||
static void rail_NonMonitoredDesktop(rdpUpdate* update, WINDOW_ORDER_INFO* orderInfo)
|
||||
{
|
||||
rdpRail* rail;
|
||||
rail = (rdpRail*) update->rail;
|
||||
printf("NonMonitoredDesktop\n");
|
||||
}
|
||||
|
||||
void rail_register_update_callbacks(rdpRail* rail, rdpUpdate* update)
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <freerdp/utils/unicode.h>
|
||||
|
||||
#include "librail.h"
|
||||
|
||||
#include <freerdp/rail/window.h>
|
||||
|
||||
struct _WINDOW_STYLE
|
||||
@ -138,26 +140,27 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW
|
||||
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_OWNER)
|
||||
{
|
||||
window->ownerWindowId = window_state->ownerWindowId;
|
||||
printf("ownerWindowId:0x%08X\n", window->ownerWindowId);
|
||||
DEBUG_RAIL("ownerWindowId:0x%08X", window->ownerWindowId);
|
||||
}
|
||||
|
||||
printf("window_state_update: windowId=0x%X ownerWindowId=0x%X\n",
|
||||
DEBUG_RAIL("window_state_update: windowId=0x%X ownerWindowId=0x%X\n",
|
||||
window->windowId, window->ownerWindowId);
|
||||
|
||||
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_STYLE)
|
||||
{
|
||||
window->style = window_state->style;
|
||||
window->extendedStyle = window_state->extendedStyle;
|
||||
//printf("Style:%d, ExtendedStyle:%d\n", window->style, window->extendedStyle);
|
||||
|
||||
#ifdef WITH_DEBUG_RAIL
|
||||
print_window_styles(window->style);
|
||||
print_extended_window_styles(window->extendedStyle);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_SHOW)
|
||||
{
|
||||
window->showState = window_state->showState;
|
||||
printf("ShowState:%d\n", window->showState);
|
||||
DEBUG_RAIL("ShowState:%d", window->showState);
|
||||
}
|
||||
|
||||
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_TITLE)
|
||||
@ -165,7 +168,10 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW
|
||||
window->titleInfo.length = window_state->titleInfo.length;
|
||||
window->titleInfo.string = xmalloc(window_state->titleInfo.length);
|
||||
memcpy(window->titleInfo.string, window_state->titleInfo.string, window->titleInfo.length);
|
||||
|
||||
#ifdef WITH_DEBUG_RAIL
|
||||
freerdp_hexdump(window->titleInfo.string, window->titleInfo.length);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_CLIENT_AREA_OFFSET)
|
||||
@ -173,7 +179,7 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW
|
||||
window->clientOffsetX = window_state->clientOffsetX;
|
||||
window->clientOffsetY = window_state->clientOffsetY;
|
||||
|
||||
printf("Client Area Offset: (%d, %d)\n",
|
||||
DEBUG_RAIL("Client Area Offset: (%d, %d)",
|
||||
window->clientOffsetX, window->clientOffsetY);
|
||||
}
|
||||
|
||||
@ -182,7 +188,7 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW
|
||||
window->clientAreaWidth = window_state->clientAreaWidth;
|
||||
window->clientAreaHeight = window_state->clientAreaHeight;
|
||||
|
||||
printf("Client Area Size: (%d, %d)\n",
|
||||
DEBUG_RAIL("Client Area Size: (%d, %d)",
|
||||
window->clientAreaWidth, window->clientAreaHeight);
|
||||
}
|
||||
|
||||
@ -201,7 +207,7 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW
|
||||
window->windowOffsetX = window_state->windowOffsetX;
|
||||
window->windowOffsetY = window_state->windowOffsetY;
|
||||
|
||||
printf("Window Offset: (%d, %d)\n",
|
||||
DEBUG_RAIL("Window Offset: (%d, %d)",
|
||||
window->windowOffsetX, window->windowOffsetY);
|
||||
}
|
||||
|
||||
@ -210,7 +216,7 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW
|
||||
window->windowClientDeltaX = window_state->windowClientDeltaX;
|
||||
window->windowClientDeltaY = window_state->windowClientDeltaY;
|
||||
|
||||
printf("Window Client Delta: (%d, %d)\n",
|
||||
DEBUG_RAIL("Window Client Delta: (%d, %d)",
|
||||
window->windowClientDeltaX, window->windowClientDeltaY);
|
||||
}
|
||||
|
||||
@ -219,7 +225,7 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW
|
||||
window->windowWidth = window_state->windowWidth;
|
||||
window->windowHeight = window_state->windowHeight;
|
||||
|
||||
printf("Window Size: (%d, %d)\n",
|
||||
DEBUG_RAIL("Window Size: (%d, %d)",
|
||||
window->windowWidth, window->windowHeight);
|
||||
}
|
||||
|
||||
@ -235,7 +241,7 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW
|
||||
|
||||
for (i = 0; i < window_state->numWindowRects; i++)
|
||||
{
|
||||
printf("Window Rect #%d: left:%d top:%d right:%d bottom:%d\n", i,
|
||||
DEBUG_RAIL("Window Rect #%d: left:%d top:%d right:%d bottom:%d", i,
|
||||
window_state->windowRects[i].left, window_state->windowRects[i].top,
|
||||
window_state->windowRects[i].right, window_state->windowRects[i].bottom);
|
||||
}
|
||||
@ -246,7 +252,7 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW
|
||||
window->visibleOffsetX = window_state->visibleOffsetX;
|
||||
window->visibleOffsetY = window_state->visibleOffsetY;
|
||||
|
||||
printf("Window Visible Offset: (%d, %d)\n",
|
||||
DEBUG_RAIL("Window Visible Offset: (%d, %d)",
|
||||
window->visibleOffsetX, window->visibleOffsetY);
|
||||
}
|
||||
|
||||
@ -262,7 +268,7 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW
|
||||
|
||||
for (i = 0; i < window_state->numVisibilityRects; i++)
|
||||
{
|
||||
printf("Visibility Rect #%d: left:%d top:%d right:%d bottom:%d\n", i,
|
||||
DEBUG_RAIL("Visibility Rect #%d: left:%d top:%d right:%d bottom:%d", i,
|
||||
window_state->visibilityRects[i].left, window_state->visibilityRects[i].top,
|
||||
window_state->visibilityRects[i].right, window_state->visibilityRects[i].bottom);
|
||||
}
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/memory.h>
|
||||
|
||||
#include "librail.h"
|
||||
|
||||
#include <freerdp/rail/window_list.h>
|
||||
|
||||
void window_list_rewind(rdpWindowList* list)
|
||||
|
@ -99,11 +99,9 @@ void certstore_init(rdpCertstore* certstore)
|
||||
}
|
||||
|
||||
certstore->home = (char*) xstrdup(home_path);
|
||||
printf("home path: %s\n", certstore->home);
|
||||
|
||||
certstore->path = (char*) xmalloc(strlen(certstore->home) + strlen("/.") + strlen(cert_dir) + 1);
|
||||
sprintf(certstore->path, "%s/.%s", certstore->home, cert_dir);
|
||||
printf("certstore path: %s\n", certstore->path);
|
||||
|
||||
if (stat(certstore->path, &stat_info) != 0)
|
||||
{
|
||||
@ -118,7 +116,6 @@ void certstore_init(rdpCertstore* certstore)
|
||||
length = strlen(certstore->path);
|
||||
certstore->file = (char*) xmalloc(strlen(certstore->path) + strlen("/") + strlen(certstore_file) + 1);
|
||||
sprintf(certstore->file, "%s/%s", certstore->path, certstore_file);
|
||||
printf("certstore file: %s\n", certstore->file);
|
||||
|
||||
certstore_open(certstore);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user