Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Philippe Auphelle 2011-12-14 13:26:47 +01:00
commit d522e75104
11 changed files with 45 additions and 19 deletions

View File

@ -168,7 +168,7 @@ boolean df_post_connect(freerdp* instance)
context = ((dfContext*) instance->context);
dfi = context->dfi;
gdi_init(instance, CLRCONV_ALPHA | CLRBUF_16BPP | CLRBUF_32BPP, NULL);
gdi_init(instance, CLRCONV_ALPHA | CLRCONV_INVERT | CLRBUF_16BPP | CLRBUF_32BPP, NULL);
gdi = instance->context->gdi;
dfi->err = DirectFBCreate(&(dfi->dfb));

View File

@ -226,7 +226,7 @@ boolean wf_post_connect(freerdp* instance)
if (wfi->sw_gdi)
{
gdi_init(instance, CLRCONV_ALPHA | CLRBUF_32BPP, NULL);
gdi_init(instance, CLRCONV_ALPHA | CLRCONV_INVERT | CLRBUF_32BPP, NULL);
gdi = instance->context->gdi;
wfi->hdc = gdi->primary->hdc;
wfi->primary = wf_image_new(wfi, width, height, wfi->dstBpp, gdi->primary_buffer);

View File

@ -210,7 +210,7 @@ void xf_Glyph_New(rdpContext* context, rdpGlyph* glyph)
scanline = (glyph->cx + 7) / 8;
xf_glyph->pixmap = XCreatePixmap(xfi->display, xfi->drawable, glyph->cx, glyph->cy, 1);
xf_glyph->pixmap = XCreatePixmap(xfi->display, xfi->drawing, glyph->cx, glyph->cy, 1);
image = XCreateImage(xfi->display, xfi->visual, 1,
ZPixmap, 0, (char*) glyph->aj, glyph->cx, glyph->cy, 8, scanline);
@ -242,7 +242,7 @@ void xf_Glyph_Draw(rdpContext* context, rdpGlyph* glyph, int x, int y)
XSetStipple(xfi->display, xfi->gc, xf_glyph->pixmap);
XSetTSOrigin(xfi->display, xfi->gc, x, y);
XFillRectangle(xfi->display, xfi->drawable, xfi->gc, x, y, glyph->cx, glyph->cy);
XFillRectangle(xfi->display, xfi->drawing, xfi->gc, x, y, glyph->cx, glyph->cy);
XSetStipple(xfi->display, xfi->gc, xfi->bitmap_mono);
}
@ -254,8 +254,12 @@ void xf_Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int height
fgcolor = freerdp_color_convert(fgcolor, xfi->srcBpp, 32, xfi->clrconv);
XSetFunction(xfi->display, xfi->gc, GXcopy);
XSetFillStyle(xfi->display, xfi->gc, FillSolid);
XSetForeground(xfi->display, xfi->gc, fgcolor);
XSetBackground(xfi->display, xfi->gc, bgcolor);
XFillRectangle(xfi->display, xfi->drawing, xfi->gc, x, y, width, height);
XSetForeground(xfi->display, xfi->gc, bgcolor);
XSetBackground(xfi->display, xfi->gc, fgcolor);
XSetFillStyle(xfi->display, xfi->gc, FillStippled);
}
@ -263,12 +267,15 @@ void xf_Glyph_EndDraw(rdpContext* context, int x, int y, int width, int height,
{
xfInfo* xfi = ((xfContext*) context)->xfi;
if (xfi->remote_app != true)
if (xfi->drawing == xfi->primary)
{
XCopyArea(xfi->display, xfi->primary, xfi->drawable, xfi->gc, x, y, width, height, x, y);
}
if (xfi->remote_app != true)
{
XCopyArea(xfi->display, xfi->primary, xfi->drawable, xfi->gc, x, y, width, height, x, y);
}
gdi_InvalidateRegion(xfi->hdc, x, y, width, height);
gdi_InvalidateRegion(xfi->hdc, x, y, width, height);
}
}
/* Graphics Module */

View File

@ -473,7 +473,7 @@ void xf_StartLocalMoveSize(xfInfo* xfi, xfWindow* window, int direction, int x,
{
Window child_window;
#ifdef WITH_DEBUG_X11_LMS
#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE
rdpWindow* wnd = window->window;
#endif
@ -510,7 +510,7 @@ void xf_StartLocalMoveSize(xfInfo* xfi, xfWindow* window, int direction, int x,
void xf_EndLocalMoveSize(xfInfo *xfi, xfWindow *window, boolean cancel)
{
#ifdef WITH_DEBUG_X11_LMS
#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE
rdpWindow* wnd = window->window;
#endif
@ -549,7 +549,7 @@ void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int h
{
boolean resize = false;
#ifdef WITH_DEBUG_X11_LMS
#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE
rdpWindow* wnd = window->window;
#endif

View File

@ -587,7 +587,7 @@ boolean xf_post_connect(freerdp* instance)
rdpGdi* gdi;
uint32 flags;
flags = CLRCONV_ALPHA;
flags = CLRCONV_ALPHA | CLRCONV_INVERT;
if (xfi->bpp > 16)
flags |= CLRBUF_32BPP;

View File

@ -182,7 +182,7 @@ boolean tf_post_connect(freerdp* instance)
{
rdpGdi* gdi;
gdi_init(instance, CLRCONV_ALPHA | CLRBUF_16BPP | CLRBUF_32BPP, NULL);
gdi_init(instance, CLRCONV_ALPHA | CLRCONV_INVERT | CLRBUF_16BPP | CLRBUF_32BPP, NULL);
gdi = instance->context->gdi;
instance->update->BeginPaint = tf_begin_paint;

View File

@ -928,7 +928,7 @@ void rdp_write_bitmap_cache_cell_info(STREAM* s, BITMAP_CACHE_V2_CELL_INFO* cell
* is used to indicate a persistent bitmap cache.
*/
info = cellInfo->numEntries || (cellInfo->persistent << 31);
info = (cellInfo->numEntries | (cellInfo->persistent << 31));
stream_write_uint32(s, info);
}
@ -1930,7 +1930,7 @@ void rdp_write_confirm_active(STREAM* s, rdpSettings* settings)
stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */
/* Capability Sets */
numberCapabilities = 14;
numberCapabilities = 15;
rdp_write_general_capability_set(s, settings);
rdp_write_bitmap_capability_set(s, settings);
rdp_write_order_capability_set(s, settings);
@ -1947,6 +1947,7 @@ void rdp_write_confirm_active(STREAM* s, rdpSettings* settings)
rdp_write_virtual_channel_capability_set(s, settings);
rdp_write_sound_capability_set(s, settings);
rdp_write_share_capability_set(s, settings);
rdp_write_font_capability_set(s, settings);
rdp_write_control_capability_set(s, settings);
rdp_write_color_cache_capability_set(s, settings);
rdp_write_window_activation_capability_set(s, settings);

View File

@ -39,7 +39,13 @@
#define DLSYM(f, n) dlsym(f, n)
#define DLCLOSE(f) dlclose(f)
#define PATH_SEPARATOR '/'
#ifdef __APPLE__
#define PLUGIN_EXT "dylib"
#else
#define PLUGIN_EXT "so"
#endif
#endif
static uint32 FREERDP_CC extension_register_plugin(rdpExtPlugin* plugin)

View File

@ -663,7 +663,7 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings *settings)
connectionType = 0;
earlyCapabilityFlags = RNS_UD_CS_SUPPORT_ERRINFO_PDU;
if (settings->performance_flags == PERF_FLAG_NONE)
if ((settings->performance_flags & ~PERF_ENABLE_DESKTOP_COMPOSITION) == PERF_FLAG_NONE)
{
earlyCapabilityFlags |= RNS_UD_CS_VALID_CONNECTION_TYPE;
connectionType = CONNECTION_TYPE_LAN;

View File

@ -33,6 +33,13 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#ifdef __APPLE__
#ifndef TCP_KEEPIDLE
#define TCP_KEEPIDLE TCP_KEEPALIVE
#endif
#endif
#else
#define SHUT_RDWR SD_BOTH
#define close(_fd) closesocket(_fd)
@ -278,9 +285,9 @@ boolean tcp_set_keep_alive_mode(rdpTcp* tcp)
option_value = 5;
option_len = sizeof(option_value);
if (setsockopt(tcp->sockfd, SOL_TCP, TCP_KEEPIDLE, (void*) &option_value, option_len) < 0)
if (setsockopt(tcp->sockfd, IPPROTO_TCP, TCP_KEEPIDLE, (void*) &option_value, option_len) < 0)
{
perror("setsockopt() SOL_TCP, SO_KEEPIDLE:");
perror("setsockopt() IPPROTO_TCP, SO_KEEPIDLE:");
return false;
}
#endif

View File

@ -40,7 +40,12 @@
#define DLSYM(f, n) dlsym(f, n)
#define DLCLOSE(f) dlclose(f)
#define PATH_SEPARATOR '/'
#ifdef __APPLE__
#define PLUGIN_EXT "dylib"
#else
#define PLUGIN_EXT "so"
#endif
#endif