WinWorkstation.st
changeset 8865 62e5d5311788
parent 8863 3552fb896324
child 8866 486bee55512e
--- a/WinWorkstation.st	Fri Nov 15 09:46:06 2019 +0100
+++ b/WinWorkstation.st	Fri Nov 15 09:55:03 2019 +0100
@@ -6624,6 +6624,11 @@
 
     output := '' writeStream.
 
+    aFilename exists ifFalse:[
+        'tool binary "', aFilename nameString, '" is missing"' errorPrintCR.
+        ^ nil
+    ].
+
     OperatingSystem
         executeCommand:aFilename pathName
         outputTo:output 
@@ -6645,7 +6650,21 @@
         self displayScaleFactor          
     "
 
-    ^ self currentDisplayResolution / self virtualDisplayResolution
+    |currentDisplayResolution virtualDisplayResolution|
+
+    currentDisplayResolution := self currentDisplayResolution.
+    currentDisplayResolution isNil ifTrue:[
+        "may the tool binary is missing (this is already catched in #displayResolutionFromTool:)"
+        ^ 1@1
+    ].
+
+    virtualDisplayResolution := self virtualDisplayResolution.
+    virtualDisplayResolution isNil ifTrue:[
+        "may the tool binary is missing (this is already catched in #displayResolutionFromTool:)"
+        ^ 1@1
+    ].
+
+    ^ currentDisplayResolution / virtualDisplayResolution
 
     "Created: / 15-11-2019 / 09:43:53 / Stefan Reise"
 !
@@ -6670,10 +6689,22 @@
     "this is the factor we need to adopt for the root display coordinates,
      if windows did scale the application (when the app is not high DPI aware"
 
-    ^ self currentDisplayResolution / Display extent
+    "
+        self scaleFactorForRootDisplayCoordinates 
+    "
+
+    |currentDisplayResolution|
+
+    currentDisplayResolution := self currentDisplayResolution.
+    currentDisplayResolution isNil ifTrue:[
+        "may the tool binary is missing (this is already catched in #displayResolutionFromTool:)"
+        ^ super scaleFactorForRootDisplayCoordinates
+    ].
+
+    ^ currentDisplayResolution / Display extent
 
     "Created: / 14-11-2019 / 13:36:59 / Stefan Reise"
-    "Modified: / 15-11-2019 / 09:42:27 / Stefan Reise"
+    "Modified: / 15-11-2019 / 09:54:28 / Stefan Reise"
 !
 
 virtualDisplayResolution