Migrate i3 rendering to cairo.

This patch migrates all decoration rendering of i3 to cairo. Using the
compile switch CAIRO_SUPPORT, rendering can be switched back to the
previous XCB behavior, just like with the previous migration to cairo
in i3bar.

This patch also fixes a bug in draw_util.c where copying one surface
to another would use incorrect coordinates if the source coordinates
are not 0, 0.

Furthermore, this patch implicitly fixes some minor issues in the
decoration rendering which would be ignored previously due to the fact
that errors would only show up in the event queue, but not cause the
rendering code path to crash. One example is zero-height pixmaps which
are not allowed. Using cairo, these would cause i3 to instantly segfault,
so this patch avoids this.

Lastly, this patch annotates other issues found but not fixed in this patch
using TODO comments, e.g., the zero-height check not working correctly
and the comment that it should probably work the same way for zero-width
pixmaps.

relates to #1278
This commit is contained in:
Ingo Bürk
2015-11-16 21:26:06 +01:00
parent d9bbfb7b35
commit b665049883
11 changed files with 276 additions and 207 deletions

View File

@ -551,11 +551,10 @@ struct Con {
* change. */
uint8_t ignore_unmap;
/* ids/pixmap/graphics context for the frame window */
/* The surface used for the frame window. */
surface_t frame;
surface_t frame_buffer;
bool pixmap_recreated;
xcb_window_t frame;
xcb_pixmap_t pixmap;
xcb_gcontext_t pm_gc;
enum {
CT_ROOT = 0,