diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2011-12-07 18:23:24 -0500 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2011-12-07 18:23:24 -0500 |
commit | c01bafa96d8c4152ea5c2f9f58c7d4436a17edf1 (patch) | |
tree | 9635fbadc5e699e9b38abe2eea0d5dc5a2d1e8ff | |
parent | ab5d6813a4e2d32991c11f4b7778e46680fd5b03 (diff) |
Fix for non-a8r8g8b8 visuals
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | window.c | 8 |
2 files changed, 6 insertions, 4 deletions
@@ -1,4 +1,4 @@ -CFLAGS = `pkg-config --cflags pixman-1 x11` -Wall +CFLAGS = `pkg-config --cflags pixman-1 x11` -Wall -g LDFLAGS = `pkg-config --libs pixman-1 x11` pintria: window.c window.h main.c @@ -206,7 +206,7 @@ ws_create_window (ws_t *ws, window->ref_count = 1; window->backing_store = - pixman_image_create_bits (PIXMAN_a8r8g8b8, width, height, NULL, -1); + pixman_image_create_bits (ws->format, width, height, NULL, -1); window->ws = ws; window->x = x; window->y = y; @@ -269,7 +269,8 @@ ws_window_move_resize (window_t *window, if (width != old_width || height != old_height) { pixman_image_t *new_backing = - pixman_image_create_bits (PIXMAN_a8r8g8b8, width, height, NULL, -1); + pixman_image_create_bits ( + window->ws->format, width, height, NULL, -1); pixman_image_composite32 ( PIXMAN_OP_SRC, @@ -316,8 +317,9 @@ ws_window_copy_area (window_t *window, int width, int height) { + pixman_format_code_t format = pixman_image_get_format (window->backing_store); pixman_image_t *tmp = - pixman_image_create_bits (PIXMAN_a8r8g8b8, width, height, NULL, -1); + pixman_image_create_bits (format, width, height, NULL, -1); pixman_image_composite32 (PIXMAN_OP_SRC, window->backing_store, NULL, tmp, |