#BUGFIX by sr
authorsr
Thu, 08 Nov 2018 14:14:10 +0100
changeset 8568 0c1b574dd8c0
parent 8567 4af8f0a0fac2
child 8569 e1ce37b2b27e
#BUGFIX by sr class: WinWorkstation comment/format in: #_nativeFileDialogWithTitle:defaultFilename:owningTopView:filter:filterIndex:trueForSave:trueForMultiSelect:trueForPromptOverwrite:
WinWorkstation.st
--- a/WinWorkstation.st	Thu Nov 08 13:57:33 2018 +0100
+++ b/WinWorkstation.st	Thu Nov 08 14:14:10 2018 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
 COPYRIGHT (c) 1996 by Claus Gittinger
               All Rights Reserved
@@ -11,8 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-'From Smalltalk/X, Version:7.1.0.0 on 08-11-2018 at 11:26:08'                   !
-
 "{ Package: 'stx:libview' }"
 
 "{ NameSpace: Smalltalk }"
@@ -1032,10 +1028,18 @@
     return fileDialogThread;
 }
 
+BOOL CALLBACK _enumWindowsToFindAndDestroyFileDialogProc(HWND hwnd, LPARAM fileDialogThreadId) {
+    if (GetWindowThreadProcessId(hwnd, NULL) == (DWORD)fileDialogThreadId) {
+        PostMessage(hwnd, WM_COMMAND, IDCANCEL, 0);
+    }
+
+    return TRUE;
+};
+
 BOOL CALLBACK enumWindowsToFindAndDestroyFileDialogProc(HWND hwnd, LPARAM fileDialogThreadId) {
     if (GetWindowThreadProcessId(hwnd, NULL) == (DWORD)fileDialogThreadId) {
-        EndDialog(hwnd, 0);
-        DestroyWindow(hwnd);
+		EndDialog(hwnd, 0); //exception when running in an other process
+		DestroyWindow(hwnd);
     }
 
     return TRUE;
@@ -2183,7 +2187,7 @@
                     }
                     goto again;
                 }
-                /* fail evtl. später ändern und in st verzögert aufrufen
+                /* fail evtl. später ändern und in st verzögert aufrufen
                 */
                 console_fprintf(stderr, "WinWorkstation [info]: UnregisterClass %s failed.\n",(char*)ev->ev_arg1);
             }
@@ -2717,11 +2721,7 @@
 	    // case WM_SIZE:
 	    // case WM_MOVE:
 	    case WM_WINDOWPOSCHANGED:
-			// we think this happens only to the parent window
-			// if we do it for all we have a significant performance lost
-			if (GetParent(hWnd == NULL)) {
-				Sleep(1);
-			}
+			Sleep(0);
 	        break;
 
 	    default: break;
@@ -16917,10 +16917,13 @@
         Delay waitForSeconds:5.
 
         p terminate.
+
+        NewLauncher open
     "
 
     "Created: / 08-11-2018 / 09:11:25 / sr"
     "Modified: / 08-11-2018 / 10:39:09 / sr"
+    "Modified (comment): / 08-11-2018 / 14:12:05 / sr"
 !
 
 _primCloseNativeFileDialogByByCreationData:nativeFileDialogCreationData
@@ -20268,7 +20271,7 @@
     }
 %}
     "
-     (StandardSystemView new label:'äöü') open
+     (StandardSystemView new label:'äöü') open
     "
 !