* Source/x11/XGServerWindow.m (-_checkStyle:): Ignore invalid

border information.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@40286 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2017-01-08 21:01:01 +00:00
parent 84db7e1e78
commit 168e6f1347
2 changed files with 48 additions and 37 deletions

View file

@ -1,3 +1,8 @@
2017-01-08 Fred Kiefer <FredKiefer@gmx.de>
* Source/x11/XGServerWindow.m (-_checkStyle:): Ignore invalid
border information.
2016-08-02 Fred Kiefer <FredKiefer@gmx.de>
* Source/opal/OpalFontInfo.m

View file

@ -777,7 +777,6 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
}
}
return NO;
}
@ -1062,10 +1061,10 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
{
Window parent = repp;
XWindowAttributes wattr;
float l;
float r;
float t;
float b;
int l;
int r;
int t;
int b;
/* Get the WM offset info which we hope is the same
* for all parented windows with the same style.
@ -1138,14 +1137,21 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
b = wattr.height + wattr.border_width * 2;
b -= (window->xframe.size.height + t);
o->l = l;
o->r = r;
o->t = t;
o->b = b;
if ((l >= 0) && (r >= 0) && (t >= 0) && (b >= 0))
{
o->l = (float)l;
o->r = (float)r;
o->t = (float)t;
o->b = (float)b;
o->known = YES;
NSDebugLLog(@"Offset",
@"Style %d lrtb set to %d,%d,%d,%d\n",
style, (int)o->l, (int)o->r, (int)o->t, (int)o->b);
style, l, r, t, b);
}
else
{
NSLog(@"Reparenting resulted in negative border %d, %d, %d, %d", l, r, t, b);
}
}
}