From f25f609de9ed8060212674ce5828e55f15e08780 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Wed, 17 Dec 2008 08:15:01 +0000 Subject: [PATCH] vtorri's xcb x11 engine merge for expedite SVN revision: 38174 --- src/bin/Makefile.am | 4 ++-- src/bin/engine_software_x11.c | 10 ++++++---- src/bin/engine_software_xcb.c | 25 ++++++++++++++----------- src/bin/main.c | 2 +- 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index fda7516..cb1b952 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am @@ -83,7 +83,7 @@ expedite_SOURCES += \ engine_gl_x11.c engine_gl_x11.h endif -if BUILD_XCB +if BUILD_SOFTWARE_XCB expedite_SOURCES += \ engine_software_xcb.c engine_software_xcb.h endif @@ -120,7 +120,7 @@ endif if BUILD_QUARTZ expedite_SOURCES += \ -engine_quartz.h +engine_quartz.m engine_quartz.h ### add to SOURCES one we know how to fix: # /usr/share/automake-1.9/am/depend2.am: am__fastdepOBJC does not appear in diff --git a/src/bin/engine_software_x11.c b/src/bin/engine_software_x11.c index 0e17180..16324ee 100644 --- a/src/bin/engine_software_x11.c +++ b/src/bin/engine_software_x11.c @@ -38,10 +38,12 @@ engine_software_x11_args(int argc, char **argv) return 0; } - einfo->info.display = disp; - einfo->info.visual = einfo->func.best_visual_get(disp, DefaultScreen(disp)); - einfo->info.colormap = einfo->func.best_colormap_get(disp, DefaultScreen(disp)); - einfo->info.depth = einfo->func.best_depth_get(disp, DefaultScreen(disp)); + einfo->info.backend = 0; + einfo->info.connection = disp; + einfo->info.screen = NULL; + einfo->info.visual = einfo->func.best_visual_get(0, disp, DefaultScreen(disp)); + einfo->info.colormap = einfo->func.best_colormap_get(0, disp, DefaultScreen(disp)); + einfo->info.depth = einfo->func.best_depth_get(0, disp, DefaultScreen(disp)); einfo->info.rotation = 0; einfo->info.debug = 0; attr.backing_store = NotUseful; diff --git a/src/bin/engine_software_xcb.c b/src/bin/engine_software_xcb.c index afe6211..c7388ae 100644 --- a/src/bin/engine_software_xcb.c +++ b/src/bin/engine_software_xcb.c @@ -2,7 +2,7 @@ #include #include -#include +#include #define XK_MISCELLANY #include @@ -43,7 +43,7 @@ engine_software_xcb_args(int argc, char **argv) struct xcb_size_hints_t hints; uint32_t value_list[6]; xcb_screen_iterator_t iter; - Evas_Engine_Info_Software_Xcb *einfo; + Evas_Engine_Info_Software_X11 *einfo; xcb_intern_atom_reply_t *reply; char *str; xcb_intern_atom_cookie_t cookie1; @@ -58,6 +58,7 @@ engine_software_xcb_args(int argc, char **argv) xcb_atom_t wm_size_hint; uint32_t value_mask; int s; + int s_tmp; int l1; int l2; int i; @@ -76,27 +77,29 @@ engine_software_xcb_args(int argc, char **argv) conn = xcb_connect(NULL, &s); if (!conn) return 0; + s_tmp = s; iter = xcb_setup_roots_iterator(xcb_get_setup(conn)); - for (; iter.rem; --s, xcb_screen_next (&iter)) - if (s == 0) + for (; iter.rem; --s_tmp, xcb_screen_next (&iter)) + if (s_tmp == 0) { screen = iter.data; break; } - evas_output_method_set(evas, evas_render_method_lookup("software_xcb")); - einfo = (Evas_Engine_Info_Software_Xcb *)evas_engine_info_get(evas); + evas_output_method_set(evas, evas_render_method_lookup("software_x11")); + einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(evas); if (!einfo) { printf("Evas does not support the Software XCB Engine\n"); return 0; } - einfo->info.conn = conn; + einfo->info.backend = 1; + einfo->info.connection = conn; einfo->info.screen = screen; - einfo->info.visual = einfo->func.best_visual_get(screen); - einfo->info.colormap = einfo->func.best_colormap_get(screen); - einfo->info.depth = einfo->func.best_depth_get(screen); + einfo->info.visual = einfo->func.best_visual_get(1, conn, s); + einfo->info.colormap = einfo->func.best_colormap_get(1, conn, s); + einfo->info.depth = einfo->func.best_depth_get(1, conn, s); einfo->info.rotation = 0; einfo->info.debug = 0; @@ -121,7 +124,7 @@ engine_software_xcb_args(int argc, char **argv) einfo->info.depth, win, screen->root, 0, 0, win_w, win_h, 0, XCB_WINDOW_CLASS_INPUT_OUTPUT, - einfo->info.visual->visual_id, + ((xcb_visualtype_t *)einfo->info.visual)->visual_id, value_mask, value_list); einfo->info.drawable = win; diff --git a/src/bin/main.c b/src/bin/main.c index ab23b42..8914339 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -1211,7 +1211,7 @@ _engine_args(int argc, char **argv) if (engine_gl_x11_args(argc, argv)) loop_func = engine_gl_x11_loop; #endif -#if BUILD_XCB +#if HAVE_EVAS_SOFTWARE_XCB if (engine_software_xcb_args(argc, argv)) loop_func = engine_software_xcb_loop; #endif