StandardSystemView.st
branchjv
changeset 7286 c3b4c3c664d4
parent 7143 e216536ea990
parent 7263 9036d75c2799
child 7400 b583f17b4b39
--- a/StandardSystemView.st	Sun Apr 03 16:05:41 2016 +0100
+++ b/StandardSystemView.st	Sun Apr 03 17:09:29 2016 +0100
@@ -705,7 +705,7 @@
         ].
 
         (id := self drawableId) notNil ifTrue:[
-            self graphicsDevice setWindowMinExtent:nil maxExtent:max in:id
+            device setWindowMinExtent:nil maxExtent:max in:id
         ].
 
         "/ if my current extent is larger than the new
@@ -735,7 +735,7 @@
     minExtent ~= min ifTrue:[
         minExtent := min.
         (id := self drawableId) notNil ifTrue:[
-            self graphicsDevice setWindowMinExtent:min maxExtent:nil in:id
+            device setWindowMinExtent:min maxExtent:nil in:id
         ].
 
         "/ if my current extent is smaller than the new
@@ -767,12 +767,12 @@
     iconValue := icon value.
     iconValue notNil ifTrue:[
         self drawableId notNil ifTrue:[
-            i := self graphicsDevice convertedIcon:iconValue.
+            i := device convertedIcon:iconValue.
             (i notNil and:[i id notNil]) ifTrue:[
                 (m := iconValue mask) notNil ifTrue:[
-                    m := self graphicsDevice convertedIconMask:m.
+                    m := device convertedIconMask:m.
                 ].
-                self graphicsDevice setWindowIcon:i mask:m in:self drawableId
+                device setWindowIcon:i mask:m in:self drawableId
             ]
         ]
     ]
@@ -794,7 +794,7 @@
     (newLabel := aString string) ~= iconLabel ifTrue:[
         iconLabel := newLabel.
         self drawableId notNil ifTrue:[
-            self graphicsDevice setIconName:newLabel in:self drawableId.
+            device setIconName:newLabel in:self drawableId.
             "
              unbuffered - to make it visible right NOW
             "
@@ -814,7 +814,7 @@
     "/ only images possibly have iconMasks
     icon notNil ifTrue:[
         (mask := icon value mask) notNil ifTrue:[
-            ^ self graphicsDevice convertedIconMask:mask
+            ^ device convertedIconMask:mask
         ]
     ].
 
@@ -845,7 +845,7 @@
     iconView := aView.
     self drawableId notNil ifTrue:[
         aView create.
-        self graphicsDevice setWindowIconWindow:aView in:self drawableId.
+        device setWindowIconWindow:aView in:self drawableId.
         aView setRealized:true.
     ]
 
@@ -1014,7 +1014,7 @@
         "/ I only get a focus in. Could be a race, when the loosing view is already destroyed,
         "/ at the time the focus event arrives.
         "/ Anyway: it should not matter to take it again...
-        WindowGroup takeFocusFromDevice:self graphicsDevice.
+        WindowGroup takeFocusFromDevice:device.
 
         windowGroup isInModalLoop ifTrue:[
             windowGroup allTopViewsDo:[:t |
@@ -1169,7 +1169,7 @@
     super initialize.
 
     "/ self setBorderWidth:2.         "- notice: many window managers ignore this"
-    self graphicsDevice isWindowsPlatform ifTrue:[
+    device isWindowsPlatform ifTrue:[
         minExtent := 0 @ 0.
     ] ifFalse:[
         minExtent := 10 @ 10.
@@ -1184,7 +1184,7 @@
 
 mapped
     super mapped.
-    self graphicsDevice isWindowsPlatform ifTrue:[
+    device isWindowsPlatform ifTrue:[
         "don't do this in X11 - switching between 
          virtual desktops would change the window stacking all the time"
         self setForegroundWindow.
@@ -1201,7 +1201,7 @@
 
     |dX dY limitRight limitBottom graphicsDevice|
 
-    graphicsDevice := self graphicsDevice.
+    graphicsDevice := device.
     dX := (graphicsDevice horizontalPixelPerMillimeter * 20) rounded.
     dY := (graphicsDevice verticalPixelPerMillimeter * 20) rounded.
 
@@ -1239,7 +1239,7 @@
     self recreate.
 
     "if I was iconified (not realized), remap iconified"
-    self graphicsDevice
+    device
         mapView:self id:self drawableId iconified:(realized "shown" not)
         atX:left y:top width:width height:height
         minExtent:minExtent maxExtent:maxExtent.
@@ -1301,7 +1301,7 @@
      this means converting it to a format (typically: monochrome) which
      the device supports. Return a compatible version of the icon."
 
-    ^ self graphicsDevice convertedIcon:icon
+    ^ device convertedIcon:icon
 
     "Modified: / 30-10-2007 / 16:39:55 / cg"
 !
@@ -1311,7 +1311,7 @@
      this means converting it to a format (typically: monochrome) which
      the device supports. Return a compatible version of the icon."
 
-    ^ self graphicsDevice convertedIcon:iconArg
+    ^ device convertedIcon:iconArg
 
     "Modified: / 30-10-2007 / 16:37:31 / cg"
 !
@@ -1322,7 +1322,7 @@
      mask - future versions may add alpha channel masks, if the device supports
      them ..."
 
-    ^ self graphicsDevice convertedIconMask:aMask
+    ^ device convertedIconMask:aMask
 
     "Modified: / 30-10-2007 / 16:38:58 / cg"
 !
@@ -1429,7 +1429,7 @@
         self unmap.
 
         "if it was iconified, try to remap iconified"
-        self graphicsDevice
+        device
             mapView:self id:self drawableId iconified:true
             atX:left y:top width:width height:height
             minExtent:minExtent maxExtent:maxExtent.
@@ -1462,11 +1462,11 @@
 
     iconView notNil ifTrue:[
         iconView create.
-        self graphicsDevice setWindowIconWindow:iconView in:self drawableId.
+        device setWindowIconWindow:iconView in:self drawableId.
         iconView setRealized:true.
     ].
     iconLabel notNil ifTrue:[
-        self graphicsDevice setIconName:iconLabel string in:self drawableId
+        device setIconName:iconLabel string in:self drawableId
     ]
 
     "Modified: 10.6.1996 / 20:14:50 / cg"
@@ -1479,7 +1479,7 @@
         self unmap.
 
         "if it was iconified, try to remap non-iconified"
-        self graphicsDevice
+        device
             mapView:self id:self drawableId iconified:false
             atX:left y:top width:width height:height
             minExtent:minExtent maxExtent:maxExtent.
@@ -1502,11 +1502,11 @@
 physicalCreate
     "common code for create & recreate"
 
-    |dev lbl iconValue icn icnMask windowClassNameString org devBounds windowNameString|
+    |dev currentUserPrefs lbl iconValue icn icnMask windowClassNameString org devBounds windowNameString|
 
-    dev := self device.
-
-    UserPreferences current forceWindowsIntoMonitorBounds ifTrue:[
+    dev := device.
+    currentUserPrefs := UserPreferences current.
+    currentUserPrefs forceWindowsIntoMonitorBounds ifTrue:[
         "/ MULTI SCREEN support
         devBounds := dev monitorBoundsAt:( left @ top ).
         "/ adjust origin, if too large
@@ -1627,16 +1627,16 @@
 
     iconView notNil ifTrue:[
         iconView recreate.
-        self graphicsDevice setWindowIconWindow:iconView in:self drawableId.
+        device setWindowIconWindow:iconView in:self drawableId.
         iconView setRealized:true.
     ] ifFalse:[
         icon notNil ifTrue:[
-            self icon:(self graphicsDevice convertedIcon:icon).
+            self icon:(device convertedIcon:icon).
         ].
     ].
 
     iconLabel notNil ifTrue:[
-        self graphicsDevice setIconName:iconLabel in:self drawableId
+        device setIconName:iconLabel in:self drawableId
     ]
 
     "Modified: / 30-10-2007 / 16:39:42 / cg"