Hi Guys,
It turns out the problem wasn't with the display name but with my #preform:withArguments: call. I forgot to turn the OrderedCollection into an Array. I knew I had to do it, my fingers just forgot to type it.
As you can tell from the code below, I have the code for both Windows and Linux in the same method. Yes, I know it is awful. But I didn't want to go through the hassle of adding two sub-applications, one for windows and one for Linux. Each sub-application with one method extending the class that calls it.
It would be nice if a method named something like #setCursorPos:y: we made common to both Windows and Linux as part of the new push to add common OS controls.
Also, it would be cool if there was some way, maybe with a pragma, of putting the Windows and Linux code in one method. I'm fine with the multiple sub-application feature with the sub-app being loaded based upon the OS being used when there are lots of classes and methods but this is one little method. It is also nice to be able to see the Windows and Linux code at the same time.
Lou
moveMousePointerOffScreen
"Hide the mouse pointer by moving it off screen."
| xDisplay xRootWindow oSDisplayPtrClass xArgs swp2 shp2 |
swp2 := shellWidth + 2.
shp2 := shellHeight + 2.
controller isWindows ifTrue: [(OSCall new) perform: #setCursorPos:y: with: swp2 with: shp2] ifFalse: [
oSDisplayPtrClass := Smalltalk at: #OSDisplayPtr.
xDisplay := oSDisplayPtrClass perform: #xOpenDisplay: with: 0.
xRootWindow := xDisplay perform: #xRootWindow: with: 0.
xArgs := OrderedCollection new.
xArgs
add: nil;
add: xRootWindow;
add: 0; add: 0; add: 0; add: 0;
add: swp2;
add: shp2.
xDisplay perform: #xWarpPointer:destW:srcX:srcY:srcWidth:srcHeight:destX:destY: withArguments: xArgs asArray.
xDisplay perform: #xFlush.
].