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:
rfm 2006-09-26 08:38:53 +00:00
parent 336a4fd4b9
commit 27c352c38a

View file

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