kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=248ec63e1e36604b3129865cd51b76ee224f3ea2

commit 248ec63e1e36604b3129865cd51b76ee224f3ea2
Author: Kim Woelders <k...@woelders.dk>
Date:   Sat Dec 28 21:50:34 2013 +0100

    Wrap remaining XCopyArea calls.
---
 src/extinitwin.c |  4 ++--
 src/fx.c         | 18 +++++++++---------
 src/pager.c      | 10 ++++------
 src/x.c          |  7 +++++++
 src/xwin.h       |  3 +++
 5 files changed, 25 insertions(+), 17 deletions(-)

diff --git a/src/extinitwin.c b/src/extinitwin.c
index 6782103..09483f5 100644
--- a/src/extinitwin.c
+++ b/src/extinitwin.c
@@ -186,8 +186,8 @@ ExtInitWinMain(void)
                        WinGetW(VROOT), WinGetH(VROOT), WinGetDepth(VROOT));
    gcv.subwindow_mode = IncludeInferiors;
    gc = XCreateGC(disp, win, GCSubwindowMode, &gcv);
-   XCopyArea(disp, WinGetXwin(VROOT), pmap, gc,
-            0, 0, WinGetW(VROOT), WinGetH(VROOT), 0, 0);
+   EXCopyAreaGC(WinGetXwin(VROOT), pmap, gc,
+               0, 0, WinGetW(VROOT), WinGetH(VROOT), 0, 0);
    XSetWindowBackgroundPixmap(disp, win, pmap);
    XMapRaised(disp, win);
    XFreePixmap(disp, pmap);
diff --git a/src/fx.c b/src/fx.c
index ec4357c..fc80e1d 100644
--- a/src/fx.c
+++ b/src/fx.c
@@ -119,9 +119,9 @@ FX_ripple_timeout(EObj * eo __UNUSED__, int run __UNUSED__, 
void *state)
        yy = (FX_RIPPLE_WATERH * 2) - yoff;
        aa = p * p * 64 + d->inch;
        off = (int)(sinf(aa) * 10 * (1 - p));
-       XCopyArea(disp, d->above, WinGetXwin(d->win), d->gc1, 0, yy,
-                 WinGetW(VROOT), 1, off,
-                 WinGetH(VROOT) - FX_RIPPLE_WATERH + y);
+       EXCopyAreaGC(d->above, WinGetXwin(d->win), d->gc1, 0, yy,
+                    WinGetW(VROOT), 1, off,
+                    WinGetH(VROOT) - FX_RIPPLE_WATERH + y);
      }
 
    return 4;
@@ -232,9 +232,9 @@ FX_Wave_timeout(EObj * eo __UNUSED__, int run __UNUSED__, 
void *state)
    /* Copy the area to correct bugs */
    if (d->count == 0)
      {
-       XCopyArea(disp, d->above, WinGetXwin(d->win), d->gc1, 0,
-                 WinGetH(VROOT) - FX_WAVE_GRABH, WinGetW(VROOT),
-                 FX_WAVE_DEPTH * 2, 0, WinGetH(VROOT) - FX_WAVE_GRABH);
+       EXCopyAreaGC(d->above, WinGetXwin(d->win), d->gc1, 0,
+                    WinGetH(VROOT) - FX_WAVE_GRABH, WinGetW(VROOT),
+                    FX_WAVE_DEPTH * 2, 0, WinGetH(VROOT) - FX_WAVE_GRABH);
      }
 
    /* Go through the bottom couple (FX_WAVE_WATERH) lines of the window */
@@ -272,9 +272,9 @@ FX_Wave_timeout(EObj * eo __UNUSED__, int run __UNUSED__, 
void *state)
             sx = (int)(sinf(incx2) * FX_WAVE_DEPTH);
 
             /* Display this block */
-            XCopyArea(disp, d->above, WinGetXwin(d->win), d->gc1, x, yy,       
/* x, y */
-                      FX_WAVE_WATERW, 1,       /* w, h */
-                      off + x, WinGetH(VROOT) - FX_WAVE_WATERH + y + sx        
/* dx, dy */
+            EXCopyAreaGC(d->above, WinGetXwin(d->win), d->gc1, x, yy,  /* x, y 
*/
+                         FX_WAVE_WATERW, 1,    /* w, h */
+                         off + x, WinGetH(VROOT) - FX_WAVE_WATERH + y + sx     
/* dx, dy */
                );
          }
      }
diff --git a/src/pager.c b/src/pager.c
index c8a05b8..8cd979e 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -412,8 +412,8 @@ doPagerUpdate(Pager * p)
             if (update_screen_included && x == cx && y == cy)
                continue;
 #endif
-            XCopyArea(disp, p->bgpmap, pmap, gc, 0, 0, p->dw, p->dh,
-                      x * p->dw, y * p->dh);
+            EXCopyAreaGC(p->bgpmap, pmap, gc, 0, 0, p->dw, p->dh,
+                         x * p->dw, y * p->dh);
          }
      }
 
@@ -456,8 +456,7 @@ doPagerUpdate(Pager * p)
                  XSetClipOrigin(disp, gc, wx, wy);
               }
 #endif
-            XCopyArea(disp, ewin->mini_pmm.pmap, pmap, gc, 0, 0,
-                      ww, wh, wx, wy);
+            EXCopyAreaGC(ewin->mini_pmm.pmap, pmap, gc, 0, 0, ww, wh, wx, wy);
 #if 0                          /* Mask is currently not set anywhere */
             if (ewin->mini_pmm.mask)
                XSetClipMask(disp, gc, NoXID);
@@ -912,8 +911,7 @@ PagerEwinUpdateFromPager(Pager * p, EWin * ewin)
    if (!ewin->mini_pmm.pmap)
       return;
 
-   XCopyArea(disp, WinGetPmap(p->win), ewin->mini_pmm.pmap, gc, x, y, w, h, 0,
-            0);
+   EXCopyAreaGC(WinGetPmap(p->win), ewin->mini_pmm.pmap, gc, x, y, w, h, 0, 0);
 
 #if 0                          /* FIXME - Remove? */
    if (hiwin && ewin == hiwin->ewin)
diff --git a/src/x.c b/src/x.c
index b5f9d34..f48a4ef 100644
--- a/src/x.c
+++ b/src/x.c
@@ -1653,6 +1653,13 @@ EXCreatePixmapCopy(Pixmap src, unsigned int w, unsigned 
int h,
 }
 
 void
+EXCopyAreaGC(Drawable src, Drawable dst, GC gc, int sx, int sy, unsigned int w,
+            unsigned int h, int dx, int dy)
+{
+   XCopyArea(disp, src, dst, gc, sx, sy, w, h, dx, dy);
+}
+
+void
 EXCopyArea(Drawable src, Drawable dst, int sx, int sy, unsigned int w,
           unsigned int h, int dx, int dy)
 {
diff --git a/src/xwin.h b/src/xwin.h
index b940b37..38606e6 100644
--- a/src/xwin.h
+++ b/src/xwin.h
@@ -256,6 +256,9 @@ int                 EXGetGeometry(Window xwin, Window * 
root_return,
 
 void                EXRestackWindows(Window * windows, int nwindows);
 
+void                EXCopyAreaGC(Drawable src, Drawable dst, GC gc,
+                                int sx, int sy, unsigned int w, unsigned int h,
+                                int dx, int dy);
 void                EXCopyArea(Drawable src, Drawable dst, int sx, int sy,
                               unsigned int w, unsigned int h, int dx, int dy);
 void                EXCopyAreaTiled(Drawable src, Pixmap mask, Drawable dst,

-- 


Reply via email to