506 " |
513 " |
507 show a stop-cursor in the current group |
514 show a stop-cursor in the current group |
508 " |
515 " |
509 mainGroup := WindowGroup activeGroup. |
516 mainGroup := WindowGroup activeGroup. |
510 mainGroup notNil ifTrue:[ |
517 mainGroup notNil ifTrue:[ |
511 mainGroup := mainGroup mainGroup. |
518 mainGroup := mainGroup mainGroup. |
512 mainGroup notNil ifTrue:[ |
519 mainGroup notNil ifTrue:[ |
513 mainGroup showCursor:(Cursor stop). |
520 mainGroup showCursor:(Cursor stop). |
514 ] |
521 ] |
515 ]. |
522 ]. |
516 |
523 |
517 mainGroup isNil ifTrue:[ |
524 mainGroup isNil ifTrue:[ |
518 useTransient := false |
525 useTransient := false |
519 ]. |
526 ]. |
520 |
527 |
521 useTransient ifTrue:[ |
528 useTransient ifTrue:[ |
522 mainGroup topViews notNil ifTrue:[ |
529 mainGroup topViews notNil ifTrue:[ |
523 mainView := mainGroup topViews first. |
530 mainView := mainGroup topViews first. |
524 ]. |
531 ]. |
525 mainView isNil ifTrue:[ |
532 mainView isNil ifTrue:[ |
526 useTransient := false. |
533 useTransient := false. |
527 ] |
534 ] |
528 ]. |
535 ]. |
529 |
536 |
530 useTransient ifTrue:[ |
537 useTransient ifTrue:[ |
531 shadowView := nil. |
538 shadowView := nil. |
532 ] ifFalse:[ |
539 ] ifFalse:[ |
533 shadowView notNil ifTrue:[shadowView realize]. |
540 shadowView notNil ifTrue:[shadowView realize]. |
534 ]. |
541 ]. |
535 self raise. |
542 self raise. |
536 |
543 |
537 useTransient ifTrue:[ |
544 useTransient ifTrue:[ |
538 device setTransient:drawableId for:(mainView id). |
545 device setTransient:drawableId for:(mainView id). |
539 ]. |
546 ]. |
540 |
547 |
541 [ |
548 [ |
542 super openModal:aBlock inGroup:mainGroup. |
549 super openModal:aBlock inGroup:mainGroup. |
543 ] valueNowOrOnUnwindDo:[ |
550 ] valueNowOrOnUnwindDo:[ |
544 " |
551 " |
545 restore cursors in the main group |
552 restore cursors in the main group |
546 " |
553 " |
547 mainGroup notNil ifTrue:[ |
554 mainGroup notNil ifTrue:[ |
548 mainGroup restoreCursors. |
555 mainGroup restoreCursors. |
549 mainGroup sensor flushUserEvents. |
556 mainGroup sensor flushUserEvents. |
550 ] |
557 ] |
551 ]. |
558 ]. |
552 |
559 |
553 "/ mainGroup notNil ifTrue:[ |
560 "/ mainGroup notNil ifTrue:[ |
554 "/ " |
561 "/ " |
555 "/ flush any key & mouse events which arrived |
562 "/ flush any key & mouse events which arrived |