aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-07-19 12:45:05 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-07-19 12:45:05 +0000
commit5467c60cf62bd91f67efcf7cac922224a4d5b558 (patch)
tree7f8d5ad5735ab91795bba5e5c6653f3618e739f6 /src
parent1d6199f9d749b67ecdeef1197559ce08cfbd6899 (diff)
downloadenlightenment-5467c60cf62bd91f67efcf7cac922224a4d5b558.tar.gz
enlightenment-5467c60cf62bd91f67efcf7cac922224a4d5b558.tar.xz
enlightenment-5467c60cf62bd91f67efcf7cac922224a4d5b558.zip
fix window shots to work correctly all the time
SVN revision: 74183
Diffstat (limited to 'src')
-rw-r--r--src/modules/shot/e_mod_main.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c
index b61ba3b2a..3ebf42542 100644
--- a/src/modules/shot/e_mod_main.c
+++ b/src/modules/shot/e_mod_main.c
@@ -556,6 +556,7 @@ _shot_now(E_Zone *zone, E_Border *bd)
Evas_Object *o, *oa, *op, *ol;
Evas_Coord w, h;
Evas_Modifier_Mask mask;
+ Ecore_X_Window xwin, root;
E_Radio_Group *rg;
memset(&att, 0, sizeof(Ecore_X_Window_Attributes));
@@ -563,18 +564,24 @@ _shot_now(E_Zone *zone, E_Border *bd)
{
sman = zone->container->manager;
scon = zone->container;
- ecore_x_window_attributes_get(sman->root, &att);
+ xwin = sman->root;
sw = sman->w, sh = sman->h;
- img = ecore_x_image_new(sw, sh, att.visual, att.depth);
- ecore_x_image_get(img, sman->root, 0, 0, 0, 0, sw, sh);
}
else
{
- ecore_x_window_attributes_get(bd->client.win, &att);
- sw = bd->w, sh = bd->h;
- img = ecore_x_image_new(sw, sh, att.visual, att.depth);
- ecore_x_image_get(img, bd->client.win, 0, 0, 0, 0, sw, sh);
+ sw = bd->client.w, sh = bd->client.h;
+ root = bd->zone->container->manager->root;
+ xwin = bd->client.win;
+ while (xwin != root)
+ {
+ if (ecore_x_window_parent_get(xwin) == root) break;
+ xwin = ecore_x_window_parent_get(xwin);
+ }
+ ecore_x_window_geometry_get(xwin, NULL, NULL, &sw, &sh);
}
+ ecore_x_window_attributes_get(xwin, &att);
+ img = ecore_x_image_new(sw, sh, att.visual, att.depth);
+ ecore_x_image_get(img, xwin, 0, 0, 0, 0, sw, sh);
src = ecore_x_image_data_get(img, &bpl, &rows, &bpp);
if (!ecore_x_image_is_argb32_get(img))
{