diff options
author | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2012-07-19 13:00:50 +0000 |
---|---|---|
committer | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2012-07-19 13:00:50 +0000 |
commit | c2ac400f8c5e4c1042f292a0367120b88e9628fb (patch) | |
tree | f98904fadb3bb889f2e65a0ceba20996dec47ac9 /src/modules/shot/e_mod_main.c | |
parent | 5467c60cf62bd91f67efcf7cac922224a4d5b558 (diff) | |
download | enlightenment-c2ac400f8c5e4c1042f292a0367120b88e9628fb.tar.gz enlightenment-c2ac400f8c5e4c1042f292a0367120b88e9628fb.tar.xz enlightenment-c2ac400f8c5e4c1042f292a0367120b88e9628fb.zip |
ecore-x changes for shot module "because devilhorns said so"
SVN revision: 74185
Diffstat (limited to 'src/modules/shot/e_mod_main.c')
-rw-r--r-- | src/modules/shot/e_mod_main.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c index 3ebf42542..fe4a43291 100644 --- a/src/modules/shot/e_mod_main.c +++ b/src/modules/shot/e_mod_main.c @@ -548,7 +548,6 @@ static void _shot_now(E_Zone *zone, E_Border *bd) { Ecore_X_Image *img; - Ecore_X_Window_Attributes att; unsigned char *src; unsigned int *dst; int bpl = 0, rows = 0, bpp = 0, sw, sh; @@ -558,8 +557,10 @@ _shot_now(E_Zone *zone, E_Border *bd) Evas_Modifier_Mask mask; Ecore_X_Window xwin, root; E_Radio_Group *rg; + Ecore_X_Visual visual; + Ecore_X_Display *display; + Ecore_X_Screen *scr; - memset(&att, 0, sizeof(Ecore_X_Window_Attributes)); if (zone) { sman = zone->container->manager; @@ -579,14 +580,19 @@ _shot_now(E_Zone *zone, E_Border *bd) } 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); + display = ecore_x_display_get(); + scr = ecore_x_default_screen_get(); + visual = ecore_x_default_visual_get(display, scr); + img = ecore_x_image_new(sw, sh, visual, ecore_x_window_depth_get(xwin)); 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)) { + Ecore_X_Colormap colormap; + + colormap = ecore_x_default_colormap_get(display, scr); dst = malloc(sw * sh * sizeof(int)); - ecore_x_image_to_argb_convert(src, bpp, bpl, att.colormap, att.visual, + ecore_x_image_to_argb_convert(src, bpp, bpl, colormap, visual, 0, 0, sw, sh, dst, (sw * sizeof(int)), 0, 0); } |