WinWorkstation.st
changeset 6601 b8861e87960d
parent 6590 fbca4476f22c
child 6878 169a9035ae52
child 7300 f50e0af3caba
--- a/WinWorkstation.st	Tue Nov 18 15:26:53 2014 +0100
+++ b/WinWorkstation.st	Wed Nov 19 17:06:55 2014 +0100
@@ -7755,17 +7755,17 @@
     |info fullHeight usableHeight delta|
 
     true "(self numberOfMonitors) > 1" ifTrue:[
-        "/ ******* MULTI SCREEN ******
-        info := self monitorInfoFor:(self monitorHandleForPoint:aPoint).
-        info notNil ifTrue:[
-            ^ info workHeight
-
-        "/ only works with single screen..
+	"/ ******* MULTI SCREEN ******
+	info := self monitorInfoFor:(self monitorHandleForPoint:aPoint).
+	info notNil ifTrue:[
+	    ^ info workHeight
+
+	"/ only works with single screen..
 "/            fullHeight := self getSystemMetrics:#SM_CYVIRTUALSCREEN.
 "/            usableHeight := self getSystemMetrics:#SM_CYFULLSCREEN.  "/ without any start-menu bar
 "/            delta := fullHeight - usableHeight.
 "/            ^ info workHeight - delta
-        ].
+	].
     ].
     ^ self usableHeight
 
@@ -11420,24 +11420,24 @@
     |wg screenPoint targetView|
 
     aView isNil ifTrue:[
-        "/ event arrived, after I destroyed it myself
-        ^ self
+	"/ event arrived, after I destroyed it myself
+	^ self
     ].
 
     UserPreferences current mouseWheelFocusFollowsMouse ifTrue:[
-        screenPoint := self translatePointToRoot:(x@y) fromView:aView.
-        targetView := self viewFromPoint:screenPoint.
+	screenPoint := self translatePointToRoot:(x@y) fromView:aView.
+	targetView := self viewFromPoint:screenPoint.
     ].
 
     (targetView isNil) ifTrue:[
-        (wg := aView windowGroup) notNil ifTrue:[
-            targetView := wg focusView.
-        ].
+	(wg := aView windowGroup) notNil ifTrue:[
+	    targetView := wg focusView.
+	].
     ].
 
     aView sensor
-        mouseWheelMotion:buttonState x:x y:y amount:amount deltaTime:dTime
-        view:(targetView ? aView)
+	mouseWheelMotion:buttonState x:x y:y amount:amount deltaTime:dTime
+	view:(targetView ? aView)
 
     "Modified: / 21.5.1999 / 13:05:53 / cg"
 !
@@ -18264,6 +18264,23 @@
 %}
 !
 
+raiseWindowToTopMost:aWindowId
+    "bring a window to the very front - above all others (even above non-st/x windows).
+     Q: is this a windows-specific thing ?"
+
+%{  /* NOCONTEXT */
+
+    if (__isExternalAddress(aWindowId)) {
+	HWND hWnd = _HWNDVal(aWindowId);
+
+	if (hWnd) {
+	    CPRINTF(("raiseWindow %x\n",hWnd));
+	    SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
+	}
+    }
+%}
+!
+
 raiseWindowToTop:aWindowId
     "bring a window to the very front - above all others (even above non-st/x windows).
      Q: is this a windows-specific thing ?"
@@ -19361,11 +19378,11 @@
 !WinWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.486 2014-11-14 11:31:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.487 2014-11-19 16:06:55 sr Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.486 2014-11-14 11:31:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.487 2014-11-19 16:06:55 sr Exp $'
 ! !