DisplayRootView.st
changeset 134 1a09a1d7d28d
parent 109 ba47d9d6bda8
child 180 0b3a8658d55e
--- a/DisplayRootView.st	Tue Apr 11 17:56:14 1995 +0200
+++ b/DisplayRootView.st	Wed May 03 02:04:18 1995 +0200
@@ -21,11 +21,9 @@
 COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libview/DisplayRootView.st,v 1.10 1995-02-27 10:17:37 claus Exp $
+$Header: /cvs/stx/stx/libview/DisplayRootView.st,v 1.11 1995-05-03 00:01:39 claus Exp $
 '!
 
-Smalltalk at:#RootView put:nil!
-
 !DisplayRootView class methodsFor:'documentation'!
 
 copyright
@@ -44,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview/DisplayRootView.st,v 1.10 1995-02-27 10:17:37 claus Exp $
+$Header: /cvs/stx/stx/libview/DisplayRootView.st,v 1.11 1995-05-03 00:01:39 claus Exp $
 "
 !
 
@@ -53,7 +51,11 @@
     this class describes Xs rootWindow (which is the background window and
     must be used for drawing outside of Views i.e. for dragging between Views).
 
-    To draw in the root window:
+    There is one global variable (RootView) which is the Displays rootview.
+    (this is the default displays rootView; to access other devices' rootView,
+     use aDisplay rootView),
+
+    To draw in the (Displays) root window:
 
 	RootView paint:(Color red).
 	RootView fillRectangleX:10 y:10 width:100 height:100.
@@ -83,14 +85,16 @@
 
 !DisplayRootView class methodsFor:'instance creation'!
 
-new
+on:aDisplay
     "since there is only one RootView - catch new and return
      the one and only rootView."
 
-    RootView isNil ifTrue:[
-	RootView := super new
+    aDisplay == Display ifTrue:[
+	RootView notNil ifTrue:[^ RootView].
+	RootView := super on:aDisplay.
+	^ RootView
     ].
-    ^ RootView
+    ^ super on:aDisplay
 ! !
 
 !DisplayRootView methodsFor:'initialization'!
@@ -159,9 +163,13 @@
 	errorOccured := true.
 	ex return
     ] do:[
+	self enableButtonEvents.
 	device synchronizeOutput.
     ].
     ^ errorOccured
 
-    "RootView isWindowManagerRunning"
+    "
+     DisplayRootView new
+     RootView isWindowManagerRunning
+    "
 ! !