XWorkstation.st
changeset 3630 2b2f6649c014
parent 3615 3c21a3522fca
child 3647 91340b09e045
--- a/XWorkstation.st	Wed May 15 10:07:34 2002 +0200
+++ b/XWorkstation.st	Tue May 21 10:09:26 2002 +0200
@@ -10,6 +10,8 @@
  hereby transferred.
 "
 
+'From Smalltalk/X, Version:4.1.4 on 20-Mai-2002 at 15:13:38'                    !
+
 "{ Package: 'stx:libview' }"
 
 DeviceWorkstation subclass:#XWorkstation
@@ -477,8 +479,6 @@
 initialize
     |d|
 
-    super initialize.
-
     ConservativeSync := OperatingSystem platformName == #win32.
 
     "/ some XServers crash, when given too long strings in XDrawString/XDrawInageString.
@@ -486,17 +486,17 @@
     MaxStringLength := 4096.
 
     RawKeySymTranslation isNil ifTrue:[
-	"/ the following table maps X-keyevents to ST/X
-	"/ device independed events. 
-	"/ It is NOT meant as a keyboardMap replacement.
-
-	RawKeySymTranslation := d := Dictionary new.
-	d at:'Delete_line' put:#DeleteLine.
-	d at:'Delete_word' put:#DeleteWord.
-	d at:'Down' put:#CursorDown.
-	d at:'Up' put:#CursorUp.
-	d at:'Left' put:#CursorLeft.
-	d at:'Right' put:#CursorRight.
+        "/ the following table maps X-keyevents to ST/X
+        "/ device independend events. 
+        "/ It is NOT meant as a keyboardMap replacement.
+
+        RawKeySymTranslation := d := Dictionary new.
+        d at:'Delete_line' put:#DeleteLine.
+        d at:'Delete_word' put:#DeleteWord.
+        d at:'Down' put:#CursorDown.
+        d at:'Up' put:#CursorUp.
+        d at:'Left' put:#CursorLeft.
+        d at:'Right' put:#CursorRight.
     ]
 
     "Modified: / 27.4.1999 / 17:21:30 / cg"
@@ -8521,39 +8521,16 @@
      DISPLAY-variable or command line argument) or the name of the server 
      as hostname:number"
 
-    |dpyName index arguments|
-
     displayId notNil ifTrue:[
-	"/ already connected - you bad guy try to trick me manually ?
-	^ self
-    ].
-
-    dpyName := aDisplayName.
-    dpyName isNil ifTrue:[
-	"look for a '-display xxx' argument"
-	(arguments := Smalltalk commandLineArguments) notNil ifTrue:[
-	    index := arguments indexOf:'-display'.
-	    (index between:1 and:(arguments size - 1)) ifTrue:[
-		dpyName := arguments at:index+1
-	    ]
-	].
-	dpyName isNil ifTrue:[
-	    dpyName := OperatingSystem getEnvironment:'DISPLAY'.
-	].
-    ].
-
-    displayId := self openConnectionTo:dpyName.
-
+        "/ already connected - you bad guy try to trick me manually ?
+        ^ self
+    ].
+
+    displayId := self openConnectionTo:aDisplayName.
     displayId isNil ifTrue:[
-	"/ could not connect.
-	"/ only output a message, if running under X
-
-	((OperatingSystem isMSWINDOWSlike not) or:[WinWorkstation isNil]) ifTrue:[
-	    'XWorkstation [warning]: cannot connect to Display (' infoPrint.
-	    (dpyName ? ((OperatingSystem getEnvironment:'Display') ? 'default')) infoPrint.
-	    ')' infoPrintCR.
-	].
-	^ nil
+        "/ could not connect.
+        DeviceOpenErrorSignal raiseWith:aDisplayName.
+        ^ nil
     ].
 
     dispatching := false.
@@ -8565,7 +8542,7 @@
     altDown := false.
     motionEventCompression := true.
     buttonsPressed := 0.
-    displayName := dpyName.
+    displayName := aDisplayName.
 
     listOfXFonts := nil.
 
@@ -11774,6 +11751,6 @@
 !XWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.407 2002-04-09 14:45:09 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.408 2002-05-21 08:09:26 stefan Exp $'
 ! !
 XWorkstation initialize!