gdkimage-x11: 1-bit images use their byte order for the bits too
This commit is contained in:
parent
7fb43ac250
commit
02716d0767
1 changed files with 9 additions and 0 deletions
|
|
@ -270,6 +270,13 @@ _gdk_image_new_for_depth (GdkScreen *screen,
|
|||
goto error;
|
||||
}
|
||||
|
||||
/* GdkImage has one byte order for bytes and bits; a server
|
||||
* whose bitmap bit order differs gets an unshared image,
|
||||
* which Xlib converts */
|
||||
if (private->ximage->bits_per_pixel == 1 &&
|
||||
private->ximage->bitmap_bit_order != private->ximage->byte_order)
|
||||
goto error;
|
||||
|
||||
x_shm_info->shmid = shmget (IPC_PRIVATE,
|
||||
private->ximage->bytes_per_line * private->ximage->height,
|
||||
IPC_CREAT | 0600);
|
||||
|
|
@ -335,6 +342,8 @@ _gdk_image_new_for_depth (GdkScreen *screen,
|
|||
case GDK_IMAGE_NORMAL:
|
||||
private->ximage = XCreateImage (screen_x11->xdisplay, xvisual, depth,
|
||||
ZPixmap, 0, NULL, width, height, 32, 0);
|
||||
if (private->ximage->bits_per_pixel == 1)
|
||||
private->ximage->bitmap_bit_order = private->ximage->byte_order;
|
||||
|
||||
/* Use malloc, not g_malloc here, because X will call free()
|
||||
* on this data
|
||||
|
|
|
|||
Loading…
Reference in a new issue