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:
@ -60,6 +60,7 @@ xcb_window_t root;
|
||||
* otherwise the root window’s default (usually 24 bit TrueColor). */
|
||||
uint8_t root_depth;
|
||||
xcb_visualid_t visual_id;
|
||||
xcb_visualtype_t *visual_type;
|
||||
xcb_colormap_t colormap;
|
||||
|
||||
struct ev_loop *main_loop;
|
||||
@ -487,6 +488,7 @@ int main(int argc, char *argv[]) {
|
||||
* transparency) and use it if so. */
|
||||
root_depth = root_screen->root_depth;
|
||||
visual_id = root_screen->root_visual;
|
||||
visual_type = get_visualtype(root_screen);
|
||||
colormap = root_screen->default_colormap;
|
||||
|
||||
DLOG("root_depth = %d, visual_id = 0x%08x.\n", root_depth, visual_id);
|
||||
|
Reference in New Issue
Block a user