diff -aur blackbox-0.70.1.orig/src/Window.cc blackbox-0.70.1/src/Window.cc --- blackbox-0.70.1.orig/src/Window.cc 2005-10-18 10:01:41.000000000 +0200 +++ blackbox-0.70.1/src/Window.cc 2006-02-04 21:41:22.000000000 +0100 @@ -1146,7 +1146,13 @@ frame.window = createToplevelWindow(); blackbox->insertEventHandler(frame.window, this); - frame.plate = createChildWindow(frame.window, NoEventMask); + XWindowAttributes child_attrs; + Status stfu = XGetWindowAttributes(blackbox->XDisplay(), w, &child_attrs); + if (stfu != BadDrawable && stfu != BadWindow && child_attrs.depth == 32) + frame.plate = createChildWindow(frame.window, NoEventMask, &child_attrs); + else + frame.plate = createChildWindow(frame.window, NoEventMask); + blackbox->insertEventHandler(frame.plate, this); if (client.decorations & WindowDecorationTitlebar) @@ -1320,6 +1326,27 @@ create_mask, &attrib_create); } +Window BlackboxWindow::createChildWindow(Window parent, + unsigned long event_mask, + XWindowAttributes *extra) +{ + Cursor cursor = None; + XSetWindowAttributes attrib_create; + unsigned long create_mask = CWEventMask; + + attrib_create.event_mask = event_mask; + attrib_create.colormap = extra->colormap; + + if (cursor) { + create_mask |= CWCursor; + attrib_create.cursor = cursor; + } + + return XCreateWindow(blackbox->XDisplay(), parent, 0, 0, 1, 1, 0, + extra->depth, InputOutput, + extra->visual, + create_mask, &attrib_create); +} /* * Reparents the client window into the newly created frame. diff -aur blackbox-0.70.1.orig/src/Window.hh blackbox-0.70.1/src/Window.hh --- blackbox-0.70.1.orig/src/Window.hh 2005-04-18 15:25:16.000000000 +0200 +++ blackbox-0.70.1/src/Window.hh 2006-02-04 21:41:08.000000000 +0100 @@ -222,6 +222,8 @@ Window createToplevelWindow(); Window createChildWindow(Window parent, unsigned long event_mask, Cursor = None); + Window createChildWindow(Window parent, unsigned long event_mask, + XWindowAttributes *extra); void associateClientWindow(void);