2002/10/12 19:52:38
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:50:44 +0000 (06:50 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:50:44 +0000 (06:50 +0000)
darcs-hash:20040130065044-2ba56-c2f788b179dae8187b1cb9680571b595fe7eb8d9.gz

CHANGES
src/org/xwt/plat/POSIX.cc

diff --git a/CHANGES b/CHANGES
index a454b2a..631953d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
 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
+
index 919fc58..f34fbdf 100644 (file)
@@ -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)));