11 " |
11 " |
12 |
12 |
13 "{ Package: 'stx:libview' }" |
13 "{ Package: 'stx:libview' }" |
14 |
14 |
15 HostGraphicsDevice subclass:#DeviceWorkstation |
15 HostGraphicsDevice subclass:#DeviceWorkstation |
16 instanceVariableNames:'visualType monitorType depth ncells bitsPerRGB bitsRed bitsGreen |
16 instanceVariableNames:'visualType monitorType depth ncells bitsPerRGB bitsRed bitsGreen |
17 bitsBlue redMask greenMask blueMask redShift greenShift blueShift |
17 bitsBlue redMask greenMask blueMask redShift greenShift blueShift |
18 hasColors hasGreyscales width height widthMM heightMM |
18 hasColors hasGreyscales width height widthMM heightMM |
19 resolutionHor resolutionVer idToTableIndexMapping knownViews |
19 resolutionHor resolutionVer idToTableIndexMapping knownViews |
20 knownIds knownBitmaps knownBitmapIds dispatching dispatchProcess |
20 knownIds knownBitmaps knownBitmapIds dispatching dispatchProcess |
21 exitOnLastClose ctrlDown shiftDown metaDown altDown superDown |
21 exitOnLastClose ctrlDown shiftDown metaDown altDown superDown |
22 motionEventCompression lastId lastView keyboardMap rootView |
22 motionEventCompression lastId lastView keyboardMap rootView |
23 isSlow activeKeyboardGrab activePointerGrab buttonTranslation |
23 isSlow activeKeyboardGrab activePointerGrab buttonTranslation |
24 multiClickTimeDelta altModifiers metaModifiers ctrlModifiers |
24 multiClickTimeDelta altModifiers metaModifiers ctrlModifiers |
25 shiftModifiers superModifiers supportsDeepIcons preferredIconSize |
25 shiftModifiers superModifiers supportsDeepIcons preferredIconSize |
26 ditherColors fixColors numFixRed numFixGreen numFixBlue |
26 ditherColors fixColors numFixRed numFixGreen numFixBlue |
27 fixGrayColors copyBuffer lastCopyBuffer blackColor whiteColor |
27 fixGrayColors copyBuffer lastCopyBuffer blackColor whiteColor |
28 focusMode activeView clipBoardEncoding focusView |
28 focusMode activeView clipBoardEncoding focusView |
29 deviceErrorSignal deviceIOErrorSignal' |
29 deviceErrorSignal deviceIOErrorSignal' |
30 classVariableNames:'ButtonTranslation MultiClickTimeDelta DeviceErrorSignal |
30 classVariableNames:'ButtonTranslation MultiClickTimeDelta DeviceErrorSignal |
31 DeviceIOErrorSignal DeviceIOTimeoutErrorSignal ErrorPrinting |
31 DeviceIOErrorSignal DeviceIOTimeoutErrorSignal ErrorPrinting |
32 DefaultScreen AllScreens CurrentScreenQuerySignal |
32 DefaultScreen AllScreens CurrentScreenQuerySignal |
33 LastActiveScreen LastActiveProcess WindowsRightButtonBehavior |
33 LastActiveScreen LastActiveProcess WindowsRightButtonBehavior |
34 ExitOnLastClose DrawingOnClosedDeviceSignal' |
34 ExitOnLastClose DrawingOnClosedDeviceSignal' |
35 poolDictionaries:'' |
35 poolDictionaries:'' |
36 category:'Interface-Graphics' |
36 category:'Interface-Graphics' |
37 ! |
37 ! |
38 |
38 |
39 !DeviceWorkstation class methodsFor:'documentation'! |
39 !DeviceWorkstation class methodsFor:'documentation'! |
40 |
40 |
41 copyright |
41 copyright |
1363 viewIdFromPoint:aPoint |
1363 viewIdFromPoint:aPoint |
1364 "given a point on the screen, return the id of the ST/X view in which that |
1364 "given a point on the screen, return the id of the ST/X view in which that |
1365 point is (this may be a subview). Return nil, if its not an ST/X view |
1365 point is (this may be a subview). Return nil, if its not an ST/X view |
1366 or if the point is on the background" |
1366 or if the point is on the background" |
1367 |
1367 |
1368 |id searchId foundId| |
1368 |searchId foundId| |
1369 |
1369 |
1370 searchId := self rootWindowId. |
1370 searchId := self realRootWindowId. |
1371 |
1371 |
1372 "/ this is required, since X raises a bad error, when we come |
1372 "/ this is required, since X raises a bad error, when we come |
1373 "/ along with an illegal id (which happens, if a view from another |
1373 "/ along with an illegal id (which happens, if a view from another |
1374 "/ screen-device is picked ...) |
1374 "/ screen-device is picked ...) |
1375 self class deviceErrorSignal handle:[:ex | |
1375 self class deviceErrorSignal handle:[:ex | |
1376 ^ nil |
1376 ^ nil |
1377 ] do:[ |
1377 ] do:[ |
1378 [searchId notNil] whileTrue:[ |
1378 [searchId notNil] whileTrue:[ |
1379 id := self viewIdFromPoint:aPoint in:searchId. |
|
1380 foundId := searchId. |
1379 foundId := searchId. |
1381 searchId := id |
1380 searchId := self viewIdFromPoint:aPoint in:searchId. |
1382 ] |
1381 ] |
1383 ]. |
1382 ]. |
1384 ^ foundId |
1383 ^ foundId |
1385 ! |
1384 ! |
1386 |
1385 |