1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 21:38:00 +01:00

WINGs: Do not create variables for trivial things

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 <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2013-11-15 18:46:46 +01:00
committed by Carlos R. Mafra
parent f76ed31fa3
commit bf64058020

View File

@@ -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