further improve csd calculations for x11 clients
there was previously a frame in which maximized x11 csd clients would reposition themselves offscreen before rendering this is now fixed by adjusting the client geometries either upon unsetting the csd or re-setting it, allowing the client to retain its expected positioning without jitters
This commit is contained in:
parent
e5f56f95e9
commit
11c632ab44
|
@ -2971,11 +2971,14 @@ e_comp_object_frame_geometry_get(Evas_Object *obj, int *l, int *r, int *t, int *
|
||||||
E_API void
|
E_API void
|
||||||
e_comp_object_frame_geometry_set(Evas_Object *obj, int l, int r, int t, int b)
|
e_comp_object_frame_geometry_set(Evas_Object *obj, int l, int r, int t, int b)
|
||||||
{
|
{
|
||||||
|
Eina_Bool calc;
|
||||||
|
|
||||||
API_ENTRY;
|
API_ENTRY;
|
||||||
if (cw->frame_object)
|
if (cw->frame_object)
|
||||||
CRI("ACK!");
|
CRI("ACK!");
|
||||||
if ((cw->client_inset.l == l) && (cw->client_inset.r == r) &&
|
if ((cw->client_inset.l == l) && (cw->client_inset.r == r) &&
|
||||||
(cw->client_inset.t == t) && (cw->client_inset.b == b)) return;
|
(cw->client_inset.t == t) && (cw->client_inset.b == b)) return;
|
||||||
|
calc = cw->client_inset.calc;
|
||||||
cw->client_inset.calc = l || r || t || b;
|
cw->client_inset.calc = l || r || t || b;
|
||||||
eina_stringshare_replace(&cw->frame_theme, "borderless");
|
eina_stringshare_replace(&cw->frame_theme, "borderless");
|
||||||
if (cw->client_inset.calc)
|
if (cw->client_inset.calc)
|
||||||
|
@ -2983,14 +2986,22 @@ e_comp_object_frame_geometry_set(Evas_Object *obj, int l, int r, int t, int b)
|
||||||
cw->ec->w += (l + r) - (cw->client_inset.l + cw->client_inset.r);
|
cw->ec->w += (l + r) - (cw->client_inset.l + cw->client_inset.r);
|
||||||
cw->ec->h += (t + b) - (cw->client_inset.t + cw->client_inset.b);
|
cw->ec->h += (t + b) - (cw->client_inset.t + cw->client_inset.b);
|
||||||
}
|
}
|
||||||
else if ((!e_client_has_xwindow(cw->ec)) && (cw->ec->maximized || cw->ec->fullscreen))
|
else if (cw->ec->maximized || cw->ec->fullscreen)
|
||||||
{
|
{
|
||||||
cw->ec->saved.w -= ((l + r) - (cw->client_inset.l + cw->client_inset.r));
|
if (e_client_has_xwindow(cw->ec))
|
||||||
cw->ec->saved.h -= ((t + b) - (cw->client_inset.t + cw->client_inset.b));
|
{
|
||||||
|
cw->ec->saved.x += l - cw->client_inset.l;
|
||||||
|
cw->ec->saved.y += t - cw->client_inset.t;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cw->ec->saved.w -= ((l + r) - (cw->client_inset.l + cw->client_inset.r));
|
||||||
|
cw->ec->saved.h -= ((t + b) - (cw->client_inset.t + cw->client_inset.b));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!cw->ec->new_client)
|
if (!cw->ec->new_client)
|
||||||
{
|
{
|
||||||
if (cw->client_inset.calc)
|
if ((calc || (!e_client_has_xwindow(cw->ec))) && cw->client_inset.calc)
|
||||||
{
|
{
|
||||||
cw->ec->x -= l - cw->client_inset.l;
|
cw->ec->x -= l - cw->client_inset.l;
|
||||||
cw->ec->y -= t - cw->client_inset.t;
|
cw->ec->y -= t - cw->client_inset.t;
|
||||||
|
|
Loading…
Reference in New Issue