goto out;
}
+ xfc->image->byte_order = LSBFirst;
+ xfc->image->bitmap_bit_order = LSBFirst;
+
ret = xf_desktop_resize(context);
out:
xf_unlock_x11(xfc, TRUE);
ZPixmap, 0, (char*) gdi->primary_buffer,
settings->DesktopWidth, settings->DesktopHeight,
xfc->scanline_pad, gdi->stride);
+ xfc->image->byte_order = LSBFirst;
+ xfc->image->bitmap_bit_order = LSBFirst;
}
return TRUE;
}
}
-static void xf_calculate_color_shifts(UINT32 mask, UINT8* rsh, UINT8* lsh)
-{
- for (*lsh = 0; !(mask & 1); mask >>= 1)
- (*lsh)++;
-
- for (*rsh = 8; mask; mask >>= 1)
- (*rsh)--;
-}
-
static BOOL xf_get_pixmap_info(xfContext* xfc)
{
int i;
if (xfc->visual)
{
/*
- * Detect if the server visual has an inverted colormap
- * (BGR vs RGB, or red being the least significant byte)
- */
+ * Detect if the server visual has an inverted colormap
+ * (BGR vs RGB, or red being the least significant byte)
+ */
if (vi->red_mask & 0xFF)
{
- xfc->invert = TRUE;
+ xfc->invert = FALSE;
}
-
- /* calculate color shifts required for rdp order color conversion */
- xf_calculate_color_shifts(vi->red_mask, &xfc->red_shift_r, &xfc->red_shift_l);
- xf_calculate_color_shifts(vi->green_mask, &xfc->green_shift_r,
- &xfc->green_shift_l);
- xf_calculate_color_shifts(vi->blue_mask, &xfc->blue_shift_r,
- &xfc->blue_shift_l);
}
XFree(vis);
xfc->screen = ScreenOfDisplay(xfc->display, xfc->screen_number);
xfc->depth = DefaultDepthOfScreen(xfc->screen);
xfc->big_endian = (ImageByteOrder(xfc->display) == MSBFirst);
- xfc->invert = (ImageByteOrder(xfc->display) == MSBFirst) ? FALSE : TRUE;
+ xfc->invert = TRUE;
xfc->complex_regions = TRUE;
xfc->x11event = CreateFileDescriptorEvent(NULL, FALSE, FALSE, xfc->xfds,
WINPR_FD_READ);
&xfc->context.gdi->palette, FREERDP_FLIP_NONE);
image = XCreateImage(xfc->display, xfc->visual, xfc->depth,
ZPixmap, 0, (char*) cdata, width, height, xfc->scanline_pad, 0);
+ image->byte_order = LSBFirst;
+ image->bitmap_bit_order = LSBFirst;
gc = XCreateGC(xfc->display, xfc->drawable, 0, NULL);
XPutImage(xfc->display, bitmap, gc, image, 0, 0, 0, 0, width, height);
XFree(image);
bitmap = XCreatePixmap(xfc->display, xfc->drawable, width, height, 1);
image = XCreateImage(xfc->display, xfc->visual, 1,
ZPixmap, 0, (char*) data, width, height, 8, scanline);
+ image->byte_order = LSBFirst;
+ image->bitmap_bit_order = LSBFirst;
XPutImage(xfc->display, bitmap, xfc->gc_mono, image, 0, 0, 0, 0, width, height);
XFree(image);
return bitmap;
if (!image)
break;
+ image->byte_order = LSBFirst;
+ image->bitmap_bit_order = LSBFirst;
+
XPutImage(xfc->display, xfc->primary, xfc->gc, image, 0, 0, left, top, width, height);
XFree(image);
ret = xf_gdi_surface_update_frame(xfc, left, top, width, height);
goto error_surface_image;
}
+ surface->image->byte_order = LSBFirst;
+ surface->image->bitmap_bit_order = LSBFirst;
+
surface->gdi.outputMapped = FALSE;
region16_init(&surface->gdi.invalidRegion);
if (context->SetSurfaceData(context, surface->gdi.surfaceId, (void*) surface) != CHANNEL_RC_OK)
xbitmap->image = XCreateImage(xfc->display, xfc->visual, xfc->depth,
ZPixmap, 0, (char*) bitmap->data, bitmap->width, bitmap->height,
xfc->scanline_pad, 0);
-
if (!xbitmap->image)
goto unlock;
+ xbitmap->image->byte_order = LSBFirst;
+ xbitmap->image->bitmap_bit_order = LSBFirst;
+
XPutImage(xfc->display, xbitmap->pixmap, xfc->gc, xbitmap->image, 0, 0, 0, 0, bitmap->width,
bitmap->height);
}
return FALSE;
if (!xfc->invert)
- CursorFormat = PIXEL_FORMAT_RGBA32;
+ CursorFormat = (!xfc->big_endian) ? PIXEL_FORMAT_RGBA32 : PIXEL_FORMAT_ABGR32;
else
- CursorFormat = PIXEL_FORMAT_BGRA32;
+ CursorFormat = (!xfc->big_endian) ? PIXEL_FORMAT_BGRA32 : PIXEL_FORMAT_ARGB32;
xf_lock_x11(xfc, FALSE);
ZeroMemory(&ci, sizeof(ci));
UINT16 frame_x2;
UINT16 frame_y2;
- UINT8 red_shift_l;
- UINT8 red_shift_r;
- UINT8 green_shift_l;
- UINT8 green_shift_r;
- UINT8 blue_shift_l;
- UINT8 blue_shift_r;
-
int XInputOpcode;
int savedWidth;