mirror of https://github.com/FreeRDP/FreeRDP
Merge branch 'master' of github.com:awakecoding/FreeRDP into egfx
This commit is contained in:
commit
033e75467b
|
@ -476,7 +476,7 @@ int dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, UI
|
|||
Stream_Release(channel->dvc_data);
|
||||
|
||||
channel->dvc_data = StreamPool_Take(channel->dvcman->pool, length);
|
||||
Stream_AddRef(channel->dvc_data);
|
||||
channel->dvc_data_length = length;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -508,7 +508,7 @@ int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, UINT32 C
|
|||
|
||||
Stream_Write(channel->dvc_data, Stream_Pointer(data), dataSize);
|
||||
|
||||
if (((size_t) Stream_GetPosition(channel->dvc_data)) >= Stream_Capacity(channel->dvc_data))
|
||||
if (((size_t) Stream_GetPosition(channel->dvc_data)) >= channel->dvc_data_length)
|
||||
{
|
||||
Stream_SealLength(channel->dvc_data);
|
||||
Stream_SetPosition(channel->dvc_data, 0);
|
||||
|
|
|
@ -82,6 +82,7 @@ struct _DVCMAN_CHANNEL
|
|||
IWTSVirtualChannelCallback* channel_callback;
|
||||
|
||||
wStream* dvc_data;
|
||||
UINT32 dvc_data_length;
|
||||
CRITICAL_SECTION lock;
|
||||
};
|
||||
typedef struct _DVCMAN_CHANNEL DVCMAN_CHANNEL;
|
||||
|
|
|
@ -49,7 +49,9 @@
|
|||
#endif
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#define __USE_GNU /* for O_PATH */
|
||||
#include <fcntl.h>
|
||||
#undef __USE_GNU
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -192,6 +194,11 @@ static BOOL drive_file_init(DRIVE_FILE* file, UINT32 DesiredAccess, UINT32 Creat
|
|||
if (STAT(file->fullpath, &st) == 0)
|
||||
{
|
||||
file->is_dir = (S_ISDIR(st.st_mode) ? TRUE : FALSE);
|
||||
if (!file->is_dir && !S_ISREG(st.st_mode))
|
||||
{
|
||||
file->err = EPERM;
|
||||
return TRUE;
|
||||
}
|
||||
#ifndef WIN32
|
||||
if (st.st_size > (unsigned long) 0x07FFFFFFF)
|
||||
largeFile = TRUE;
|
||||
|
@ -306,6 +313,25 @@ DRIVE_FILE* drive_file_new(const char* base_path, const char* path, UINT32 id,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#if defined(__linux__) && defined(O_PATH)
|
||||
if (file->fd < 0 && file->err == EACCES)
|
||||
{
|
||||
/**
|
||||
* We have no access permissions for the file or directory but if the
|
||||
* peer is only interested in reading the object's attributes we can try
|
||||
* to obtain a file descriptor who's only purpose is to perform
|
||||
* operations that act purely at the file descriptor level.
|
||||
* See open(2)
|
||||
**/
|
||||
{
|
||||
if ((file->fd = OPEN(file->fullpath, O_PATH)) >= 0)
|
||||
{
|
||||
file->err = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
|
|
|
@ -255,7 +255,10 @@ LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam
|
|||
// Set maximum window size for resizing
|
||||
|
||||
minmax = (MINMAXINFO*) lParam;
|
||||
wf_update_canvas_diff(wfc);
|
||||
|
||||
//always use the last determined canvas diff, because it could be
|
||||
//that the window is minimized when this gets called
|
||||
//wf_update_canvas_diff(wfc);
|
||||
|
||||
if (!wfc->fullscreen)
|
||||
{
|
||||
|
@ -281,11 +284,14 @@ LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam
|
|||
wfc->client_y = windowRect.top;
|
||||
}
|
||||
|
||||
wf_size_scrollbars(wfc, LOWORD(lParam), HIWORD(lParam));
|
||||
if (wfc->client_width && wfc->client_height)
|
||||
{
|
||||
wf_size_scrollbars(wfc, LOWORD(lParam), HIWORD(lParam));
|
||||
|
||||
// Workaround: when the window is maximized, the call to "ShowScrollBars" returns TRUE but has no effect.
|
||||
if (wParam == SIZE_MAXIMIZED && !wfc->fullscreen)
|
||||
SetWindowPos(wfc->hwnd, HWND_TOP, 0, 0, windowRect.right - windowRect.left, windowRect.bottom - windowRect.top, SWP_NOMOVE | SWP_FRAMECHANGED);
|
||||
// Workaround: when the window is maximized, the call to "ShowScrollBars" returns TRUE but has no effect.
|
||||
if (wParam == SIZE_MAXIMIZED && !wfc->fullscreen)
|
||||
SetWindowPos(wfc->hwnd, HWND_TOP, 0, 0, windowRect.right - windowRect.left, windowRect.bottom - windowRect.top, SWP_NOMOVE | SWP_FRAMECHANGED);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
|
|
@ -394,10 +394,12 @@ BOOL wf_post_connect(freerdp* instance)
|
|||
if (settings->EmbeddedWindow)
|
||||
settings->Decorations = FALSE;
|
||||
|
||||
if (!settings->Decorations)
|
||||
if (wfc->fullscreen)
|
||||
dwStyle = WS_POPUP;
|
||||
else if (!settings->Decorations)
|
||||
dwStyle = WS_CHILD | WS_BORDER;
|
||||
else
|
||||
dwStyle = 0;
|
||||
dwStyle = WS_CAPTION | WS_OVERLAPPED | WS_SYSMENU | WS_MINIMIZEBOX | WS_SIZEBOX | WS_MAXIMIZEBOX;
|
||||
|
||||
if (!wfc->hwnd)
|
||||
{
|
||||
|
|
|
@ -180,31 +180,41 @@ void xf_draw_screen_scaled(xfContext *xfc, int x, int y, int w, int h, BOOL scal
|
|||
|
||||
void xf_sw_begin_paint(rdpContext *context)
|
||||
{
|
||||
rdpGdi *gdi = context->gdi;
|
||||
rdpGdi* gdi = context->gdi;
|
||||
gdi->primary->hdc->hwnd->invalid->null = 1;
|
||||
gdi->primary->hdc->hwnd->ninvalid = 0;
|
||||
}
|
||||
|
||||
void xf_sw_end_paint(rdpContext *context)
|
||||
{
|
||||
rdpGdi *gdi;
|
||||
int i;
|
||||
INT32 x, y;
|
||||
UINT32 w, h;
|
||||
xfContext *xfc = (xfContext *) context;
|
||||
gdi = context->gdi;
|
||||
if(!xfc->remote_app)
|
||||
int ninvalid;
|
||||
HGDI_RGN cinvalid;
|
||||
xfContext* xfc = (xfContext*) context;
|
||||
rdpGdi* gdi = context->gdi;
|
||||
|
||||
x = gdi->primary->hdc->hwnd->invalid->x;
|
||||
y = gdi->primary->hdc->hwnd->invalid->y;
|
||||
w = gdi->primary->hdc->hwnd->invalid->w;
|
||||
h = gdi->primary->hdc->hwnd->invalid->h;
|
||||
|
||||
ninvalid = gdi->primary->hdc->hwnd->ninvalid;
|
||||
cinvalid = gdi->primary->hdc->hwnd->cinvalid;
|
||||
|
||||
if (!xfc->remote_app)
|
||||
{
|
||||
if(!xfc->complex_regions)
|
||||
if (!xfc->complex_regions)
|
||||
{
|
||||
if(gdi->primary->hdc->hwnd->invalid->null)
|
||||
if (gdi->primary->hdc->hwnd->invalid->null)
|
||||
return;
|
||||
x = gdi->primary->hdc->hwnd->invalid->x;
|
||||
y = gdi->primary->hdc->hwnd->invalid->y;
|
||||
w = gdi->primary->hdc->hwnd->invalid->w;
|
||||
h = gdi->primary->hdc->hwnd->invalid->h;
|
||||
|
||||
xf_lock_x11(xfc, FALSE);
|
||||
|
||||
XPutImage(xfc->display, xfc->primary, xfc->gc, xfc->image, x, y, x, y, w, h);
|
||||
if((xfc->settings->ScalingFactor != 1.0) || (xfc->offset_x) || (xfc->offset_y))
|
||||
|
||||
if ((xfc->settings->ScalingFactor != 1.0) || (xfc->offset_x) || (xfc->offset_y))
|
||||
{
|
||||
xf_draw_screen_scaled(xfc, x, y, w, h, TRUE);
|
||||
}
|
||||
|
@ -212,27 +222,27 @@ void xf_sw_end_paint(rdpContext *context)
|
|||
{
|
||||
XCopyArea(xfc->display, xfc->primary, xfc->window->handle, xfc->gc, x, y, w, h, x, y);
|
||||
}
|
||||
|
||||
xf_unlock_x11(xfc, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
int i;
|
||||
int ninvalid;
|
||||
HGDI_RGN cinvalid;
|
||||
if(gdi->primary->hdc->hwnd->ninvalid < 1)
|
||||
if (gdi->primary->hdc->hwnd->ninvalid < 1)
|
||||
return;
|
||||
ninvalid = gdi->primary->hdc->hwnd->ninvalid;
|
||||
cinvalid = gdi->primary->hdc->hwnd->cinvalid;
|
||||
|
||||
xf_lock_x11(xfc, FALSE);
|
||||
for(i = 0; i < ninvalid; i++)
|
||||
|
||||
for (i = 0; i < ninvalid; i++)
|
||||
{
|
||||
x = cinvalid[i].x;
|
||||
y = cinvalid[i].y;
|
||||
w = cinvalid[i].w;
|
||||
h = cinvalid[i].h;
|
||||
|
||||
//combine xfc->primary with xfc->image
|
||||
XPutImage(xfc->display, xfc->primary, xfc->gc, xfc->image, x, y, x, y, w, h);
|
||||
if((xfc->settings->ScalingFactor != 1.0) || (xfc->offset_x) || (xfc->offset_y))
|
||||
|
||||
if ((xfc->settings->ScalingFactor != 1.0) || (xfc->offset_x) || (xfc->offset_y))
|
||||
{
|
||||
xf_draw_screen_scaled(xfc, x, y, w, h, TRUE);
|
||||
}
|
||||
|
@ -241,20 +251,21 @@ void xf_sw_end_paint(rdpContext *context)
|
|||
XCopyArea(xfc->display, xfc->primary, xfc->window->handle, xfc->gc, x, y, w, h, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
XFlush(xfc->display);
|
||||
|
||||
xf_unlock_x11(xfc, FALSE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(gdi->primary->hdc->hwnd->invalid->null)
|
||||
if (gdi->primary->hdc->hwnd->invalid->null)
|
||||
return;
|
||||
x = gdi->primary->hdc->hwnd->invalid->x;
|
||||
y = gdi->primary->hdc->hwnd->invalid->y;
|
||||
w = gdi->primary->hdc->hwnd->invalid->w;
|
||||
h = gdi->primary->hdc->hwnd->invalid->h;
|
||||
|
||||
xf_lock_x11(xfc, FALSE);
|
||||
|
||||
xf_rail_paint(xfc, context->rail, x, y, x + w - 1, y + h - 1);
|
||||
|
||||
xf_unlock_x11(xfc, FALSE);
|
||||
}
|
||||
}
|
||||
|
@ -264,12 +275,15 @@ void xf_sw_desktop_resize(rdpContext *context)
|
|||
rdpSettings *settings;
|
||||
xfContext *xfc = (xfContext *) context;
|
||||
settings = xfc->instance->settings;
|
||||
|
||||
xf_lock_x11(xfc, TRUE);
|
||||
if(!xfc->fullscreen)
|
||||
|
||||
if (!xfc->fullscreen)
|
||||
{
|
||||
rdpGdi *gdi = context->gdi;
|
||||
gdi_resize(gdi, xfc->width, xfc->height);
|
||||
if(xfc->image)
|
||||
|
||||
if (xfc->image)
|
||||
{
|
||||
xfc->image->data = NULL;
|
||||
XDestroyImage(xfc->image);
|
||||
|
@ -277,6 +291,7 @@ void xf_sw_desktop_resize(rdpContext *context)
|
|||
(char *) gdi->primary_buffer, gdi->width, gdi->height, xfc->scanline_pad, 0);
|
||||
}
|
||||
}
|
||||
|
||||
xf_unlock_x11(xfc, TRUE);
|
||||
}
|
||||
|
||||
|
@ -794,6 +809,7 @@ BOOL xf_pre_connect(freerdp *instance)
|
|||
xfc->grab_keyboard = settings->GrabKeyboard;
|
||||
xfc->fullscreen_toggle = settings->ToggleFullscreen;
|
||||
xf_detect_monitors(xfc, settings);
|
||||
xfc->colormap = DefaultColormap(xfc->display, xfc->screen_number);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -214,6 +214,28 @@ BOOL xf_set_rop3(xfContext* xfc, int rop3)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
unsigned long xf_gdi_get_color(xfContext* xfc, GDI_COLOR color)
|
||||
{
|
||||
XColor x11_color;
|
||||
|
||||
x11_color.flags = DoRed | DoGreen | DoBlue;
|
||||
GetRGB32(x11_color.red, x11_color.green, x11_color.blue, color);
|
||||
x11_color.red = x11_color.red << 8;
|
||||
x11_color.green = x11_color.green << 8;
|
||||
x11_color.blue = x11_color.blue << 8;
|
||||
|
||||
if (XAllocColor(xfc->display, xfc->colormap, &x11_color) != 0)
|
||||
{
|
||||
XFreeColors(xfc->display, xfc->colormap, &x11_color.pixel, 1, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
x11_color.pixel = BlackPixel(xfc->display, xfc->screen_number);
|
||||
}
|
||||
|
||||
return x11_color.pixel;
|
||||
}
|
||||
|
||||
Pixmap xf_brush_new(xfContext* xfc, int width, int height, int bpp, BYTE* data)
|
||||
{
|
||||
Pixmap bitmap;
|
||||
|
@ -337,8 +359,10 @@ void xf_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt)
|
|||
brush = &patblt->brush;
|
||||
xf_set_rop3(xfc, gdi_rop3_code(patblt->bRop));
|
||||
|
||||
foreColor = freerdp_color_convert_var(patblt->foreColor, context->settings->ColorDepth, xfc->bpp, xfc->clrconv);
|
||||
backColor = freerdp_color_convert_var(patblt->backColor, context->settings->ColorDepth, xfc->bpp, xfc->clrconv);
|
||||
foreColor = freerdp_color_convert_drawing_order_color_to_gdi_color(patblt->foreColor, context->settings->ColorDepth, xfc->clrconv);
|
||||
foreColor = xf_gdi_get_color(xfc, foreColor);
|
||||
backColor = freerdp_color_convert_drawing_order_color_to_gdi_color(patblt->backColor, context->settings->ColorDepth, xfc->clrconv);
|
||||
backColor = xf_gdi_get_color(xfc, backColor);
|
||||
|
||||
if (brush->style == GDI_BS_SOLID)
|
||||
{
|
||||
|
@ -457,7 +481,8 @@ void xf_gdi_opaque_rect(rdpContext* context, OPAQUE_RECT_ORDER* opaque_rect)
|
|||
|
||||
xf_lock_x11(xfc, FALSE);
|
||||
|
||||
color = freerdp_color_convert_var(opaque_rect->color, context->settings->ColorDepth, xfc->bpp, xfc->clrconv);
|
||||
color = freerdp_color_convert_drawing_order_color_to_gdi_color(opaque_rect->color, context->settings->ColorDepth, xfc->clrconv);
|
||||
color = xf_gdi_get_color(xfc, color);
|
||||
|
||||
XSetFunction(xfc->display, xfc->gc, GXcopy);
|
||||
XSetFillStyle(xfc->display, xfc->gc, FillSolid);
|
||||
|
@ -491,7 +516,8 @@ void xf_gdi_multi_opaque_rect(rdpContext* context, MULTI_OPAQUE_RECT_ORDER* mult
|
|||
|
||||
xf_lock_x11(xfc, FALSE);
|
||||
|
||||
color = freerdp_color_convert_var(multi_opaque_rect->color, context->settings->ColorDepth, xfc->bpp, xfc->clrconv);
|
||||
color = freerdp_color_convert_drawing_order_color_to_gdi_color(multi_opaque_rect->color, context->settings->ColorDepth, xfc->clrconv);
|
||||
color = xf_gdi_get_color(xfc, color);
|
||||
|
||||
XSetFunction(xfc->display, xfc->gc, GXcopy);
|
||||
XSetFillStyle(xfc->display, xfc->gc, FillSolid);
|
||||
|
@ -533,7 +559,8 @@ void xf_gdi_line_to(rdpContext* context, LINE_TO_ORDER* line_to)
|
|||
xf_lock_x11(xfc, FALSE);
|
||||
|
||||
xf_set_rop2(xfc, line_to->bRop2);
|
||||
color = freerdp_color_convert_var(line_to->penColor, context->settings->ColorDepth, xfc->bpp, xfc->clrconv);
|
||||
color = freerdp_color_convert_drawing_order_color_to_gdi_color(line_to->penColor, context->settings->ColorDepth, xfc->clrconv);
|
||||
color = xf_gdi_get_color(xfc, color);
|
||||
|
||||
XSetFillStyle(xfc->display, xfc->gc, FillSolid);
|
||||
XSetForeground(xfc->display, xfc->gc, color);
|
||||
|
@ -583,7 +610,8 @@ void xf_gdi_polyline(rdpContext* context, POLYLINE_ORDER* polyline)
|
|||
xf_lock_x11(xfc, FALSE);
|
||||
|
||||
xf_set_rop2(xfc, polyline->bRop2);
|
||||
color = freerdp_color_convert_var(polyline->penColor, context->settings->ColorDepth, xfc->bpp, xfc->clrconv);
|
||||
color = freerdp_color_convert_drawing_order_color_to_gdi_color(polyline->penColor, context->settings->ColorDepth, xfc->clrconv);
|
||||
color = xf_gdi_get_color(xfc, color);
|
||||
|
||||
XSetFillStyle(xfc->display, xfc->gc, FillSolid);
|
||||
XSetForeground(xfc->display, xfc->gc, color);
|
||||
|
@ -679,8 +707,10 @@ void xf_gdi_mem3blt(rdpContext* context, MEM3BLT_ORDER* mem3blt)
|
|||
brush = &mem3blt->brush;
|
||||
bitmap = (xfBitmap*) mem3blt->bitmap;
|
||||
xf_set_rop3(xfc, gdi_rop3_code(mem3blt->bRop));
|
||||
foreColor = freerdp_color_convert_var(mem3blt->foreColor, context->settings->ColorDepth, xfc->bpp, xfc->clrconv);
|
||||
backColor = freerdp_color_convert_var(mem3blt->backColor, context->settings->ColorDepth, xfc->bpp, xfc->clrconv);
|
||||
foreColor = freerdp_color_convert_drawing_order_color_to_gdi_color(mem3blt->foreColor, context->settings->ColorDepth, xfc->clrconv);
|
||||
foreColor = xf_gdi_get_color(xfc, foreColor);
|
||||
backColor = freerdp_color_convert_drawing_order_color_to_gdi_color(mem3blt->backColor, context->settings->ColorDepth, xfc->clrconv);
|
||||
backColor = xf_gdi_get_color(xfc, backColor);
|
||||
|
||||
if (brush->style == GDI_BS_PATTERN)
|
||||
{
|
||||
|
@ -752,7 +782,8 @@ void xf_gdi_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
|
|||
xf_lock_x11(xfc, FALSE);
|
||||
|
||||
xf_set_rop2(xfc, polygon_sc->bRop2);
|
||||
brush_color = freerdp_color_convert_var(polygon_sc->brushColor, context->settings->ColorDepth, xfc->bpp, xfc->clrconv);
|
||||
brush_color = freerdp_color_convert_drawing_order_color_to_gdi_color(polygon_sc->brushColor, context->settings->ColorDepth, xfc->clrconv);
|
||||
brush_color = xf_gdi_get_color(xfc, brush_color);
|
||||
|
||||
npoints = polygon_sc->numPoints + 1;
|
||||
points = malloc(sizeof(XPoint) * npoints);
|
||||
|
@ -813,8 +844,10 @@ void xf_gdi_polygon_cb(rdpContext* context, POLYGON_CB_ORDER* polygon_cb)
|
|||
|
||||
brush = &(polygon_cb->brush);
|
||||
xf_set_rop2(xfc, polygon_cb->bRop2);
|
||||
foreColor = freerdp_color_convert_var(polygon_cb->foreColor, context->settings->ColorDepth, xfc->bpp, xfc->clrconv);
|
||||
backColor = freerdp_color_convert_var(polygon_cb->backColor, context->settings->ColorDepth, xfc->bpp, xfc->clrconv);
|
||||
foreColor = freerdp_color_convert_drawing_order_color_to_gdi_color(polygon_cb->foreColor, context->settings->ColorDepth, xfc->clrconv);
|
||||
foreColor = xf_gdi_get_color(xfc, foreColor);
|
||||
backColor = freerdp_color_convert_drawing_order_color_to_gdi_color(polygon_cb->backColor, context->settings->ColorDepth, xfc->clrconv);
|
||||
backColor = xf_gdi_get_color(xfc, backColor);
|
||||
|
||||
npoints = polygon_cb->numPoints + 1;
|
||||
points = malloc(sizeof(XPoint) * npoints);
|
||||
|
@ -916,6 +949,11 @@ void xf_gdi_ellipse_cb(rdpContext* context, ELLIPSE_CB_ORDER* ellipse_cb)
|
|||
DEBUG_WARN( "EllipseCB\n");
|
||||
}
|
||||
|
||||
void xf_gdi_frame_marker(rdpContext* context, FRAME_MARKER_ORDER* frameMarker)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void xf_gdi_surface_frame_marker(rdpContext* context, SURFACE_FRAME_MARKER* surface_frame_marker)
|
||||
{
|
||||
rdpSettings* settings;
|
||||
|
@ -1154,5 +1192,7 @@ void xf_gdi_register_update_callbacks(rdpUpdate* update)
|
|||
|
||||
update->SurfaceBits = xf_gdi_surface_bits;
|
||||
update->SurfaceFrameMarker = xf_gdi_surface_frame_marker;
|
||||
|
||||
update->altsec->FrameMarker = xf_gdi_frame_marker;
|
||||
}
|
||||
|
||||
|
|
|
@ -389,19 +389,17 @@ void xf_Glyph_Draw(rdpContext* context, rdpGlyph* glyph, int x, int y)
|
|||
|
||||
void xf_Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int height, UINT32 bgcolor, UINT32 fgcolor)
|
||||
{
|
||||
xfContext* context_ = (xfContext*) context;
|
||||
xfContext* xfc = (xfContext*) context;
|
||||
|
||||
bgcolor = (xfc->clrconv->invert)?
|
||||
freerdp_color_convert_var_bgr(bgcolor, context_->settings->ColorDepth, xfc->bpp, xfc->clrconv):
|
||||
freerdp_color_convert_var_rgb(bgcolor, context_->settings->ColorDepth, xfc->bpp, xfc->clrconv);
|
||||
bgcolor = freerdp_color_convert_drawing_order_color_to_gdi_color(bgcolor, context->settings->ColorDepth, xfc->clrconv);
|
||||
|
||||
fgcolor = (xfc->clrconv->invert)?
|
||||
freerdp_color_convert_var_bgr(fgcolor, context_->settings->ColorDepth, xfc->bpp, xfc->clrconv):
|
||||
freerdp_color_convert_var_rgb(fgcolor, context_->settings->ColorDepth, xfc->bpp, xfc->clrconv);
|
||||
fgcolor = freerdp_color_convert_drawing_order_color_to_gdi_color(fgcolor, context->settings->ColorDepth, xfc->clrconv);
|
||||
|
||||
xf_lock_x11(xfc, FALSE);
|
||||
|
||||
fgcolor = xf_gdi_get_color(xfc, fgcolor);
|
||||
bgcolor = xf_gdi_get_color(xfc, bgcolor);
|
||||
|
||||
XSetFunction(xfc->display, xfc->gc, GXcopy);
|
||||
XSetFillStyle(xfc->display, xfc->gc, FillSolid);
|
||||
XSetForeground(xfc->display, xfc->gc, fgcolor);
|
||||
|
|
|
@ -114,6 +114,8 @@ void xf_SendClientEvent(xfContext *xfc, xfWindow *window, Atom atom, unsigned in
|
|||
unsigned int i;
|
||||
va_list argp;
|
||||
va_start(argp, numArgs);
|
||||
|
||||
ZeroMemory(&xevent, sizeof(XEvent));
|
||||
xevent.xclient.type = ClientMessage;
|
||||
xevent.xclient.serial = 0;
|
||||
xevent.xclient.send_event = False;
|
||||
|
|
|
@ -245,6 +245,8 @@ void xf_unlock_x11(xfContext* xfc, BOOL display);
|
|||
void xf_draw_screen_scaled(xfContext* xfc, int x, int y, int w, int h, BOOL scale);
|
||||
void xf_transform_window(xfContext* xfc);
|
||||
|
||||
unsigned long xf_gdi_get_color(xfContext* xfc, GDI_COLOR color);
|
||||
|
||||
FREERDP_API DWORD xf_exit_code_from_disconnect_reason(DWORD reason);
|
||||
|
||||
#endif /* __XFREERDP_H */
|
||||
|
|
|
@ -816,21 +816,12 @@ int freerdp_parse_username(char* username, char** user, char** domain)
|
|||
}
|
||||
else
|
||||
{
|
||||
p = strchr(username, '@');
|
||||
|
||||
if (p)
|
||||
{
|
||||
length = (int) (p - username);
|
||||
*user = (char*) malloc(length + 1);
|
||||
strncpy(*user, username, length);
|
||||
(*user)[length] = '\0';
|
||||
*domain = _strdup(&p[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
*user = _strdup(username);
|
||||
*domain = NULL;
|
||||
}
|
||||
/* Do not break up the name for '@'; both credSSP and the
|
||||
* ClientInfo PDU expect 'user@corp.net' to be transmitted
|
||||
* as username 'user@corp.net', domain empty.
|
||||
*/
|
||||
*user = _strdup(username);
|
||||
*domain = NULL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
wLogMessage msg; \
|
||||
wLog *log; \
|
||||
\
|
||||
strncat(tag, "com.freerdp.channels.", sizeof(tag)); \
|
||||
strncat(tag, dbg_str, sizeof(tag) - sizeof("com.freerdp.channels.")); \
|
||||
strncat(tag, "com.freerdp.channels.", sizeof(tag) - 1); \
|
||||
strncat(tag, dbg_str, sizeof(tag) - 1 - sizeof("com.freerdp.channels.")); \
|
||||
log = WLog_Get(tag); \
|
||||
\
|
||||
msg.Type = WLOG_MESSAGE_TEXT; \
|
||||
|
|
|
@ -37,7 +37,8 @@ rdpBitmap* Bitmap_Alloc(rdpContext* context)
|
|||
|
||||
if (bitmap)
|
||||
{
|
||||
CopyMemory(bitmap, context->graphics->Bitmap_Prototype, sizeof(rdpBitmap));
|
||||
ZeroMemory(bitmap, graphics->Bitmap_Prototype->size);
|
||||
CopyMemory(bitmap, graphics->Bitmap_Prototype, sizeof(rdpBitmap));
|
||||
bitmap->data = NULL;
|
||||
}
|
||||
|
||||
|
@ -99,7 +100,8 @@ rdpPointer* Pointer_Alloc(rdpContext* context)
|
|||
|
||||
if (pointer)
|
||||
{
|
||||
CopyMemory(pointer, context->graphics->Pointer_Prototype, sizeof(rdpPointer));
|
||||
ZeroMemory(pointer, graphics->Pointer_Prototype->size);
|
||||
CopyMemory(pointer, graphics->Pointer_Prototype, sizeof(rdpPointer));
|
||||
}
|
||||
|
||||
return pointer;
|
||||
|
@ -165,7 +167,8 @@ rdpGlyph* Glyph_Alloc(rdpContext* context)
|
|||
|
||||
if (glyph)
|
||||
{
|
||||
CopyMemory(glyph, context->graphics->Glyph_Prototype, sizeof(rdpGlyph));
|
||||
ZeroMemory(glyph, graphics->Glyph_Prototype->size);
|
||||
CopyMemory(glyph, graphics->Glyph_Prototype, sizeof(rdpGlyph));
|
||||
}
|
||||
|
||||
return glyph;
|
||||
|
|
|
@ -184,6 +184,9 @@ static int peer_recv_tpkt_pdu(freerdp_peer* client, wStream* s)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (rdp->disconnect)
|
||||
return 0;
|
||||
|
||||
if (rdp->settings->DisableEncryption)
|
||||
{
|
||||
if (!rdp_read_security_header(s, &securityFlags))
|
||||
|
|
|
@ -989,6 +989,9 @@ static int rdp_recv_tpkt_pdu(rdpRdp* rdp, wStream* s)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (rdp->disconnect)
|
||||
return 0;
|
||||
|
||||
if (rdp->settings->DisableEncryption)
|
||||
{
|
||||
if (!rdp_read_security_header(s, &securityFlags))
|
||||
|
|
|
@ -321,7 +321,7 @@ rdpSettings* freerdp_settings_new(DWORD flags)
|
|||
|
||||
settings->DrawGdiPlusEnabled = FALSE;
|
||||
|
||||
settings->FrameMarkerCommandEnabled = FALSE;
|
||||
settings->FrameMarkerCommandEnabled = TRUE;
|
||||
settings->SurfaceFrameMarkerEnabled = TRUE;
|
||||
settings->BitmapCacheV3Enabled = FALSE;
|
||||
|
||||
|
|
|
@ -164,6 +164,8 @@ BOOL update_read_bitmap_update(rdpUpdate* update, wStream* s, BITMAP_UPDATE* bit
|
|||
|
||||
Stream_Read_UINT16(s, bitmapUpdate->number); /* numberRectangles (2 bytes) */
|
||||
|
||||
WLog_Print(update->log, WLOG_DEBUG, "BitmapUpdate: %d", bitmapUpdate->number);
|
||||
|
||||
if (bitmapUpdate->number > bitmapUpdate->count)
|
||||
{
|
||||
UINT16 count;
|
||||
|
|
|
@ -764,6 +764,11 @@ void gdi_ellipse_cb(rdpContext* context, ELLIPSE_CB_ORDER* ellipse_cb)
|
|||
DEBUG_WARN( "EllipseCB\n");
|
||||
}
|
||||
|
||||
void gdi_frame_marker(rdpContext* context, FRAME_MARKER_ORDER* frameMarker)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void gdi_surface_frame_marker(rdpContext* context, SURFACE_FRAME_MARKER* surface_frame_marker)
|
||||
{
|
||||
DEBUG_GDI("frameId %d frameAction %d",
|
||||
|
@ -943,6 +948,8 @@ void gdi_register_update_callbacks(rdpUpdate* update)
|
|||
|
||||
update->SurfaceBits = gdi_surface_bits;
|
||||
update->SurfaceFrameMarker = gdi_surface_frame_marker;
|
||||
|
||||
update->altsec->FrameMarker = gdi_frame_marker;
|
||||
}
|
||||
|
||||
void gdi_init_primary(rdpGdi* gdi)
|
||||
|
|
|
@ -106,7 +106,6 @@ static void svc_plugin_process_received(rdpSvcPlugin* plugin, void* pData, UINT3
|
|||
Stream_Release(plugin->data_in);
|
||||
|
||||
plugin->data_in = StreamPool_Take(plugin->pool, totalLength);
|
||||
Stream_AddRef(plugin->data_in);
|
||||
}
|
||||
|
||||
s = plugin->data_in;
|
||||
|
|
|
@ -190,13 +190,8 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
|||
MODULE freerdp
|
||||
MODULES freerdp-core freerdp-common freerdp-codec freerdp-primitives freerdp-utils freerdp-gdi freerdp-crypto freerdp-locale)
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE winpr
|
||||
MODULES winpr-sspi winpr-crt winpr-utils winpr-input winpr-sysinfo)
|
||||
|
||||
list(APPEND ${MODULE_PREFIX}_LIBS freerdp-client)
|
||||
list(APPEND ${MODULE_PREFIX}_LIBS winpr-makecert-tool)
|
||||
list(APPEND ${MODULE_PREFIX}_LIBS winpr-makecert-tool winpr)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
|
|
Loading…
Reference in New Issue