From f28d0af32e28005a4b28857fa4fd4232d6849442 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Fri, 17 Nov 2023 00:19:53 +0100 Subject: Simplify visual type search and fix window depth Transparency started working due to the explicit selection of a depth (preferring 32 bit) instead of copying that of the root window --- window.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'window.c') diff --git a/window.c b/window.c index 027fdb1..e7391be 100644 --- a/window.c +++ b/window.c @@ -149,13 +149,14 @@ Window *window_create(Connection *con) win->window = xcb_generate_id(con->connection); xcb_create_window(con->connection, - XCB_COPY_FROM_PARENT, - win->window, con->screen->root, + con->screen_depth, + win->window, + con->screen->root, win->x, win->y, win->width, win->height, 0, // border - XCB_WINDOW_CLASS_INPUT_OUTPUT, - con->screen->root_visual, + XCB_WINDOW_CLASS_COPY_FROM_PARENT, + con->visual_type->visual_id, value_mask, value_list); -- cgit v1.2.3