mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 20:01:22 +00:00
Fix a bug (from rev.28036)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28049 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6226804e56
commit
a764159165
2 changed files with 14 additions and 15 deletions
|
@ -1,3 +1,9 @@
|
|||
2009-03-07 Xavier Glattard <xavier.glattard@online.fr>
|
||||
|
||||
* Source/x11/XGServerEvent.m:
|
||||
Fix a bug (from rev.28036) and consolidate the computing of expose rectangle
|
||||
of subwindows.
|
||||
|
||||
2009-03-06 Xavier Glattard <xavier.glattard@online.fr>
|
||||
|
||||
* Source/x11/XGGLFormat.m:
|
||||
|
|
|
@ -958,7 +958,7 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym)
|
|||
NSDebugLLog(@"NSEvent", @"%d Expose\n",
|
||||
xEvent.xexpose.window);
|
||||
{
|
||||
BOOL isSubWindow;
|
||||
BOOL isSubWindow = NO;
|
||||
|
||||
if (cWin == 0 || xEvent.xexpose.window != cWin->ident)
|
||||
{
|
||||
|
@ -969,9 +969,14 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym)
|
|||
{
|
||||
Window xw;
|
||||
xw = xEvent.xexpose.window;
|
||||
XWindowAttributes wa;
|
||||
// We should not found more than one level, but who knows ?
|
||||
while (cWin == 0)
|
||||
{
|
||||
Window rw, *cw; unsigned int nc;
|
||||
XGetWindowAttributes(dpy,xEvent.xexpose.window,&wa);
|
||||
xEvent.xexpose.x += wa.x;
|
||||
xEvent.xexpose.y += wa.y;
|
||||
if ( !XQueryTree(dpy, xw, &rw, &xw, &cw, &nc) )
|
||||
continue;
|
||||
if ( cw != NULL )
|
||||
|
@ -989,20 +994,8 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym)
|
|||
{
|
||||
XRectangle rectangle;
|
||||
|
||||
if ( !isSubWindow )
|
||||
{
|
||||
rectangle.x = xEvent.xexpose.x;
|
||||
rectangle.y = xEvent.xexpose.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
// assume no border
|
||||
XWindowAttributes wa;
|
||||
XGetWindowAttributes(dpy,xEvent.xexpose.window,&wa);
|
||||
rectangle.x = xEvent.xexpose.x+wa.x;
|
||||
rectangle.y = xEvent.xexpose.y+wa.y;
|
||||
}
|
||||
|
||||
rectangle.x = xEvent.xexpose.x;
|
||||
rectangle.y = xEvent.xexpose.y;
|
||||
rectangle.width = xEvent.xexpose.width;
|
||||
rectangle.height = xEvent.xexpose.height;
|
||||
|
||||
|
|
Loading…
Reference in a new issue