Bugs in Graphics.HGL.Window and its documentation

The function openWindowEx seems to ignore its second argument (optional initial position of window). Here is the test program to illustrate this, which I ran on Mac OS X (Tiger), using hugs: --- begin program --- import Graphics.HGL main = runGraphics $ do win <- openWindowEx "Test" (Just (200, 300)) (300, 300) Unbuffered Nothing ((x,y), (w,h)) <- getWindowRect win setGraphic win (text (100,100) (show (x,y) ++ " " ++ show (w,h))) getKey win closeWindow win --- end program --- Also, the documentation for the type RedrawMode (http:// www.haskell.org/ghc/docs/latest/html/libraries/HGL/Graphics-HGL- Window.html) seems to have the constructors Buffered and Unbuffered reversed.

On Sat, 2005-12-10 at 10:19 -0700, Kevin Van Horn wrote:
The function openWindowEx seems to ignore its second argument (optional initial position of window). Here is the test program to illustrate this, which I ran on Mac OS X (Tiger), using hugs:
Placing a window in a particular initial position on X11 (which is what HGL on OSX uses) can only ever be best effort. The window manager is free to ignore any initial placement hint that a window asks for. Some window managers respect it others do not. There's nothing you can do (except change or patch your window manager) Duncan

Duncan Coutts wrote:
The function openWindowEx seems to ignore its second argument (optional initial position of window). Here is the test program to illustrate this, which I ran on Mac OS X (Tiger), using hugs:
Placing a window in a particular initial position on X11 (which is what HGL on OSX uses) can only ever be best effort. The window manager is free to ignore any initial placement hint that a window asks for. Some window managers respect it others do not. There's nothing you can do (except change or patch your window manager)
However, in the case of HGL, it could request that the window manager
place the window at a specific location using XSetWMNormalHints(). It
doesn't do this at present.
--
Glynn Clements
participants (3)
-
Duncan Coutts
-
Glynn Clements
-
Kevin Van Horn