Revert "e - wayland - fix double-resize if e wants a different initial size"

This reverts commit e1c3120689.

this commit revealed a number of issues with the xdg6 implementation related
to unconfigured buffer management: see subsequent patches for a less
sledgehammer-y solution

ref 5497fadce4
This commit is contained in:
Mike Blumenkrantz 2017-02-10 17:23:44 -05:00
parent 0d4a52a240
commit 51782fd5ee
3 changed files with 27 additions and 48 deletions

View File

@ -1744,8 +1744,8 @@ _e_client_maximize_run(E_Client *ec, int x, int y, int w, int h)
////////////////////////////////////////////////
E_API void
e_client_eval(E_Client *ec)
static void
_e_client_eval(E_Client *ec)
{
int rem_change = 0;
int send_event = 1;
@ -1753,7 +1753,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;
}
@ -2404,7 +2404,28 @@ e_client_idler_before(void)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
e_client_eval_stage_1_call(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_FOREACH(ec)
@ -2491,7 +2512,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))
{
@ -5033,37 +5054,6 @@ 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)
{

View File

@ -857,8 +857,6 @@ 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);

View File

@ -1748,12 +1748,6 @@ _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);
@ -1865,10 +1859,7 @@ _e_comp_wl_compositor_cb_surface_create(struct wl_client *client, struct wl_reso
}
if (ec->new_client)
e_comp->new_clients--;
// 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;
ec->new_client = 0;
if ((!ec->client.w) && (!ec->client.h))
ec->client.w = ec->client.h = 1;
ec->comp_data->surface = res;