forked from e16/e16
1
0
Fork 0

Move EWindowGetNamePixmap() to x.c (and rename).

SVN revision: 45016
This commit is contained in:
Kim Woelders 2010-01-10 17:17:02 +00:00
parent 5fb01c8fbb
commit 4bba9df22b
3 changed files with 18 additions and 14 deletions

View File

@ -875,18 +875,6 @@ ECompMgrWinSetShape(EObj * eo)
ERegionShow("shape", cw->shape, NULL);
}
static Pixmap
EWindowGetNamePixmap(const struct _xwin *win)
{
XWindowAttributes xwa;
if (XGetWindowAttributes(disp, win->xwin, &xwa) == 0 ||
xwa.map_state == IsUnmapped)
return None;
return XCompositeNameWindowPixmap(disp, WinGetXwin(win));
}
Pixmap
ECompMgrWinGetPixmap(const EObj * eo)
{
@ -901,7 +889,7 @@ ECompMgrWinGetPixmap(const EObj * eo)
if (eo->noredir)
return None;
cw->pixmap = EWindowGetNamePixmap(EobjGetWin(eo));
cw->pixmap = EWindowGetPixmap(EobjGetWin(eo));
return cw->pixmap;
}
@ -1189,7 +1177,7 @@ ECompMgrWinSetPicts(EObj * eo)
if (cw->pixmap == None && eo->shown && !eo->noredir &&
(Mode_compmgr.use_pixmap || (eo->fade && Conf_compmgr.fading.enable)))
{
cw->pixmap = EWindowGetNamePixmap(EobjGetWin(eo));
cw->pixmap = EWindowGetPixmap(EobjGetWin(eo));
D2printf("ECompMgrWinSetPicts %#lx: Pmap=%#lx\n", EobjGetXwin(eo),
cw->pixmap);
}

14
src/x.c
View File

@ -1922,6 +1922,20 @@ EGetTimestamp(void)
#if USE_COMPOSITE
#include <X11/extensions/Xcomposite.h>
Pixmap
EWindowGetPixmap(const Win win)
{
XWindowAttributes xwa;
if (XGetWindowAttributes(disp, win->xwin, &xwa) == 0 ||
xwa.map_state == IsUnmapped)
return None;
return XCompositeNameWindowPixmap(disp, WinGetXwin(win));
}
/*
* Pictures
*/

View File

@ -324,6 +324,8 @@ Picture EPictureCreateSolid(Window xwin, int argb,
Picture EPictureCreateBuffer(Win win, int w, int h, Pixmap * ppmap);
void EPictureSetClip(Picture pict, XserverRegion clip);
Pixmap EWindowGetPixmap(const Win win);
#endif /* USE_COMPOSITE */
#endif /* _XWIN_H_ */