move map before configure for wl clients during commit

this ensures visibility is set correctly before attempting to set geometry
This commit is contained in:
Mike Blumenkrantz 2015-02-11 17:02:01 -05:00
parent a9b56c4c28
commit 491825c05f
1 changed files with 37 additions and 38 deletions

View File

@ -1464,25 +1464,6 @@ _e_comp_wl_subsurface_commit_from_cache(E_Client *ec)
e_object_ref(E_OBJECT(ec));
}
/* check for any pending attachments */
if (sdata->cached.new_attach)
{
int x, y, nw, nh;
nw = ec->client.w;
nh = ec->client.h;
if (nw == 0) nw = cdata->pending.w;
if (nh == 0) nh = cdata->pending.h;
if (ec->changes.pos)
e_comp_object_frame_xy_adjust(ec->frame, ec->x, ec->y, &x, &y);
else
x = ec->client.x, y = ec->client.y;
/* if the client has a shell configure, call it */
if ((cdata->shell.surface) && (cdata->shell.configure))
cdata->shell.configure(cdata->shell.surface, x, y, nw, nh);
}
/* check if we need to map this surface */
if (sdata->cached.buffer)
{
@ -1505,6 +1486,25 @@ _e_comp_wl_subsurface_commit_from_cache(E_Client *ec)
}
}
/* check for any pending attachments */
if (sdata->cached.new_attach)
{
int x, y, nw, nh;
nw = ec->client.w;
nh = ec->client.h;
if (nw == 0) nw = cdata->pending.w;
if (nh == 0) nh = cdata->pending.h;
if (ec->changes.pos)
e_comp_object_frame_xy_adjust(ec->frame, ec->x, ec->y, &x, &y);
else
x = ec->client.x, y = ec->client.y;
/* if the client has a shell configure, call it */
if ((cdata->shell.surface) && (cdata->shell.configure))
cdata->shell.configure(cdata->shell.surface, x, y, nw, nh);
}
if (!cdata->mapped)
{
DBG("\tSurface Not Mapped. Skip to Unmapped");
@ -2523,25 +2523,6 @@ e_comp_wl_surface_commit(E_Client *ec)
e_object_ref(E_OBJECT(ec));
}
/* check for any pending attachments */
if (ec->comp_data->pending.new_attach)
{
int x, y, nw, nh;
e_pixmap_size_get(ec->pixmap, &nw, &nh);
if (ec->changes.pos)
e_comp_object_frame_xy_adjust(ec->frame, ec->x, ec->y, &x, &y);
else
x = ec->client.x, y = ec->client.y;
/* if the client has a shell configure, call it */
if ((ec->comp_data->shell.surface) &&
(ec->comp_data->shell.configure))
ec->comp_data->shell.configure(ec->comp_data->shell.surface, x, y, nw, nh);
else
e_client_util_move_resize_without_frame(ec, x, y, nw, nh);
}
/* check if we need to map this surface */
if (ec->comp_data->pending.buffer)
{
@ -2574,6 +2555,24 @@ e_comp_wl_surface_commit(E_Client *ec)
}
}
/* check for any pending attachments */
if (ec->comp_data->pending.new_attach)
{
int x, y, nw, nh;
e_pixmap_size_get(ec->pixmap, &nw, &nh);
if (ec->changes.pos)
e_comp_object_frame_xy_adjust(ec->frame, ec->x, ec->y, &x, &y);
else
x = ec->client.x, y = ec->client.y;
/* if the client has a shell configure, call it */
if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.configure))
ec->comp_data->shell.configure(ec->comp_data->shell.surface, x, y, nw, nh);
else
e_client_util_move_resize_without_frame(ec, x, y, nw, nh);
}
if (!ec->comp_data->mapped)
{
DBG("\tSurface Not Mapped. Skip to Unmapped");