raster pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=e1c31206893e837e79817603f900c48a694a9f1a
commit e1c31206893e837e79817603f900c48a694a9f1a Author: Carsten Haitzler (Rasterman) <[email protected]> Date: Fri Feb 10 19:23:43 2017 +0900 e - wayland - fix double-resize if e wants a different initial size let's say you sue tiling or some module and it wants a window by default to maximize or fill the screen or be size XxY ... this stops the client first having a buffer smaller (or larger) and then sizing down rendering 2 times (one of the renders is pointless). this makes initial buffer render/show seamless as it should be in wayland. --- src/bin/e_client.c | 62 +++++++++++++++++++++++++++++++---------------------- src/bin/e_client.h | 2 ++ src/bin/e_comp_wl.c | 11 +++++++++- 3 files changed, 48 insertions(+), 27 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 82267f3..df19497 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -1743,8 +1743,8 @@ _e_client_maximize_run(E_Client *ec, int x, int y, int w, int h) //////////////////////////////////////////////// -static void -_e_client_eval(E_Client *ec) +E_API void +e_client_eval(E_Client *ec) { int rem_change = 0; int send_event = 1; @@ -1752,7 +1752,7 @@ _e_client_eval(E_Client *ec) if (e_object_is_del(E_OBJECT(ec))) { - CRI("_e_client_eval(%p) with deleted border! - %d\n", ec, ec->new_client); + CRI("e_client_eval(%p) with deleted border! - %d\n", ec, ec->new_client); ec->changed = 0; return; } @@ -2403,28 +2403,7 @@ e_client_idler_before(void) EINA_LIST_FOREACH(e_comp->clients, l, ec) { - Eina_Stringshare *title; - // pass 1 - eval0. fetch properties on new or on change and - // call hooks to decide what to do - maybe move/resize - if (ec->ignored || (!ec->changed)) continue; - - if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_FETCH, ec)) continue; - /* FETCH is hooked by the compositor to get client hints */ - title = e_client_util_name_get(ec); - if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_FETCH, ec)) continue; - if (title != e_client_util_name_get(ec)) - _e_client_event_property(ec, E_CLIENT_PROPERTY_TITLE); - /* PRE_POST_FETCH calls e_remember apply for new client */ - if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_POST_FETCH, ec)) continue; - if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_FETCH, ec)) continue; - if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_FRAME_ASSIGN, ec)) continue; - - if ((ec->border.changed) && (!ec->shaded) && (!e_client_is_stacking(ec)) && - ((!ec->override) || ec->internal) && - (!(((ec->maximized & E_MAXIMIZE_TYPE) == E_MAXIMIZE_FULLSCREEN)))) - _e_client_frame_update(ec); - ec->border.changed = 0; - _e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_FRAME_ASSIGN, ec); + e_client_eval_stage_1_call(ec); } E_CLIENT_FOREACH(ec) @@ -2511,7 +2490,7 @@ e_client_idler_before(void) } if (ec->changed) - _e_client_eval(ec); + e_client_eval(ec); if ((ec->changes.visible) && (ec->visible) && (!ec->changed)) { @@ -5053,6 +5032,37 @@ e_client_icon_add(E_Client *ec, Evas *evas) //////////////////////////////////////////// +E_API Eina_Bool +e_client_eval_stage_1_call(E_Client *ec) +{ + Eina_Stringshare *title; + + // pass 1 - eval0. fetch properties on new or on change and + // call hooks to decide what to do - maybe move/resize + if (ec->ignored || (!ec->changed)) return EINA_FALSE; + + if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_FETCH, ec)) return EINA_FALSE; + /* FETCH is hooked by the compositor to get client hints */ + title = e_client_util_name_get(ec); + if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_FETCH, ec)) return EINA_FALSE; + if (title != e_client_util_name_get(ec)) + _e_client_event_property(ec, E_CLIENT_PROPERTY_TITLE); + /* PRE_POST_FETCH calls e_remember apply for new client */ + if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_POST_FETCH, ec)) return EINA_FALSE; + if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_FETCH, ec)) return EINA_FALSE; + if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_FRAME_ASSIGN, ec)) return EINA_FALSE; + + if ((ec->border.changed) && (!ec->shaded) && (!e_client_is_stacking(ec)) && + ((!ec->override) || ec->internal) && + (!(((ec->maximized & E_MAXIMIZE_TYPE) == E_MAXIMIZE_FULLSCREEN)))) + _e_client_frame_update(ec); + ec->border.changed = 0; + _e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_FRAME_ASSIGN, ec); + return EINA_TRUE; +} + +//////////////////////////////////////////// + E_API void e_client_ping(E_Client *ec) { diff --git a/src/bin/e_client.h b/src/bin/e_client.h index 5457868..552c264 100644 --- a/src/bin/e_client.h +++ b/src/bin/e_client.h @@ -857,6 +857,8 @@ E_API E_Client *e_client_stack_active_adjust(E_Client *ec); E_API Eina_Bool e_client_stack_focused_get(E_Client *ec); E_API Eina_Bool e_client_stack_iconified_get(E_Client *ec); E_API Eina_Bool e_client_stack_urgent_get(E_Client *ec); +E_API void e_client_eval(E_Client *ec); +E_API Eina_Bool e_client_eval_stage_1_call(E_Client *ec); YOLO E_API void e_client_focus_stack_set(Eina_List *l); diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index b8a64a6..3e69a94 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1753,6 +1753,12 @@ _e_comp_wl_surface_cb_commit(struct wl_client *client EINA_UNUSED, struct wl_res if (!(ec = wl_resource_get_user_data(resource))) return; if (e_object_is_del(E_OBJECT(ec))) return; + if (ec->new_client) + { + e_client_eval_stage_1_call(ec); + e_client_eval(ec); + } + if (e_comp_wl_subsurface_commit(ec)) return; e_comp_wl_surface_commit(ec); @@ -1867,7 +1873,10 @@ _e_comp_wl_compositor_cb_surface_create(struct wl_client *client, struct wl_reso } if (ec->new_client) e_comp->new_clients--; - ec->new_client = 0; +// this makes things like tiling have to rezize the window after first buffer +// is drawn - or well doesn't help... why mark it as NOT new? this makes +// no sense! +// ec->new_client = 0; if ((!ec->client.w) && (!ec->client.h)) ec->client.w = ec->client.h = 1; ec->comp_data->surface = res; --
