summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2012-09-27 23:23:55 +0200
committerPeter Wu <lekensteyn@gmail.com>2012-09-27 23:23:55 +0200
commit0ea7392729d9f7f12898b049117ad2fd61898598 (patch)
treed506693285487b749406c133579872164b0ca3b6
parent404f75edd88560f7c5ab76c0e083d0c44a92fb58 (diff)
downloadc-files-0ea7392729d9f7f12898b049117ad2fd61898598.tar.gz
xcbviewfs: larger screen, black background, remove bg from gc
-rw-r--r--xcbviewfs.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/xcbviewfs.c b/xcbviewfs.c
index 157d68d..1e5933a 100644
--- a/xcbviewfs.c
+++ b/xcbviewfs.c
@@ -74,14 +74,15 @@ int main(int argc, char **argv) {
win = xcb_generate_id(c);
/* For each mask, need to add valwin item in order as defined by the
* enum, see See http://xcb.freedesktop.org/tutorial/events/ */
- uint32_t mask = XCB_CW_EVENT_MASK;
+ uint32_t mask = XCB_CW_BACK_PIXEL | XCB_CW_EVENT_MASK;
uint32_t valwin[] = {
+ screen->black_pixel,
XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_KEY_PRESS,
};
xcb_create_window(c, 0, win, /* conn, depth, WinID */
screen->root, /* parent */
0, 0, /* x y */
- 100, 100, /* width height */
+ screen->width_in_pixels, screen->height_in_pixels,
0, /* border_width */
XCB_WINDOW_CLASS_INPUT_OUTPUT, /* class */
screen->root_visual,
@@ -172,11 +173,7 @@ int main(int argc, char **argv) {
xcb_create_pixmap(c, 24, pmap, win, image_width, image_height);
gc = xcb_generate_id(c);
- uint32_t mask = XCB_GC_BACKGROUND;
- uint32_t value_list[] = {
- screen->black_pixel
- };
- xcb_create_gc(c, gc, pmap, mask, value_list);
+ xcb_create_gc(c, gc, pmap, 0, NULL);
xcb_image_put(c, pmap, gc, img, 0, 0, 0);
xcb_flush(c);