shot: Enable feature of taking just window shots in wayland
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
c4c18ed30b
commit
cc5aa9153d
|
@ -937,13 +937,6 @@ _wl_shot_now(E_Zone *zone, E_Client *ec, const char *params)
|
||||||
if ((win) || (url_up)) return;
|
if ((win) || (url_up)) return;
|
||||||
if ((!zone) && (!ec)) return;
|
if ((!zone) && (!ec)) return;
|
||||||
|
|
||||||
if (ec)
|
|
||||||
{
|
|
||||||
e_util_dialog_show(_("Error - Cannot take window shot"),
|
|
||||||
_("Carry on my wayland son. This feature not implemented yet."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (zone)
|
if (zone)
|
||||||
{
|
{
|
||||||
sw = e_comp->w;
|
sw = e_comp->w;
|
||||||
|
@ -963,6 +956,11 @@ _wl_shot_now(E_Zone *zone, E_Client *ec, const char *params)
|
||||||
|
|
||||||
EINA_LIST_FOREACH(_outputs, l, output)
|
EINA_LIST_FOREACH(_outputs, l, output)
|
||||||
{
|
{
|
||||||
|
if ((!zone) &&
|
||||||
|
(!E_CONTAINS(output->x, output->y, output->w, output->h,
|
||||||
|
x, y, sw, sh)))
|
||||||
|
continue;
|
||||||
|
|
||||||
output->buffer =
|
output->buffer =
|
||||||
_create_shm_buffer(shm, output->w, output->h, &output->data);
|
_create_shm_buffer(shm, output->w, output->h, &output->data);
|
||||||
|
|
||||||
|
@ -978,14 +976,32 @@ _wl_shot_now(E_Zone *zone, E_Client *ec, const char *params)
|
||||||
|
|
||||||
EINA_LIST_FOREACH(_outputs, l, output)
|
EINA_LIST_FOREACH(_outputs, l, output)
|
||||||
{
|
{
|
||||||
|
if ((!zone) &&
|
||||||
|
(!E_CONTAINS(output->x, output->y, output->w, output->h,
|
||||||
|
x, y, sw, sh)))
|
||||||
|
continue;
|
||||||
|
|
||||||
ostride = output->w * sizeof(int);
|
ostride = output->w * sizeof(int);
|
||||||
s = output->data;
|
s = output->data;
|
||||||
d = dst + (output->y * bstride + output->x * sizeof(int));
|
if (zone)
|
||||||
for (i = 0; i < output->h; i++)
|
|
||||||
{
|
{
|
||||||
memcpy(d, s, ostride);
|
d = dst + (output->y * bstride + output->x * sizeof(int));
|
||||||
d += bstride;
|
for (i = 0; i < output->h; i++)
|
||||||
s += ostride;
|
{
|
||||||
|
memcpy(d, s, ostride);
|
||||||
|
d += bstride;
|
||||||
|
s += ostride;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
d = dst;
|
||||||
|
for (i = y; i < (y + sh); i++)
|
||||||
|
{
|
||||||
|
s = output->data + (i * ostride) + (x * sizeof(int));
|
||||||
|
memcpy(d, s, bstride);
|
||||||
|
d += bstride;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue