kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=6a61584f37a9d2af62955a27ea3410ab9e7f051b

commit 6a61584f37a9d2af62955a27ea3410ab9e7f051b
Author: Kim Woelders <k...@woelders.dk>
Date:   Sat Dec 28 21:17:55 2013 +0100

    Use XCopyArea wrapper function.
---
 src/menus.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/menus.c b/src/menus.c
index dd76bee..29da931 100644
--- a/src/menus.c
+++ b/src/menus.c
@@ -948,7 +948,6 @@ MenuDrawItem(Menu * m, MenuItem * mi, char shape, int state)
        int                 x, y, w, h;
        int                 item_type;
        ImageClass         *ic;
-       GC                  gc;
        PmapMask            pmm;
 
        EGetGeometry(mi->win, NULL, &x, &y, &w, &h, NULL, NULL);
@@ -962,9 +961,7 @@ MenuDrawItem(Menu * m, MenuItem * mi, char shape, int state)
 
        if (!m->style->use_item_bg)
          {
-            gc = EXCreateGC(m->pmm.pmap, 0, NULL);
-            XCopyArea(disp, WinGetPmap(m->win), mi_pmm->pmap, gc, x, y, w, h,
-                      0, 0);
+            EXCopyArea(WinGetPmap(m->win), mi_pmm->pmap, x, y, w, h, 0, 0);
             if ((mi->state != STATE_NORMAL) || (mi->child))
               {
                  ImageclassApplyCopy(ic, mi->win, w, h, 0, 0, mi->state, &pmm,
@@ -973,7 +970,6 @@ MenuDrawItem(Menu * m, MenuItem * mi, char shape, int state)
                                  0, 0, w, h, 0, 0);
                  PmapMaskFree(&pmm);
               }
-            EXFreeGC(gc);
          }
        else
          {

-- 


Reply via email to