Attempt to fix some issues with popups: render to a pixmap instead of the window to prevent issues with XRENDER and draw the border manually.