diff options
3 files changed, 14 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java index 39737ff830..cf64bee95c 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java @@ -373,8 +373,15 @@ protected void release () { COLOR_BLACK = COLOR_DARK_RED = COLOR_DARK_GREEN = COLOR_DARK_YELLOW =
COLOR_DARK_BLUE = COLOR_DARK_MAGENTA = COLOR_DARK_CYAN = COLOR_GRAY = COLOR_DARK_GRAY = COLOR_RED =
COLOR_GREEN = COLOR_YELLOW = COLOR_BLUE = COLOR_MAGENTA = COLOR_CYAN = COLOR_WHITE = null;
-
- /* Release the warning and error callbacks */
+ + /* Restore original warning and error handlers */
+ int xtContext = OS.XtDisplayToApplicationContext (xDisplay); + OS.XtAppSetWarningHandler (xtContext, xtWarningProc); + OS.XSetErrorHandler (xErrorProc); + OS.XtAppSetErrorHandler (xtContext, xtErrorProc); + OS.XSetIOErrorHandler (xIOErrorProc); + + /* Release the warning and error callbacks */ xtWarningCallback.dispose (); xtWarningCallback = null;
xtWarningProc = 0;
xErrorCallback.dispose (); xErrorCallback = null;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java index a842c12ea9..a3d10bfd9a 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java @@ -1045,7 +1045,6 @@ synchronized void register () { Displays = newDisplays;
}
protected void release () {
- super.release ();
/* Release shells */
Shell [] shells = WidgetTable.shells ();
@@ -1068,7 +1067,9 @@ protected void release () { /* Release synchronizer */
synchronizer.releaseSynchronizer ();
synchronizer = null;
- releaseDisplay ();
+ releaseDisplay (); + + super.release ();
}
void releaseDisplay () {
/* Dispose the caret callback */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java index 427f60dc16..6e33073673 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java @@ -1049,7 +1049,6 @@ synchronized void register () { * @see #destroy
*/
protected void release () {
- super.release ();
/* Release shells */
Shell [] shells = WidgetTable.shells ();
@@ -1074,6 +1073,8 @@ protected void release () { synchronizer = null;
releaseDisplay ();
+
+ super.release ();
}
void releaseDisplay () {
|