More error checking, bugfix for mplayer (use visual CopyFromParent)

This commit is contained in:
Michael Stapelberg
2009-02-14 03:46:20 +01:00
parent fb4c851e2a
commit 031cf4ccda
3 changed files with 12 additions and 8 deletions

View File

@ -162,7 +162,7 @@ void reparent_window(xcb_connection_t *conn, xcb_window_t child,
i3Font *font = load_font(conn, pattern);
/* Yo dawg, I heard you like windows, so I create a window around your window… */
xcb_create_window(conn,
xcb_void_cookie_t cookie = xcb_create_window_checked(conn,
depth,
new->frame,
root,
@ -172,9 +172,10 @@ void reparent_window(xcb_connection_t *conn, xcb_window_t child,
height + 2 + 2 + font->height, /* 2 px border plus fonts height */
0, /* border_width = 0, we draw our own borders */
XCB_WINDOW_CLASS_INPUT_OUTPUT,
visual,
XCB_WINDOW_CLASS_COPY_FROM_PARENT,
mask,
values);
check_error(conn, cookie, "Could not create frame");
xcb_change_save_set(conn, XCB_SET_MODE_INSERT, child);
/* Map the window on the screen (= make it visible) */