#REFACTORING by exept
authorClaus Gittinger <cg@exept.de>
Thu, 31 Oct 2019 02:31:45 +0100
changeset 8854 8673caadc450
parent 8853 c34c5c02f6d5
child 8855 e7263db023af
#REFACTORING by exept class: SimpleView added: #basicUnmap changed: #unmap
SimpleView.st
--- a/SimpleView.st	Sun Oct 20 16:39:09 2019 +0200
+++ b/SimpleView.st	Thu Oct 31 02:31:45 2019 +0100
@@ -9955,6 +9955,25 @@
     "Modified: / 17-09-2010 / 18:39:35 / cg"
 !
 
+basicUnmap
+    "unmap the view, independent of its mapped state.
+     The view stays created (but invisible), 
+     and can be remapped again later.
+     This can be called even if a map operation is underway,
+     and the view is not yet mapped in the Display"
+
+    |id|
+
+    realized := false.
+    (id := self drawableId) notNil ifTrue:[
+        device unmapWindow:id.
+
+        "/ make it go away immediately
+        "/ (this hides the subview killing)
+        self flush.
+    ].
+!
+
 closeCancel
     "for protocol compatibility with modal dialogs"
 
@@ -10677,14 +10696,7 @@
      and can be remapped again later."
 
     realized ifTrue:[
-        realized := false.
-        self drawableId notNil ifTrue:[
-            device unmapWindow:self drawableId.
-
-            "/ make it go away immediately
-            "/ (this hides the subview killing)
-            self flush.
-        ].
+        self basicUnmap.
 
         "/ Normally, this is not correct with X, where the
         "/ unmap is an asynchronous operation.