re-place transient wl clients when parent is first sized
this should ensure more reliable centering using a nonzero geometry
This commit is contained in:
parent
1a8207ce70
commit
c196ef110e
|
@ -1431,6 +1431,17 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
|
|||
}
|
||||
w = ec->client.w;
|
||||
h = ec->client.h;
|
||||
if (ec->comp_data->need_center)
|
||||
{
|
||||
Eina_List *l;
|
||||
E_Client *cec;
|
||||
EINA_LIST_FOREACH(ec->transients, l, cec)
|
||||
{
|
||||
cec->placed = 0;
|
||||
if (!cec->ignored) EC_CHANGED(cec);
|
||||
}
|
||||
ec->comp_data->need_center = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
w = state->bw, h = state->bh;
|
||||
|
|
|
@ -359,6 +359,7 @@ struct _E_Comp_Wl_Client_Data
|
|||
Eina_Bool need_xdg6_configure : 1;
|
||||
Eina_Bool maximize_anims_disabled : 1;
|
||||
Eina_Bool ssd_mouse_in : 1;
|
||||
Eina_Bool need_center : 1;
|
||||
};
|
||||
|
||||
struct _E_Comp_Wl_Output
|
||||
|
|
|
@ -403,6 +403,7 @@ _e_comp_wl_zxdg_imported_v1_set_parent_of(struct wl_client *client EINA_UNUSED,
|
|||
evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_DEL, _imported_del, im);
|
||||
e_client_parent_set(ec, im->ex->ec);
|
||||
ec->parent->lock_close = 1;
|
||||
ec->parent->comp_data->need_center = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue