Karim BELABAS on Fri, 07 Nov 2003 19:52:55 +0100

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



  I have ported gp hi-res graphics to the MacOS X platform, using the
lightweight fltk library (www.fltk.org). Provided, fltk is installed,
this is enabled by

    Configure --with-fltk

There are two problems:

1)  on a Unix host (or Cygwin) the graphics window is created by a forked
process and it is possible to go on working in GP while keeping many such
windows open. It works perfectly on Solaris, Linux and Windows (Cygwin, and
apparently native builds though I couldn't check that).

Using this generic code and fltk-1.1.4 on MacOS X, control goes back to
parent gp immediately, no window appears, and the forked-off gp supposedly
controlling the graphical window silently enters an infinite loop deep down a
Carbon routine (  ClearMenuBar(), called from the fltk routine
Fl_mac.cxx:fl_open_display() ).

I hacked the generic code to get something useful, governed by the macro
BROKEN_FORK (currently defined whenever __APPLE__ is).

Maybe this problem is due to a broken Carbon library on my test machine. You
may want to try _not_ to define BROKEN_FORK in src/graph/plotfltk.c, and see
whether it works for you.

2)  when BROKEN_FORK is defined, no fork occurs, and gp handles the graphical
window directly. Control only comes back to the user when the window is
closed ( by clicking into it ). For some reason, the window manager is unable
to "see" or "handle" the window: it never gets focus, the status bar remains
transparent, buttons do not work, it can't be moved, etc. Only thing you
can do is look at the nice drawing, and click into it, thereby closing the
rogue window.

I have no experience whatsoever with Macs, so any feedback will be much



P.S: available from CVS as usual ( http://pari.math.u-bordeaux.fr/CVS.html ).

P.S2: Of course if you have installed X11 and are running an X server, then
you don't need all that. Everything works out of the box.
Karim Belabas                     Tel: (+33) (0)1 69 15 57 48
Dép. de Mathématiques, Bât. 425   Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud              http://www.math.u-psud.fr/~belabas/
F-91405 Orsay (France)            http://pari.math.u-bordeaux.fr/  [PARI/GP]