mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-30 17:00:52 +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
f70285cfc7
commit
c0df36607b
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>
|
2009-03-06 Xavier Glattard <xavier.glattard@online.fr>
|
||||||
|
|
||||||
* Source/x11/XGGLFormat.m:
|
* Source/x11/XGGLFormat.m:
|
||||||
|
|
|
@ -958,7 +958,7 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym)
|
||||||
NSDebugLLog(@"NSEvent", @"%d Expose\n",
|
NSDebugLLog(@"NSEvent", @"%d Expose\n",
|
||||||
xEvent.xexpose.window);
|
xEvent.xexpose.window);
|
||||||
{
|
{
|
||||||
BOOL isSubWindow;
|
BOOL isSubWindow = NO;
|
||||||
|
|
||||||
if (cWin == 0 || xEvent.xexpose.window != cWin->ident)
|
if (cWin == 0 || xEvent.xexpose.window != cWin->ident)
|
||||||
{
|
{
|
||||||
|
@ -969,9 +969,14 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym)
|
||||||
{
|
{
|
||||||
Window xw;
|
Window xw;
|
||||||
xw = xEvent.xexpose.window;
|
xw = xEvent.xexpose.window;
|
||||||
|
XWindowAttributes wa;
|
||||||
|
// We should not found more than one level, but who knows ?
|
||||||
while (cWin == 0)
|
while (cWin == 0)
|
||||||
{
|
{
|
||||||
Window rw, *cw; unsigned int nc;
|
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) )
|
if ( !XQueryTree(dpy, xw, &rw, &xw, &cw, &nc) )
|
||||||
continue;
|
continue;
|
||||||
if ( cw != NULL )
|
if ( cw != NULL )
|
||||||
|
@ -989,20 +994,8 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym)
|
||||||
{
|
{
|
||||||
XRectangle rectangle;
|
XRectangle rectangle;
|
||||||
|
|
||||||
if ( !isSubWindow )
|
rectangle.x = xEvent.xexpose.x;
|
||||||
{
|
rectangle.y = xEvent.xexpose.y;
|
||||||
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.width = xEvent.xexpose.width;
|
rectangle.width = xEvent.xexpose.width;
|
||||||
rectangle.height = xEvent.xexpose.height;
|
rectangle.height = xEvent.xexpose.height;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue