From: Christophe CURIS <[email protected]>

In the present case, it just led to a compiler warning on unused variable
when the XShape extension is disabled, but in general case it just adds
complexity by duplicating things; this should be reserved for complex
cases.

Signed-off-by: Christophe CURIS <[email protected]>
---
 WINGs/dragsource.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/WINGs/dragsource.c b/WINGs/dragsource.c
index 05d2c6a..599b80e 100644
--- a/WINGs/dragsource.c
+++ b/WINGs/dragsource.c
@@ -186,19 +186,16 @@ static Window makeDragIcon(WMScreen * scr, WMPixmap * 
pixmap)
        WMSize size;
        unsigned long flags;
        XSetWindowAttributes attribs;
-       Pixmap pix, mask;
 
        if (!pixmap) {
                pixmap = scr->defaultObjectIcon;
        }
 
        size = WMGetPixmapSize(pixmap);
-       pix = pixmap->pixmap;
-       mask = pixmap->mask;
 
        flags = CWSaveUnder | CWBackPixmap | CWOverrideRedirect | CWColormap;
        attribs.save_under = True;
-       attribs.background_pixmap = pix;
+       attribs.background_pixmap = pixmap->pixmap;
        attribs.override_redirect = True;
        attribs.colormap = scr->colormap;
 
@@ -206,9 +203,8 @@ static Window makeDragIcon(WMScreen * scr, WMPixmap * 
pixmap)
                               size.height, 0, scr->depth, InputOutput, 
scr->visual, flags, &attribs);
 
 #ifdef SHAPE
-
-       if (mask) {
-               XShapeCombineMask(scr->display, window, ShapeBounding, 0, 0, 
mask, ShapeSet);
+       if (pixmap->mask) {
+               XShapeCombineMask(scr->display, window, ShapeBounding, 0, 0, 
pixmap->mask, ShapeSet);
        }
 #endif
 
-- 
1.8.4.rc3


-- 
To unsubscribe, send mail to [email protected].

Reply via email to