Hi!

Attached is a simple program that repeatedly calls XDamageAdd with a rectangle in the upper left corner, in a way very similar to what's done when a DRI client runs glxSwapBuffers().

The problem I'm seeing with this is that an xterm window gets corrupted when placed either to the right of or below the region in question. I'm not sure whether this is a usage problem, an X server problem or an xterm problem, but i can't really recall seeing it before.

Any insight would be appreciated.

Thanks,
Thomas

#include <X11/Xlib.h>
#include <X11/extensions/Xfixes.h>
#include <X11/extensions/Xdamage.h>


int main()
{

  Display *dpy;
  int scrnum;
  Window root;

  dpy = XOpenDisplay(XDisplayName(NULL));
  scrnum = DefaultScreen(dpy);
  root = RootWindow(dpy, scrnum);

  while(1) {

    XRectangle rect;
    XserverRegion region;
    
    rect.x = 5;
    rect.y = 5;
    rect.width = 300;
    rect.height = 300;

    region = XFixesCreateRegion(dpy, &rect, 1);
    XDamageAdd(dpy, root, region);
    XFixesDestroyRegion(dpy, region);
  }
}
_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to