wait for first expose in x11 engines before beginning to avoid wm delay.
SVN revision: 39751
This commit is contained in:
parent
c4491666de
commit
518b6dc1dd
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
static Display *disp = NULL;
|
static Display *disp = NULL;
|
||||||
static Window win = 0;
|
static Window win = 0;
|
||||||
|
static int first_expose = 0;
|
||||||
|
|
||||||
int
|
int
|
||||||
engine_gl_x11_args(int argc, char **argv)
|
engine_gl_x11_args(int argc, char **argv)
|
||||||
|
@ -76,6 +77,8 @@ engine_gl_x11_args(int argc, char **argv)
|
||||||
XSetWMNormalHints(disp, win, &szhints);
|
XSetWMNormalHints(disp, win, &szhints);
|
||||||
XMapWindow(disp, win);
|
XMapWindow(disp, win);
|
||||||
XSync(disp, False);
|
XSync(disp, False);
|
||||||
|
while (!first_expose)
|
||||||
|
engine_gl_x11_loop();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,6 +115,7 @@ engine_gl_x11_loop(void)
|
||||||
evas_event_feed_mouse_move(evas, ev.xmotion.x, ev.xmotion.y, 0, NULL);
|
evas_event_feed_mouse_move(evas, ev.xmotion.x, ev.xmotion.y, 0, NULL);
|
||||||
break;
|
break;
|
||||||
case Expose:
|
case Expose:
|
||||||
|
first_expose = 1;
|
||||||
evas_damage_rectangle_add(evas,
|
evas_damage_rectangle_add(evas,
|
||||||
ev.xexpose.x,
|
ev.xexpose.x,
|
||||||
ev.xexpose.y,
|
ev.xexpose.y,
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
static Display *disp = NULL;
|
static Display *disp = NULL;
|
||||||
static Window win = 0;
|
static Window win = 0;
|
||||||
|
static first_expose = 0;
|
||||||
|
|
||||||
int
|
int
|
||||||
engine_software_16_x11_args(int argc, char **argv)
|
engine_software_16_x11_args(int argc, char **argv)
|
||||||
|
@ -73,6 +74,8 @@ engine_software_16_x11_args(int argc, char **argv)
|
||||||
XSetWMNormalHints(disp, win, &szhints);
|
XSetWMNormalHints(disp, win, &szhints);
|
||||||
XMapWindow(disp, win);
|
XMapWindow(disp, win);
|
||||||
XSync(disp, False);
|
XSync(disp, False);
|
||||||
|
while (!first_expose)
|
||||||
|
engine_software_16_x11_loop();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,6 +112,7 @@ engine_software_16_x11_loop(void)
|
||||||
evas_event_feed_mouse_move(evas, ev.xmotion.x, ev.xmotion.y, 0, NULL);
|
evas_event_feed_mouse_move(evas, ev.xmotion.x, ev.xmotion.y, 0, NULL);
|
||||||
break;
|
break;
|
||||||
case Expose:
|
case Expose:
|
||||||
|
first_expose = 1;
|
||||||
evas_damage_rectangle_add(evas,
|
evas_damage_rectangle_add(evas,
|
||||||
ev.xexpose.x,
|
ev.xexpose.x,
|
||||||
ev.xexpose.y,
|
ev.xexpose.y,
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
static Display *disp = NULL;
|
static Display *disp = NULL;
|
||||||
static Window win = 0;
|
static Window win = 0;
|
||||||
|
static int first_expose = 0;
|
||||||
|
|
||||||
int
|
int
|
||||||
engine_software_x11_args(int argc, char **argv)
|
engine_software_x11_args(int argc, char **argv)
|
||||||
|
@ -80,6 +81,8 @@ engine_software_x11_args(int argc, char **argv)
|
||||||
XSetWMNormalHints(disp, win, &szhints);
|
XSetWMNormalHints(disp, win, &szhints);
|
||||||
XMapWindow(disp, win);
|
XMapWindow(disp, win);
|
||||||
XSync(disp, False);
|
XSync(disp, False);
|
||||||
|
while (!first_expose)
|
||||||
|
engine_software_x11_loop();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,6 +119,7 @@ engine_software_x11_loop(void)
|
||||||
evas_event_feed_mouse_move(evas, ev.xmotion.x, ev.xmotion.y, 0, NULL);
|
evas_event_feed_mouse_move(evas, ev.xmotion.x, ev.xmotion.y, 0, NULL);
|
||||||
break;
|
break;
|
||||||
case Expose:
|
case Expose:
|
||||||
|
first_expose = 1;
|
||||||
evas_damage_rectangle_add(evas,
|
evas_damage_rectangle_add(evas,
|
||||||
ev.xexpose.x,
|
ev.xexpose.x,
|
||||||
ev.xexpose.y,
|
ev.xexpose.y,
|
||||||
|
|
|
@ -34,8 +34,9 @@ struct xcb_size_hints_t {
|
||||||
|
|
||||||
|
|
||||||
static xcb_connection_t *conn = NULL;
|
static xcb_connection_t *conn = NULL;
|
||||||
static xcb_screen_t *screen = NULL;
|
static xcb_screen_t *screen = NULL;
|
||||||
static xcb_window_t win = 0;
|
static xcb_window_t win = 0;
|
||||||
|
static int first_expose = 0;
|
||||||
|
|
||||||
int
|
int
|
||||||
engine_software_xcb_args(int argc, char **argv)
|
engine_software_xcb_args(int argc, char **argv)
|
||||||
|
@ -130,7 +131,7 @@ engine_software_xcb_args(int argc, char **argv)
|
||||||
einfo->info.drawable = win;
|
einfo->info.drawable = win;
|
||||||
|
|
||||||
xcb_map_window(conn, win);
|
xcb_map_window(conn, win);
|
||||||
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
||||||
{
|
{
|
||||||
printf("Evas can not setup the informations of the Software XCB Engine\n");
|
printf("Evas can not setup the informations of the Software XCB Engine\n");
|
||||||
|
@ -202,6 +203,8 @@ engine_software_xcb_args(int argc, char **argv)
|
||||||
|
|
||||||
free(xcb_get_input_focus_reply(conn, xcb_get_input_focus_unchecked(conn), NULL));
|
free(xcb_get_input_focus_reply(conn, xcb_get_input_focus_unchecked(conn), NULL));
|
||||||
|
|
||||||
|
while (!first_expose)
|
||||||
|
engine_software_xcb_loop();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,6 +255,7 @@ engine_software_xcb_loop(void)
|
||||||
|
|
||||||
e = (xcb_expose_event_t *)ev;
|
e = (xcb_expose_event_t *)ev;
|
||||||
|
|
||||||
|
first_expose = 1;
|
||||||
evas_damage_rectangle_add(evas,
|
evas_damage_rectangle_add(evas,
|
||||||
e->x,
|
e->x,
|
||||||
e->y,
|
e->y,
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
static Display *disp = NULL;
|
static Display *disp = NULL;
|
||||||
static Window win = 0;
|
static Window win = 0;
|
||||||
|
static int first_expose = 0;
|
||||||
|
|
||||||
int
|
int
|
||||||
engine_xrender_x11_args(int argc, char **argv)
|
engine_xrender_x11_args(int argc, char **argv)
|
||||||
|
@ -76,6 +77,8 @@ engine_xrender_x11_args(int argc, char **argv)
|
||||||
XSetWMNormalHints(disp, win, &szhints);
|
XSetWMNormalHints(disp, win, &szhints);
|
||||||
XMapWindow(disp, win);
|
XMapWindow(disp, win);
|
||||||
XSync(disp, False);
|
XSync(disp, False);
|
||||||
|
while (!first_expose)
|
||||||
|
engine_xrender_x11_loop();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,6 +115,7 @@ engine_xrender_x11_loop(void)
|
||||||
evas_event_feed_mouse_move(evas, ev.xmotion.x, ev.xmotion.y, 0, NULL);
|
evas_event_feed_mouse_move(evas, ev.xmotion.x, ev.xmotion.y, 0, NULL);
|
||||||
break;
|
break;
|
||||||
case Expose:
|
case Expose:
|
||||||
|
first_expose = 1;
|
||||||
evas_damage_rectangle_add(evas,
|
evas_damage_rectangle_add(evas,
|
||||||
ev.xexpose.x,
|
ev.xexpose.x,
|
||||||
ev.xexpose.y,
|
ev.xexpose.y,
|
||||||
|
|
|
@ -34,8 +34,9 @@ struct xcb_size_hints_t {
|
||||||
|
|
||||||
|
|
||||||
static xcb_connection_t *conn = NULL;
|
static xcb_connection_t *conn = NULL;
|
||||||
static xcb_screen_t *screen = NULL;
|
static xcb_screen_t *screen = NULL;
|
||||||
static xcb_window_t win = 0;
|
static xcb_window_t win = 0;
|
||||||
|
static int first_expose = 0;
|
||||||
|
|
||||||
static xcb_visualtype_t *
|
static xcb_visualtype_t *
|
||||||
_engine_xrender_visual_get(xcb_connection_t *conn, xcb_screen_t *screen)
|
_engine_xrender_visual_get(xcb_connection_t *conn, xcb_screen_t *screen)
|
||||||
|
@ -217,6 +218,8 @@ engine_xrender_xcb_args(int argc, char **argv)
|
||||||
|
|
||||||
free(xcb_get_input_focus_reply(conn, xcb_get_input_focus_unchecked(conn), NULL));
|
free(xcb_get_input_focus_reply(conn, xcb_get_input_focus_unchecked(conn), NULL));
|
||||||
|
|
||||||
|
while (!first_expose)
|
||||||
|
engine_xrender_xcb_loop();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,6 +270,7 @@ engine_xrender_xcb_loop(void)
|
||||||
|
|
||||||
e = (xcb_expose_event_t *)ev;
|
e = (xcb_expose_event_t *)ev;
|
||||||
|
|
||||||
|
first_expose = 1;
|
||||||
evas_damage_rectangle_add(evas,
|
evas_damage_rectangle_add(evas,
|
||||||
e->x,
|
e->x,
|
||||||
e->y,
|
e->y,
|
||||||
|
|
|
@ -91,8 +91,8 @@ _ui_all(void)
|
||||||
if (mi->func) mi->func();
|
if (mi->func) mi->func();
|
||||||
while (p_fps == 0.0)
|
while (p_fps == 0.0)
|
||||||
{
|
{
|
||||||
ui_loop();
|
|
||||||
engine_loop();
|
engine_loop();
|
||||||
|
ui_loop();
|
||||||
evas_render(evas);
|
evas_render(evas);
|
||||||
}
|
}
|
||||||
/* This give time to delete the objects of the previous test and make
|
/* This give time to delete the objects of the previous test and make
|
||||||
|
@ -463,7 +463,7 @@ ui_args(int argc, char **argv)
|
||||||
if (!strcmp(argv[i], "-a"))
|
if (!strcmp(argv[i], "-a"))
|
||||||
{
|
{
|
||||||
run_all = 1;
|
run_all = 1;
|
||||||
exit_after_test = 1;
|
exit_after_test = 1;
|
||||||
}
|
}
|
||||||
else if ((!strcmp(argv[i], "-t")) && (i < (argc - 1)))
|
else if ((!strcmp(argv[i], "-t")) && (i < (argc - 1)))
|
||||||
{
|
{
|
||||||
|
@ -559,7 +559,6 @@ ui_loop(void)
|
||||||
evas_object_color_set(o, a, a, a, a);
|
evas_object_color_set(o, a, a, a, a);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
|
||||||
|
|
||||||
if (i == menu_sel)
|
if (i == menu_sel)
|
||||||
{
|
{
|
||||||
a = menu_anim - (double)i;
|
a = menu_anim - (double)i;
|
||||||
|
@ -619,7 +618,8 @@ ui_loop(void)
|
||||||
void
|
void
|
||||||
ui_menu(void)
|
ui_menu(void)
|
||||||
{
|
{
|
||||||
evas_object_text_text_set(o_byline, "LEFT/RIGHT - select, ENTER - select, ESCAPE - exit.");
|
evas_object_text_text_set
|
||||||
|
(o_byline, "LEFT/RIGHT - select, ENTER - select, ESCAPE - exit.");
|
||||||
menu_active = 1;
|
menu_active = 1;
|
||||||
key_func = NULL;
|
key_func = NULL;
|
||||||
loop_func = NULL;
|
loop_func = NULL;
|
||||||
|
|
Loading…
Reference in New Issue