From: megacz Date: Fri, 30 Jan 2004 06:50:44 +0000 (+0000) Subject: 2002/10/12 19:52:38 X-Git-Tag: RC3~1522 X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=commitdiff_plain;h=8d44375ac86a300253950148489e05a485dc1cbc 2002/10/12 19:52:38 darcs-hash:20040130065044-2ba56-c2f788b179dae8187b1cb9680571b595fe7eb8d9.gz --- diff --git a/CHANGES b/CHANGES index a454b2a..631953d 100644 --- a/CHANGES +++ b/CHANGES @@ -432,3 +432,6 @@ 03-Oct megacz XWT.java: made recursivePrintObject public so we can access it. +03-Oct megacz POSIX.cc: fixed a bug that was causing phantom messages + after window deletion + diff --git a/src/org/xwt/plat/POSIX.cc b/src/org/xwt/plat/POSIX.cc index 919fc58..f34fbdf 100644 --- a/src/org/xwt/plat/POSIX.cc +++ b/src/org/xwt/plat/POSIX.cc @@ -382,11 +382,16 @@ void org::xwt::plat::POSIX$X11Surface::setSize (jint width, jint height) { XFlush(display); } -void org::xwt::plat::POSIX$X11Surface::_dispose() { XDestroyWindow(display, (*((Window*)window))); } void org::xwt::plat::POSIX$X11Surface::setLocation (jint x, jint y) { XMoveWindow(display, (*((Window*)window)), x, y); } void org::xwt::plat::POSIX$X11Surface::toFront() { XRaiseWindow(display, (*((Window*)window))); } void org::xwt::plat::POSIX$X11Surface::toBack() { XLowerWindow(display, (*((Window*)window))); } +void org::xwt::plat::POSIX$X11Surface::_dispose() { + // without this we get phantom messages after the window is gone + org::xwt::plat::POSIX::windowToSurfaceMap->remove(new java::lang::Long(*((Window*)window))); + XDestroyWindow(display, (*((Window*)window))); +} + void org::xwt::plat::POSIX$X11Surface::setInvisible(jboolean i) { if (i) XUnmapWindow(display, (*((Window*)window))); else XMapRaised(display, (*((Window*)window)));