composite still redirect the overlay window?
Deron Johnson
Deron.Johnson at Sun.COM
Thu Mar 30 14:02:44 PST 2006
I thought I fixed that bug. Please check compwindow.c:compCheckRedirect.
Does it have the following code?
Bool
compCheckRedirect (WindowPtr pWin)
{
CompWindowPtr cw = GetCompWindow (pWin);
CompScreenPtr cs = GetCompScreen(pWin->drawable.pScreen);
Bool should;
should = pWin->realized && (pWin->drawable.class != InputOnly) &&
(cw != NULL);
/* Never redirect the overlay window */ <<<<<<<<<<<<<
if (cs->pOverlayWin != NULL) {
if (pWin == cs->pOverlayWin) {
should = FALSE;
}
}
If not then you don't have the latest version of the file. I did a
checkout of a fresh version of xserver and I have verified that
this fix did get integrated.
If you have this fix and the overlay window is still being redirected
I would like to know more about how you are determining this. When I
run the attached test program (from Soeren) on my version with the
above fix I see the purple screen, which indicates that the overlay
window is not being redirected.
Carlos Eduardo Rodrigues Diógenes wrote On 03/30/06 11:46,:
>> Hi,
>>
>> After the last commites of Deron Johson I recompiled my Xorg and noticed
>> that the overlay window is still being redirect. There is anything
>> missing to complete the composite extension?
>>
>> Thanks
,
#include <stdlib.h>
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/extensions/Xcomposite.h>
/*
EXPECTED RESULT:
1. Print: "Pass: Overlay window NOT returned by XQueryTree()"
-and-
2. Turn the screen purple for 3 seconds
This program does the following:
* RedirectSubwindows on the root window
* Acquires an overlay window
* Paints the overlay window purple
But, previously, these bugs were found:
Bug 1:
- If you run this program on a completely blank server,
nothing actually happens.
- If you run it _again_ on the same server, it makes the screen
completely purple (as expected).
Bug 2:
- If you run it with an xterm running under twm, you get a purple
screen, except where the xterm was - in that rectangle you get the
weave pattern. Also, you can drag the xterm around, although the
overlay window is supposed to be a normal input-clipping window.
Bug 3:
- The window does show up in the reply from QueryTree which it
shouldn't according to the spec that was posted.
*/
static void
paint_window (Display *dpy, Window window, unsigned long pixel)
{
XGCValues gc_values;
GC gc;
gc_values.foreground = pixel;
gc = XCreateGC (dpy, window, GCForeground, &gc_values);
XFillRectangle (dpy, window, gc, 0, 0, 32000, 32000);
XFillRectangle (dpy, window, gc, 0, 0, 200, 200);
XFreeGC (dpy, gc);
}
int
main ()
{
Display *dpy = XOpenDisplay (NULL);
Window root = DefaultRootWindow (dpy);
int major, minor;
Window overlay, subwindow;
Window root_return, parent_return, *children_return;
int n_children_return;
int i;
int overlay_found_in_query_tree = 0;
if (!XCompositeQueryExtension (dpy, &major, &minor))
{
fprintf (stderr, "No composite\n");
exit (1);
}
/* Prove the the overlay window is not redirected */
XCompositeRedirectSubwindows (dpy, root, CompositeRedirectManual);
overlay = XCompositeGetOverlayWindow (dpy, root);
XQueryTree (dpy, root, &root_return, &parent_return,
&children_return, &n_children_return);
for (i = 0; i < n_children_return; ++i)
{
fprintf(stderr, "children_return[%d] = %d\n", i, children_return[i]);
if (children_return[i] == overlay) {
printf ("FAIL: Overlay window returned by XQueryTree()\n");
overlay_found_in_query_tree = 1;
}
}
if (!overlay_found_in_query_tree) {
printf ("Pass: Overlay window NOT returned by XQueryTree()\n");
}
paint_window (dpy, overlay, 0xFFCD01FF);
XFlush (dpy);
sleep (3);
XCompositeReleaseOverlayWindow (dpy, overlay);
return 0;
}
_______________________________________________
xorg mailing list
xorg at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ovbug6411.c
URL: <http://lists.x.org/archives/xorg/attachments/20060330/3a279633/attachment.c>
More information about the xorg
mailing list