Modified paint_all so that it doesn't draw off-screen windows, and doesn't
draw shadows on desktop 'root' windows.
This commit is contained in:
parent
c262e75a82
commit
2427e4ea66
@ -1,3 +1,10 @@
|
|||||||
|
2004-09-29 Dan Doel <dolio@case.edu>
|
||||||
|
|
||||||
|
* xcompmgr.c: (paint_all):
|
||||||
|
Added some small optimizations by Thomas Luebking. paint_all
|
||||||
|
now avoids drawing windows that don't appear on the screen,
|
||||||
|
and doesn't bother drawing shadows on desktop windows.
|
||||||
|
|
||||||
2004-09-23 Dan Doel <dolio@case.edu>
|
2004-09-23 Dan Doel <dolio@case.edu>
|
||||||
|
|
||||||
* xcompmgr.1:
|
* xcompmgr.1:
|
||||||
|
10
xcompmgr.c
10
xcompmgr.c
@ -942,6 +942,10 @@ paint_all (Display *dpy, XserverRegion region)
|
|||||||
/* never painted, ignore it */
|
/* never painted, ignore it */
|
||||||
if (!w->damaged)
|
if (!w->damaged)
|
||||||
continue;
|
continue;
|
||||||
|
/* if invisible, ignore it */
|
||||||
|
if (w->a.x + w->a.width < 1 || w->a.y + w->a.height < 1
|
||||||
|
|| w->a.x >= root_width || w->a.y >= root_height)
|
||||||
|
continue;
|
||||||
if (!w->picture)
|
if (!w->picture)
|
||||||
{
|
{
|
||||||
XRenderPictureAttributes pa;
|
XRenderPictureAttributes pa;
|
||||||
@ -1030,6 +1034,9 @@ paint_all (Display *dpy, XserverRegion region)
|
|||||||
case CompSimple:
|
case CompSimple:
|
||||||
break;
|
break;
|
||||||
case CompServerShadows:
|
case CompServerShadows:
|
||||||
|
/* dont' bother drawing shadows on desktop windows */
|
||||||
|
if (w->windowType == winDesktopAtom)
|
||||||
|
break;
|
||||||
set_ignore (dpy, NextRequest (dpy));
|
set_ignore (dpy, NextRequest (dpy));
|
||||||
if (w->opacity != OPAQUE && !w->shadowPict)
|
if (w->opacity != OPAQUE && !w->shadowPict)
|
||||||
w->shadowPict = solid_picture (dpy, True,
|
w->shadowPict = solid_picture (dpy, True,
|
||||||
@ -1044,7 +1051,8 @@ paint_all (Display *dpy, XserverRegion region)
|
|||||||
w->shadow_width, w->shadow_height);
|
w->shadow_width, w->shadow_height);
|
||||||
break;
|
break;
|
||||||
case CompClientShadows:
|
case CompClientShadows:
|
||||||
if (w->shadow)
|
/* don't bother drawing shadows on desktop windows */
|
||||||
|
if (w->shadow && w->windowType != winDesktopAtom)
|
||||||
{
|
{
|
||||||
XRenderComposite (dpy, PictOpOver, blackPicture, w->shadow, rootBuffer,
|
XRenderComposite (dpy, PictOpOver, blackPicture, w->shadow, rootBuffer,
|
||||||
0, 0, 0, 0,
|
0, 0, 0, 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user