forked from enlightenment/enlightenment
reapply accurate ec->placed value for wl clients during surface commit configure
fixes client placement when client has not been placed prior to first commit
This commit is contained in:
parent
e1e711ce53
commit
9a82f7bcb0
|
@ -1490,16 +1490,21 @@ _e_comp_wl_subsurface_commit_from_cache(E_Client *ec)
|
||||||
if (sdata->cached.new_attach)
|
if (sdata->cached.new_attach)
|
||||||
{
|
{
|
||||||
int x, y, nw, nh;
|
int x, y, nw, nh;
|
||||||
|
Eina_Bool placed = EINA_TRUE;
|
||||||
|
|
||||||
e_pixmap_size_get(ec->pixmap, &nw, &nh);
|
e_pixmap_size_get(ec->pixmap, &nw, &nh);
|
||||||
if (ec->changes.pos)
|
if (ec->changes.pos)
|
||||||
e_comp_object_frame_xy_adjust(ec->frame, ec->x, ec->y, &x, &y);
|
e_comp_object_frame_xy_adjust(ec->frame, ec->x, ec->y, &x, &y);
|
||||||
|
else if (ec->new_client)
|
||||||
|
placed = ec->placed;
|
||||||
else
|
else
|
||||||
x = ec->client.x, y = ec->client.y;
|
x = ec->client.x, y = ec->client.y;
|
||||||
|
|
||||||
/* if the client has a shell configure, call it */
|
/* if the client has a shell configure, call it */
|
||||||
if ((cdata->shell.surface) && (cdata->shell.configure))
|
if ((cdata->shell.surface) && (cdata->shell.configure))
|
||||||
cdata->shell.configure(cdata->shell.surface, x, y, nw, nh);
|
cdata->shell.configure(cdata->shell.surface, x, y, nw, nh);
|
||||||
|
if (ec->new_client)
|
||||||
|
ec->placed = placed;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cdata->mapped)
|
if (!cdata->mapped)
|
||||||
|
@ -2556,10 +2561,13 @@ e_comp_wl_surface_commit(E_Client *ec)
|
||||||
if (ec->comp_data->pending.new_attach)
|
if (ec->comp_data->pending.new_attach)
|
||||||
{
|
{
|
||||||
int x, y, nw, nh;
|
int x, y, nw, nh;
|
||||||
|
Eina_Bool placed = EINA_TRUE;;
|
||||||
|
|
||||||
e_pixmap_size_get(ec->pixmap, &nw, &nh);
|
e_pixmap_size_get(ec->pixmap, &nw, &nh);
|
||||||
if (ec->changes.pos)
|
if (ec->changes.pos)
|
||||||
e_comp_object_frame_xy_adjust(ec->frame, ec->x, ec->y, &x, &y);
|
e_comp_object_frame_xy_adjust(ec->frame, ec->x, ec->y, &x, &y);
|
||||||
|
else if (ec->new_client)
|
||||||
|
placed = ec->placed;
|
||||||
else
|
else
|
||||||
x = ec->client.x, y = ec->client.y;
|
x = ec->client.x, y = ec->client.y;
|
||||||
|
|
||||||
|
@ -2568,6 +2576,8 @@ e_comp_wl_surface_commit(E_Client *ec)
|
||||||
ec->comp_data->shell.configure(ec->comp_data->shell.surface, x, y, nw, nh);
|
ec->comp_data->shell.configure(ec->comp_data->shell.surface, x, y, nw, nh);
|
||||||
else
|
else
|
||||||
e_client_util_move_resize_without_frame(ec, x, y, nw, nh);
|
e_client_util_move_resize_without_frame(ec, x, y, nw, nh);
|
||||||
|
if (ec->new_client)
|
||||||
|
ec->placed = placed;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ec->comp_data->mapped)
|
if (!ec->comp_data->mapped)
|
||||||
|
|
Loading…
Reference in New Issue