forked from enlightenment/enlightenment
move comp canvas resize callback to monitor elm win geometry
elm win intercepts this callback in order to maintain internal sizing for use with elm widgets on the compositor canvas, so it's necessary to get the callback from this object in order to accurately update the canvas during resizes
This commit is contained in:
parent
a03f80a845
commit
982a4d249b
|
@ -989,6 +989,17 @@ _e_comp_act_redirect_toggle_go(E_Object * obj EINA_UNUSED, const char *params EI
|
|||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static void
|
||||
_e_comp_resize(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||
{
|
||||
int w, h;
|
||||
|
||||
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
|
||||
if ((w == e_comp->w) && (h == e_comp->h)) return;
|
||||
e_randr2_screens_setup(w, h);
|
||||
e_comp_canvas_update();
|
||||
}
|
||||
|
||||
EINTERN Eina_Bool
|
||||
e_comp_init(void)
|
||||
{
|
||||
|
@ -1131,6 +1142,7 @@ out:
|
|||
e_screensaver_update();
|
||||
}
|
||||
e_comp->elm = elm_win_fake_add(e_comp->ee);
|
||||
evas_object_event_callback_add(e_comp->elm, EVAS_CALLBACK_RESIZE, _e_comp_resize, NULL);
|
||||
elm_win_fullscreen_set(e_comp->elm, 1);
|
||||
evas_object_show(e_comp->elm);
|
||||
e_util_env_set("HYBRIS_EGLPLATFORM", NULL);
|
||||
|
|
|
@ -217,13 +217,6 @@ _e_comp_canvas_cb_zone_sort(const void *data1, const void *data2)
|
|||
return z1->num - z2->num;
|
||||
}
|
||||
|
||||
static void
|
||||
_e_comp_canvas_resize(Ecore_Evas *ee EINA_UNUSED)
|
||||
{
|
||||
e_randr2_screens_setup(e_comp->w, e_comp->h);
|
||||
e_comp_canvas_update();
|
||||
}
|
||||
|
||||
static void
|
||||
_e_comp_canvas_prerender(Ecore_Evas *ee EINA_UNUSED)
|
||||
{
|
||||
|
@ -292,7 +285,6 @@ e_comp_canvas_init(int w, int h)
|
|||
E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_OFF, _e_comp_cb_screensaver_off, NULL);
|
||||
|
||||
ecore_evas_callback_pre_render_set(e_comp->ee, _e_comp_canvas_prerender);
|
||||
ecore_evas_callback_resize_set(e_comp->ee, _e_comp_canvas_resize);
|
||||
ecore_evas_resize(e_comp->ee, w, h);
|
||||
|
||||
return EINA_TRUE;
|
||||
|
|
Loading…
Reference in New Issue