summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/ecore_evas/ecore_evas.c49
-rw-r--r--src/lib/ecore_evas/ecore_evas_private.h3
-rw-r--r--src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c16
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c18
-rw-r--r--src/modules/ecore_evas/engines/extn/ecore_evas_extn.c10
-rw-r--r--src/modules/ecore_evas/engines/fb/ecore_evas_fb.c28
-rw-r--r--src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c23
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c21
-rw-r--r--src/modules/ecore_evas/engines/win32/ecore_evas_win32.c18
-rw-r--r--src/modules/ecore_evas/engines/x/ecore_evas_x.c67
10 files changed, 124 insertions, 129 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 8e90539d59..9a9fbac69c 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -3746,12 +3746,7 @@ ecore_evas_sub_ecore_evas_list_get(const Ecore_Evas *ee)
3746EAPI void 3746EAPI void
3747ecore_evas_input_event_register(Ecore_Evas *ee) 3747ecore_evas_input_event_register(Ecore_Evas *ee)
3748{ 3748{
3749 ecore_event_window_register(ee->prop.window, ee, ee->evas, 3749 ecore_evas_done(ee, EINA_FALSE);
3750 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
3751 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
3752 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
3753 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
3754 _ecore_event_window_direct_cb_set((Ecore_Window)ee, _ecore_evas_input_direct_cb);
3755} 3750}
3756 3751
3757EAPI void 3752EAPI void
@@ -5089,3 +5084,45 @@ ecore_evas_callback_device_mouse_in_set(Ecore_Evas *ee,
5089 IFE; 5084 IFE;
5090 ee->func.fn_device_mouse_in = func; 5085 ee->func.fn_device_mouse_in = func;
5091} 5086}
5087
5088EAPI Evas *
5089ecore_evas_evas_new(Ecore_Evas *ee, int w, int h)
5090{
5091 Evas *e;
5092
5093 if (ee->evas) return ee->evas;
5094
5095 e = evas_new();
5096 if (!e) return NULL;
5097
5098 ee->evas = e;
5099 evas_data_attach_set(e, ee);
5100
5101 if (ECORE_EVAS_PORTRAIT(ee))
5102 {
5103 evas_output_size_set(e, w, h);
5104 evas_output_viewport_set(e, 0, 0, w, h);
5105 }
5106 else
5107 {
5108 evas_output_size_set(e, h, w);
5109 evas_output_viewport_set(e, 0, 0, h, w);
5110 }
5111
5112 return e;
5113}
5114
5115EAPI void
5116ecore_evas_done(Ecore_Evas *ee, Eina_Bool single_window)
5117{
5118 _ecore_evas_register(ee);
5119 ecore_event_window_register(ee->prop.window, ee, ee->evas,
5120 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
5121 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
5122 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
5123 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
5124 _ecore_event_window_direct_cb_set(ee->prop.window, _ecore_evas_input_direct_cb);
5125
5126 if (single_window)
5127 evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
5128}
diff --git a/src/lib/ecore_evas/ecore_evas_private.h b/src/lib/ecore_evas/ecore_evas_private.h
index 14cfae791d..3dbd61ea62 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -487,6 +487,9 @@ Eina_Bool _ecore_evas_cursors_init(Ecore_Evas *ee);
487EAPI void ecore_evas_render_wait(Ecore_Evas *ee); 487EAPI void ecore_evas_render_wait(Ecore_Evas *ee);
488EAPI Eina_Bool ecore_evas_render(Ecore_Evas *ee); 488EAPI Eina_Bool ecore_evas_render(Ecore_Evas *ee);
489 489
490EAPI Evas *ecore_evas_evas_new(Ecore_Evas *ee, int w, int h);
491EAPI void ecore_evas_done(Ecore_Evas *ee, Eina_Bool single_window);
492
490static inline Eina_Bool 493static inline Eina_Bool
491ecore_evas_render_prepare(Ecore_Evas *ee) 494ecore_evas_render_prepare(Ecore_Evas *ee)
492{ 495{
diff --git a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
index 75ba1da62c..0a95644580 100644
--- a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
+++ b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
@@ -561,16 +561,12 @@ ecore_evas_cocoa_new_internal(Ecore_Cocoa_Window *parent EINA_UNUSED, int x, int
561 ee->prop.withdrawn = EINA_TRUE; 561 ee->prop.withdrawn = EINA_TRUE;
562 ee->can_async_render = EINA_FALSE; 562 ee->can_async_render = EINA_FALSE;
563 563
564 ee->evas = evas_new(); 564 ecore_evas_evas_new(ee, w, h);
565 INF("ecore_evas: %p, evas: %p", ee, ee->evas); 565 INF("ecore_evas: %p, evas: %p", ee, ee->evas);
566 566
567 if (!ee->evas) 567 if (!ee->evas)
568 goto free_name; 568 goto free_name;
569 569
570 evas_data_attach_set(ee->evas, ee);
571 evas_output_size_set(ee->evas, w, h);
572 evas_output_viewport_set(ee->evas, 0, 0, w, h);
573
574 ee->prop.window = (Ecore_Window)ecore_cocoa_window_new(x, y, w, h); 570 ee->prop.window = (Ecore_Window)ecore_cocoa_window_new(x, y, w, h);
575 571
576 if (!ee->prop.window) 572 if (!ee->prop.window)
@@ -600,15 +596,7 @@ ecore_evas_cocoa_new_internal(Ecore_Cocoa_Window *parent EINA_UNUSED, int x, int
600 iface->window_get = _ecore_evas_cocoa_window_get; 596 iface->window_get = _ecore_evas_cocoa_window_get;
601 ee->engine.ifaces = eina_list_append(ee->engine.ifaces, iface); 597 ee->engine.ifaces = eina_list_append(ee->engine.ifaces, iface);
602 598
603 _ecore_evas_register(ee); 599 ecore_evas_done(ee, EINA_TRUE);
604 ecore_event_window_register(ee->prop.window, ee, ee->evas,
605 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
606 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
607 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
608 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
609 _ecore_event_window_direct_cb_set(ee->prop.window, _ecore_evas_input_direct_cb);
610
611 evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
612 600
613 return ee; 601 return ee;
614 602
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index 5aefe157ac..c1c60f8b15 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -1027,11 +1027,13 @@ _ecore_evas_new_internal(const char *device, int x, int y, int w, int h, Eina_Bo
1027 if (getenv("ECORE_EVAS_FORCE_SYNC_RENDER")) 1027 if (getenv("ECORE_EVAS_FORCE_SYNC_RENDER"))
1028 ee->can_async_render = 0; 1028 ee->can_async_render = 0;
1029 1029
1030 ee->evas = evas_new(); 1030 if (!ecore_evas_evas_new(ee, w, h))
1031 evas_data_attach_set(ee->evas, ee); 1031 {
1032 ERR("Can not create a Canvas.");
1033 goto eng_err;
1034 }
1035
1032 evas_output_method_set(ee->evas, method); 1036 evas_output_method_set(ee->evas, method);
1033 evas_output_size_set(ee->evas, w, h);
1034 evas_output_viewport_set(ee->evas, 0, 0, w, h);
1035 1037
1036 if (ee->can_async_render) 1038 if (ee->can_async_render)
1037 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST, 1039 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST,
@@ -1086,13 +1088,7 @@ _ecore_evas_new_internal(const char *device, int x, int y, int w, int h, Eina_Bo
1086 1088
1087 ecore_evas_data_set(ee, "device", edata->dev); 1089 ecore_evas_data_set(ee, "device", edata->dev);
1088 1090
1089 _ecore_evas_register(ee); 1091 ecore_evas_done(ee, EINA_FALSE);
1090 ecore_event_window_register(ee->prop.window, ee, ee->evas,
1091 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
1092 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
1093 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
1094 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
1095 _ecore_event_window_direct_cb_set(ee->prop.window, _ecore_evas_input_direct_cb);
1096 1092
1097 ecore_drm2_output_info_get(edata->output, NULL, NULL, &mw, &mh, NULL); 1093 ecore_drm2_output_info_get(edata->output, NULL, NULL, &mw, &mh, NULL);
1098 1094
diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
index fd4fa7972e..edbcd6f61f 100644
--- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
+++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
@@ -2155,11 +2155,13 @@ ecore_evas_extn_socket_new_internal(int w, int h)
2155 ee->prop.sticky = EINA_FALSE; 2155 ee->prop.sticky = EINA_FALSE;
2156 2156
2157 /* init evas here */ 2157 /* init evas here */
2158 ee->evas = evas_new(); 2158 if (!ecore_evas_evas_new(ee, w, h))
2159 evas_data_attach_set(ee->evas, ee); 2159 {
2160 ERR("Failed to create the canvas.");
2161 ecore_evas_free(ee);
2162 return NULL;
2163 }
2160 evas_output_method_set(ee->evas, rmethod); 2164 evas_output_method_set(ee->evas, rmethod);
2161 evas_output_size_set(ee->evas, w, h);
2162 evas_output_viewport_set(ee->evas, 0, 0, w, h);
2163 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST, _ecore_evas_ews_update_image, ee); 2165 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST, _ecore_evas_ews_update_image, ee);
2164 2166
2165 einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(ee->evas); 2167 einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(ee->evas);
diff --git a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
index b2f485e64e..17bf83f7c1 100644
--- a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
+++ b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
@@ -616,22 +616,16 @@ ecore_evas_fb_new_internal(const char *disp_name, int rotation, int w, int h)
616 ee->prop.fullscreen = EINA_FALSE; 616 ee->prop.fullscreen = EINA_FALSE;
617 ee->prop.withdrawn = EINA_TRUE; 617 ee->prop.withdrawn = EINA_TRUE;
618 ee->prop.sticky = EINA_FALSE; 618 ee->prop.sticky = EINA_FALSE;
619 ee->prop.window = 1;
619 620
620 /* init evas here */ 621 /* init evas here */
621 ee->evas = evas_new(); 622 if (!ecore_evas_evas_new(ee, w, h))
622 evas_data_attach_set(ee->evas, ee);
623 evas_output_method_set(ee->evas, rmethod);
624
625 if (ECORE_EVAS_PORTRAIT(ee))
626 { 623 {
627 evas_output_size_set(ee->evas, w, h); 624 ERR("Could not create the canvas.");
628 evas_output_viewport_set(ee->evas, 0, 0, w, h); 625 ecore_evas_free(ee);
629 } 626 return NULL;
630 else
631 {
632 evas_output_size_set(ee->evas, h, w);
633 evas_output_viewport_set(ee->evas, 0, 0, h, w);
634 } 627 }
628 evas_output_method_set(ee->evas, rmethod);
635 629
636 einfo = (Evas_Engine_Info_FB *)evas_engine_info_get(ee->evas); 630 einfo = (Evas_Engine_Info_FB *)evas_engine_info_get(ee->evas);
637 if (einfo && disp_name) 631 if (einfo && disp_name)
@@ -654,15 +648,7 @@ ecore_evas_fb_new_internal(const char *disp_name, int rotation, int w, int h)
654 return NULL; 648 return NULL;
655 } 649 }
656 650
657 ecore_evas_input_event_register(ee); 651 ecore_evas_done(ee, EINA_TRUE);
658 652
659 _ecore_evas_register(ee);
660 ecore_event_window_register(1, ee, ee->evas,
661 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
662 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
663 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
664 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
665 _ecore_event_window_direct_cb_set(1, _ecore_evas_input_direct_cb);
666 evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
667 return ee; 653 return ee;
668} 654}
diff --git a/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c b/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
index a6ddee93d2..8abc7401b6 100644
--- a/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
+++ b/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
@@ -510,12 +510,13 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu
510 ee->prop.hwsurface = hwsurface; 510 ee->prop.hwsurface = hwsurface;
511 511
512 /* init evas here */ 512 /* init evas here */
513 ee->evas = evas_new(); 513 if (!ecore_evas_evas_new(ee, w, h))
514 evas_data_attach_set(ee->evas, ee); 514 {
515 evas_output_method_set(ee->evas, rmethod); 515 ERR("Can not create Canvas.");
516 goto on_error;
517 }
516 518
517 evas_output_size_set(ee->evas, w, h); 519 evas_output_method_set(ee->evas, rmethod);
518 evas_output_viewport_set(ee->evas, 0, 0, w, h);
519 520
520 gl = !(rmethod == evas_render_method_lookup("buffer")); 521 gl = !(rmethod == evas_render_method_lookup("buffer"));
521 ee->can_async_render = gl ? EINA_FALSE : EINA_TRUE; 522 ee->can_async_render = gl ? EINA_FALSE : EINA_TRUE;
@@ -611,19 +612,13 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu
611 } 612 }
612 613
613 _ecore_evas_sdl_init(w, h); 614 _ecore_evas_sdl_init(w, h);
615 ee->prop.window = SDL_GetWindowID(swd->w);
614 616
615 ecore_event_window_register(SDL_GetWindowID(swd->w), ee, ee->evas, 617 ecore_evas_done(ee, EINA_FALSE);
616 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
617 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
618 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
619 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
620 _ecore_event_window_direct_cb_set(SDL_GetWindowID(swd->w), _ecore_evas_input_direct_cb);
621 SDL_SetWindowData(swd->w, "_Ecore_Evas", ee);
622 618
619 SDL_SetWindowData(swd->w, "_Ecore_Evas", ee);
623 SDL_ShowCursor(SDL_ENABLE); 620 SDL_ShowCursor(SDL_ENABLE);
624 621
625 _ecore_evas_register(ee);
626
627 _ecore_evas_focus_device_set(ee, NULL, EINA_TRUE); 622 _ecore_evas_focus_device_set(ee, NULL, EINA_TRUE);
628 ecore_evas_sdl_count++; 623 ecore_evas_sdl_count++;
629 return ee; 624 return ee;
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index adadf9fabc..b8f103b030 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -2529,11 +2529,13 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, i
2529 ee->prop.aux_hint.supported_list = ecore_wl2_window_aux_hints_supported_get(wdata->win); 2529 ee->prop.aux_hint.supported_list = ecore_wl2_window_aux_hints_supported_get(wdata->win);
2530 ecore_evas_aux_hint_add(ee, "wm.policy.win.msg.use", "1"); 2530 ecore_evas_aux_hint_add(ee, "wm.policy.win.msg.use", "1");
2531 2531
2532 ee->evas = evas_new(); 2532 if (!ecore_evas_evas_new(ee, ee->w + fw, ee->h + fh))
2533 evas_data_attach_set(ee->evas, ee); 2533 {
2534 ERR("Can not create Canvas.");
2535 goto eng_err;
2536 }
2537
2534 evas_output_method_set(ee->evas, method); 2538 evas_output_method_set(ee->evas, method);
2535 evas_output_size_set(ee->evas, ee->w + fw, ee->h + fh);
2536 evas_output_viewport_set(ee->evas, 0, 0, ee->w + fw, ee->h + fh);
2537 2539
2538 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST, 2540 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST,
2539 _ecore_evas_wl_common_render_updates, ee); 2541 _ecore_evas_wl_common_render_updates, ee);
@@ -2573,16 +2575,7 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, i
2573 2575
2574 _ecore_evas_wl_common_wm_rotation_protocol_set(ee); 2576 _ecore_evas_wl_common_wm_rotation_protocol_set(ee);
2575 2577
2576 _ecore_evas_register(ee); 2578 ecore_evas_done(ee, EINA_FALSE);
2577 ecore_evas_input_event_register(ee);
2578
2579 ecore_event_window_register(ee->prop.window, ee, ee->evas,
2580 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
2581 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
2582 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
2583 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
2584 _ecore_event_window_direct_cb_set(ee->prop.window,
2585 _ecore_evas_input_direct_cb);
2586 2579
2587 wdata->sync_handler = 2580 wdata->sync_handler =
2588 ecore_event_handler_add(ECORE_WL2_EVENT_SYNC_DONE, _ee_cb_sync_done, ee); 2581 ecore_event_handler_add(ECORE_WL2_EVENT_SYNC_DONE, _ee_cb_sync_done, ee);
diff --git a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
index a9e2d7b03e..974ed1b721 100644
--- a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
+++ b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
@@ -1450,10 +1450,12 @@ _ecore_evas_win32_new_internal(int (*_ecore_evas_engine_backend_init)(Ecore_Evas
1450 ee->prop.withdrawn = EINA_TRUE; 1450 ee->prop.withdrawn = EINA_TRUE;
1451 1451
1452 /* init evas here */ 1452 /* init evas here */
1453 ee->evas = evas_new(); 1453 if (!ecore_evas_evas_new(ee, width, height))
1454 evas_data_attach_set(ee->evas, ee); 1454 {
1455 evas_output_size_set(ee->evas, width, height); 1455 ERR("Can not create Canvas.");
1456 evas_output_viewport_set(ee->evas, 0, 0, width, height); 1456 free(ee);
1457 return NULL;
1458 }
1457 1459
1458 wdata->parent = parent; 1460 wdata->parent = parent;
1459 ee->prop.window = (Ecore_Window)ecore_win32_window_new(parent, x, y, width, height); 1461 ee->prop.window = (Ecore_Window)ecore_win32_window_new(parent, x, y, width, height);
@@ -1471,13 +1473,7 @@ _ecore_evas_win32_new_internal(int (*_ecore_evas_engine_backend_init)(Ecore_Evas
1471 return NULL; 1473 return NULL;
1472 } 1474 }
1473 1475
1474 _ecore_evas_register(ee); 1476 ecore_evas_done(ee, EINA_FALSE);
1475 ecore_event_window_register(ee->prop.window, ee, ee->evas,
1476 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
1477 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
1478 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
1479 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
1480 _ecore_event_window_direct_cb_set(ee->prop.window, _ecore_evas_input_direct_cb);
1481 1477
1482 return ee; 1478 return ee;
1483} 1479}
diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index 88779a2a7c..dd0cecc302 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -4089,7 +4089,13 @@ ecore_evas_software_x11_new_internal(const char *disp_name, Ecore_X_Window paren
4089 ee->can_async_render = 1; 4089 ee->can_async_render = 1;
4090 4090
4091 /* init evas here */ 4091 /* init evas here */
4092 ee->evas = evas_new(); 4092 if (!ecore_evas_evas_new(ee, w, h))
4093 {
4094 ERR("Can not create a Canvas.");
4095 ecore_evas_free(ee);
4096 return NULL;
4097 }
4098
4093 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE, 4099 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
4094 _ecore_evas_x_flush_pre, ee); 4100 _ecore_evas_x_flush_pre, ee);
4095 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_POST, 4101 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_POST,
@@ -4097,10 +4103,7 @@ ecore_evas_software_x11_new_internal(const char *disp_name, Ecore_X_Window paren
4097 if (ee->can_async_render) 4103 if (ee->can_async_render)
4098 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST, 4104 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST,
4099 _ecore_evas_x_render_updates, ee); 4105 _ecore_evas_x_render_updates, ee);
4100 evas_data_attach_set(ee->evas, ee);
4101 evas_output_method_set(ee->evas, rmethod); 4106 evas_output_method_set(ee->evas, rmethod);
4102 evas_output_size_set(ee->evas, w, h);
4103 evas_output_viewport_set(ee->evas, 0, 0, w, h);
4104 4107
4105 edata->win_root = parent; 4108 edata->win_root = parent;
4106 edata->screen_num = 0; 4109 edata->screen_num = 0;
@@ -4216,14 +4219,9 @@ ecore_evas_software_x11_new_internal(const char *disp_name, Ecore_X_Window paren
4216 _ecore_evas_x_sync_set(ee); 4219 _ecore_evas_x_sync_set(ee);
4217 4220
4218 ee->engine.func->fn_render = _ecore_evas_x_render; 4221 ee->engine.func->fn_render = _ecore_evas_x_render;
4219 _ecore_evas_register(ee); 4222
4220 ecore_x_input_multi_select(ee->prop.window); 4223 ecore_x_input_multi_select(ee->prop.window);
4221 ecore_event_window_register(ee->prop.window, ee, ee->evas, 4224 ecore_evas_done(ee, EINA_FALSE);
4222 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
4223 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
4224 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
4225 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
4226 _ecore_event_window_direct_cb_set(ee->prop.window, _ecore_evas_input_direct_cb);
4227 4225
4228 return ee; 4226 return ee;
4229} 4227}
@@ -4292,22 +4290,24 @@ ecore_evas_software_x11_pixmap_new_internal(const char *disp_name, Ecore_X_Windo
4292 ee->can_async_render = 1; 4290 ee->can_async_render = 1;
4293 4291
4294 /* init evas here */ 4292 /* init evas here */
4295 ee->evas = evas_new(); 4293 if (!ecore_evas_evas_new(ee, w, h))
4294 {
4295 ERR("Can not create Canvas.");
4296 ecore_evas_free(ee);
4297 return NULL;
4298 }
4296 4299
4297 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE, 4300 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
4298 _ecore_evas_x_flush_pre, ee); 4301 _ecore_evas_x_flush_pre, ee);
4299 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_POST, 4302 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_POST,
4300 _ecore_evas_x_flush_post, ee); 4303 _ecore_evas_x_flush_post, ee);
4301 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_PRE, 4304 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_PRE,
4302 _ecore_evas_x_render_pre, ee); 4305 _ecore_evas_x_render_pre, ee);
4303 4306
4304 if (ee->can_async_render) 4307 if (ee->can_async_render)
4305 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST, 4308 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST,
4306 _ecore_evas_x_render_updates, ee); 4309 _ecore_evas_x_render_updates, ee);
4307 evas_data_attach_set(ee->evas, ee);
4308 evas_output_method_set(ee->evas, rmethod); 4310 evas_output_method_set(ee->evas, rmethod);
4309 evas_output_size_set(ee->evas, w, h);
4310 evas_output_viewport_set(ee->evas, 0, 0, w, h);
4311 4311
4312 edata->win_root = parent; 4312 edata->win_root = parent;
4313 edata->screen_num = 0; 4313 edata->screen_num = 0;
@@ -4611,13 +4611,15 @@ ecore_evas_gl_x11_options_new_internal(const char *disp_name, Ecore_X_Window par
4611 edata->state.sticky = 0; 4611 edata->state.sticky = 0;
4612 4612
4613 /* init evas here */ 4613 /* init evas here */
4614 ee->evas = evas_new(); 4614 if (!ecore_evas_evas_new(ee, w, h))
4615 {
4616 ERR("Can not create Canvas.");
4617 ecore_evas_free(ee);
4618 return NULL;
4619 }
4615 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE, _ecore_evas_x_flush_pre, ee); 4620 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE, _ecore_evas_x_flush_pre, ee);
4616 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_POST, _ecore_evas_x_flush_post, ee); 4621 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_POST, _ecore_evas_x_flush_post, ee);
4617 evas_data_attach_set(ee->evas, ee);
4618 evas_output_method_set(ee->evas, rmethod); 4622 evas_output_method_set(ee->evas, rmethod);
4619 evas_output_size_set(ee->evas, w, h);
4620 evas_output_viewport_set(ee->evas, 0, 0, w, h);
4621 4623
4622 if (parent == 0) parent = ecore_x_window_root_first_get(); 4624 if (parent == 0) parent = ecore_x_window_root_first_get();
4623 edata->win_root = parent; 4625 edata->win_root = parent;
@@ -4664,14 +4666,9 @@ ecore_evas_gl_x11_options_new_internal(const char *disp_name, Ecore_X_Window par
4664 _ecore_evas_x_sync_set(ee); 4666 _ecore_evas_x_sync_set(ee);
4665 4667
4666 ee->engine.func->fn_render = _ecore_evas_x_render; 4668 ee->engine.func->fn_render = _ecore_evas_x_render;
4667 _ecore_evas_register(ee);
4668 ecore_x_input_multi_select(ee->prop.window); 4669 ecore_x_input_multi_select(ee->prop.window);
4669 ecore_event_window_register(ee->prop.window, ee, ee->evas, 4670
4670 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process, 4671 ecore_evas_done(ee, EINA_FALSE);
4671 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
4672 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
4673 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
4674 _ecore_event_window_direct_cb_set(ee->prop.window, _ecore_evas_input_direct_cb);
4675 4672
4676 return ee; 4673 return ee;
4677} 4674}
@@ -4752,17 +4749,19 @@ ecore_evas_gl_x11_pixmap_new_internal(const char *disp_name, Ecore_X_Window pare
4752 edata->state.sticky = 0; 4749 edata->state.sticky = 0;
4753 4750
4754 /* init evas here */ 4751 /* init evas here */
4755 ee->evas = evas_new(); 4752 if (!ecore_evas_evas_new(ee, w, h))
4756 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE, 4753 {
4754 ERR("Can not create Canvas.");
4755 ecore_evas_free(ee);
4756 return NULL;
4757 }
4758 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
4757 _ecore_evas_x_flush_pre, ee); 4759 _ecore_evas_x_flush_pre, ee);
4758 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_POST, 4760 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_POST,
4759 _ecore_evas_x_flush_post, ee); 4761 _ecore_evas_x_flush_post, ee);
4760 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_PRE, 4762 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_PRE,
4761 _ecore_evas_x_render_pre, ee); 4763 _ecore_evas_x_render_pre, ee);
4762 evas_data_attach_set(ee->evas, ee);
4763 evas_output_method_set(ee->evas, rmethod); 4764 evas_output_method_set(ee->evas, rmethod);
4764 evas_output_size_set(ee->evas, w, h);
4765 evas_output_viewport_set(ee->evas, 0, 0, w, h);
4766 4765
4767 if (ee->can_async_render) 4766 if (ee->can_async_render)
4768 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST, 4767 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST,