Commit 1eabbcb45367ba53120e04968ed2efeeb6f5acd6

Just van Rossum 2000-03-05T16:09:21

properly behave in case the console window became active

diff --git a/demos/graph/mac/grmac.c b/demos/graph/mac/grmac.c
index b1435b4..189776a 100644
--- a/demos/graph/mac/grmac.c
+++ b/demos/graph/mac/grmac.c
@@ -198,6 +198,7 @@
           case updateEvt:
             if ( theWindow && (WindowPtr)mac_event.message == theWindow )
             {
+              SetPort( theWindow );
               BeginUpdate( theWindow );
               refresh_rectangle( surface,
                                  0, 0,
@@ -231,6 +232,10 @@
                     return;
                   }
                 }
+                else if (part == inContent)
+                {
+                  SelectWindow( theWindow );
+                }
               }
               else
               {