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:
committed by
Carlos R. Mafra
parent
f76ed31fa3
commit
bf64058020
@@ -186,19 +186,16 @@ static Window makeDragIcon(WMScreen * scr, WMPixmap * pixmap)
|
|||||||
WMSize size;
|
WMSize size;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
XSetWindowAttributes attribs;
|
XSetWindowAttributes attribs;
|
||||||
Pixmap pix, mask;
|
|
||||||
|
|
||||||
if (!pixmap) {
|
if (!pixmap) {
|
||||||
pixmap = scr->defaultObjectIcon;
|
pixmap = scr->defaultObjectIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
size = WMGetPixmapSize(pixmap);
|
size = WMGetPixmapSize(pixmap);
|
||||||
pix = pixmap->pixmap;
|
|
||||||
mask = pixmap->mask;
|
|
||||||
|
|
||||||
flags = CWSaveUnder | CWBackPixmap | CWOverrideRedirect | CWColormap;
|
flags = CWSaveUnder | CWBackPixmap | CWOverrideRedirect | CWColormap;
|
||||||
attribs.save_under = True;
|
attribs.save_under = True;
|
||||||
attribs.background_pixmap = pix;
|
attribs.background_pixmap = pixmap->pixmap;
|
||||||
attribs.override_redirect = True;
|
attribs.override_redirect = True;
|
||||||
attribs.colormap = scr->colormap;
|
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);
|
size.height, 0, scr->depth, InputOutput, scr->visual, flags, &attribs);
|
||||||
|
|
||||||
#ifdef SHAPE
|
#ifdef SHAPE
|
||||||
|
if (pixmap->mask) {
|
||||||
if (mask) {
|
XShapeCombineMask(scr->display, window, ShapeBounding, 0, 0, pixmap->mask, ShapeSet);
|
||||||
XShapeCombineMask(scr->display, window, ShapeBounding, 0, 0, mask, ShapeSet);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user