Add more debug

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@23619 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-09-26 08:38:53 +00:00
parent e0024db991
commit 9b0cac8c46

View file

@ -538,6 +538,8 @@ static void setWindowHintsForStyle (Display *dpy, Window window,
RContext *context;
XEvent xEvent;
NSDebugLLog(@"Offset", @"Checking offsets for style %d\n", style);
root = [self _rootWindowForScreen: 0];
context = [self xrContextForScreen: 0];
@ -691,7 +693,8 @@ static void setWindowHintsForStyle (Display *dpy, Window window,
while (XPending(dpy) > 0)
{
XNextEvent(dpy, &xEvent);
NSDebugLLog(@"Offset", @"Testing ... event %d window %d\n",
xEvent.type, xEvent.xany.window);
switch (xEvent.type)
{
case ReparentNotify:
@ -700,16 +703,15 @@ static void setWindowHintsForStyle (Display *dpy, Window window,
xEvent.xreparent.y);
window->parent = xEvent.xreparent.parent;
if (window != 0 && xEvent.xreparent.parent != window->root
&& (xEvent.xreparent.x != 0 || xEvent.xreparent.y != 0))
if (xEvent.xreparent.parent != window->root)
{
Window parent = xEvent.xreparent.parent;
Window parent = xEvent.xreparent.parent;
XWindowAttributes wattr;
float l;
float r;
float t;
float b;
Offsets *o;
float l;
float r;
float t;
float b;
Offsets *o;
/* Get the WM offset info which we hope is the same
* for all parented windows with the same style.
@ -813,8 +815,13 @@ static void setWindowHintsForStyle (Display *dpy, Window window,
[self termwindow: window->number];
XSync(dpy, False);
while (XPending(dpy) > 0) XNextEvent(dpy, &xEvent);
if (generic.offsets[(window->win_attrs.window_style & 15)].known == NO)
while (XPending(dpy) > 0)
{
XNextEvent(dpy, &xEvent);
NSDebugLLog(@"Offset", @"Destroying ... event %d window %d\n",
xEvent.type, xEvent.xany.window);
}
if (generic.offsets[style].known == NO)
{
NSLog(@"Failed to determine offsets for style %d", style);
return NO;