6264 " |
6262 " |
6265 WinWorkstation initializeStandardColorNames |
6263 WinWorkstation initializeStandardColorNames |
6266 " |
6264 " |
6267 ! ! |
6265 ! ! |
6268 |
6266 |
6269 !WinWorkstation class methodsFor:'actions'! |
|
6270 |
|
6271 commonSetDpiAwareModeForExpeccoBinaries:dpiAwareMode |
|
6272 |currentBinary otherBinary |
|
6273 registryKeyForDpiAware| |
|
6274 |
|
6275 currentBinary := OperatingSystem pathOfSTXExecutable asFilename. |
|
6276 currentBinary suffix asLowercase = 'exe' ifTrue:[ |
|
6277 otherBinary := currentBinary withSuffix:'com'. |
|
6278 ] ifFalse:[ |
|
6279 otherBinary := currentBinary withSuffix:'exe'. |
|
6280 ]. |
|
6281 |
|
6282 registryKeyForDpiAware := self registryKeyForHighDpiAware. |
|
6283 |
|
6284 (Array |
|
6285 with:currentBinary |
|
6286 with:otherBinary) do:[:eachBinaryFilename | |
|
6287 registryKeyForDpiAware |
|
6288 valueNamed:eachBinaryFilename nameString |
|
6289 put:dpiAwareMode. |
|
6290 ]. |
|
6291 |
|
6292 "Created: / 25-11-2019 / 09:43:56 / Stefan Reise" |
|
6293 ! |
|
6294 |
|
6295 setHighDpiAware |
|
6296 "after set this key, |
|
6297 the next started stx/expecco instance will not be scaled by windows |
|
6298 you can check for success by inspect the binary properties |
|
6299 via windows context menu of the binary" |
|
6300 |
|
6301 " |
|
6302 self unsetHighDpiAware. |
|
6303 self isApplicationHighDpiAware. |
|
6304 self setHighDpiAware. |
|
6305 self isApplicationHighDpiAware. |
|
6306 " |
|
6307 |
|
6308 self commonSetDpiAwareModeForExpeccoBinaries:self registryValueForHighDpiAware. |
|
6309 |
|
6310 "Created: / 25-11-2019 / 09:44:30 / Stefan Reise" |
|
6311 ! |
|
6312 |
|
6313 unsetHighDpiAware |
|
6314 "after unset this key, |
|
6315 the next started stx/expecco instance will be scaled by windows |
|
6316 you can check for success by inspect the binary properties |
|
6317 via windows context menu of the binary" |
|
6318 |
|
6319 " |
|
6320 self unsetHighDpiAware. |
|
6321 self isApplicationHighDpiAware. |
|
6322 self setHighDpiAware. |
|
6323 self isApplicationHighDpiAware. |
|
6324 " |
|
6325 |
|
6326 self commonSetDpiAwareModeForExpeccoBinaries:self regitsryValueForHighDpiUnAware. |
|
6327 |
|
6328 "Created: / 25-11-2019 / 09:44:55 / Stefan Reise" |
|
6329 ! ! |
|
6330 |
|
6331 !WinWorkstation class methodsFor:'constants'! |
|
6332 |
|
6333 registryValueForHighDpiAware |
|
6334 ^ '~HIGHDPIAWARE' |
|
6335 |
|
6336 "Created: / 25-11-2019 / 09:52:25 / Stefan Reise" |
|
6337 ! |
|
6338 |
|
6339 regitsryValueForHighDpiUnAware |
|
6340 ^ '~DPIUNAWARE' |
|
6341 |
|
6342 "Created: / 25-11-2019 / 09:53:30 / Stefan Reise" |
|
6343 ! ! |
|
6344 |
|
6345 !WinWorkstation class methodsFor:'converting'! |
6267 !WinWorkstation class methodsFor:'converting'! |
6346 |
6268 |
6347 convertVirtualResolutionPointToCurrentResolutionPoint:aPoint |
6269 convertVirtualResolutionPointToCurrentResolutionPoint:aPoint |
6348 "this is required when you want to access the root display coordinates correctly, |
6270 "this is required when you want to access the root display coordinates correctly, |
6349 because may the os did scale the application (when the app is not high DPI aware), |
6271 because may the os did scale the application (when the app is not high DPI aware), |
6786 WinWorkstation always returns 'WIN32'." |
6708 WinWorkstation always returns 'WIN32'." |
6787 |
6709 |
6788 ^ 'WIN32' |
6710 ^ 'WIN32' |
6789 |
6711 |
6790 "Modified: 26.5.1996 / 15:32:46 / cg" |
6712 "Modified: 26.5.1996 / 15:32:46 / cg" |
6791 ! |
|
6792 |
|
6793 registryKeyForHighDpiAware |
|
6794 " |
|
6795 self registryKeyForHighDpiAware |
|
6796 " |
|
6797 |
|
6798 ^ Win32OperatingSystem::RegistryEntry |
|
6799 key:'HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers' |
|
6800 createIfAbsent:true. |
|
6801 |
|
6802 "Created: / 25-11-2019 / 09:51:45 / Stefan Reise" |
|
6803 ! ! |
6713 ! ! |
6804 |
6714 |
6805 !WinWorkstation class methodsFor:'queries - monitor'! |
6715 !WinWorkstation class methodsFor:'queries - monitor'! |
6806 |
6716 |
6807 monitorDeviceNameForPoint:aPoint |
6717 monitorDeviceNameForPoint:aPoint |