summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl.cxx13
-rw-r--r--src/Fl_Gl_Choice.H6
-rw-r--r--src/Fl_Gl_Choice.cxx64
-rw-r--r--src/Fl_Gl_Window.cxx51
-rw-r--r--src/Fl_Window_fullscreen.cxx6
-rw-r--r--src/Fl_Window_iconize.cxx8
-rw-r--r--src/Fl_mac.cxx29
-rw-r--r--src/Fl_visual.cxx6
-rw-r--r--src/fl_shortcut.cxx10
-rw-r--r--src/gl_draw.cxx6
-rw-r--r--src/gl_start.cxx13
11 files changed, 140 insertions, 72 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index 22c26887b..9667e02b8 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl.cxx,v 1.24.2.41.2.13 2001/12/17 13:48:59 easysw Exp $"
+// "$Id: Fl.cxx,v 1.24.2.41.2.14 2001/12/18 11:00:09 matthiaswm Exp $"
//
// Main event handling code for the Fast Light Tool Kit (FLTK).
//
@@ -696,12 +696,19 @@ void Fl_Window::hide() {
fl_gc = 0;
}
#elif defined(__APPLE__)
- //++ MacOS needs a simulation of focus events?! DONT!
+ //++ Matt: I have not checked yet what we need to do here
Fl::handle(FL_UNFOCUS, this);
#else
if (x->region) XDestroyRegion(x->region);
#endif
+
+#ifdef __APPLE__
+ if ( !parent() ) // don't destroy shared windows!
+ XDestroyWindow(fl_display, x->xid);
+#else
XDestroyWindow(fl_display, x->xid);
+#endif
+
#ifdef WIN32
// Try to stop the annoying "raise another program" behavior
if (non_modal() && Fl::first_window() && Fl::first_window()->shown())
@@ -844,5 +851,5 @@ void Fl_Window::flush() {
}
//
-// End of "$Id: Fl.cxx,v 1.24.2.41.2.13 2001/12/17 13:48:59 easysw Exp $".
+// End of "$Id: Fl.cxx,v 1.24.2.41.2.14 2001/12/18 11:00:09 matthiaswm Exp $".
//
diff --git a/src/Fl_Gl_Choice.H b/src/Fl_Gl_Choice.H
index 4f3057871..5b96969a7 100644
--- a/src/Fl_Gl_Choice.H
+++ b/src/Fl_Gl_Choice.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Gl_Choice.H,v 1.4.2.6.2.2 2001/12/06 00:17:47 matthiaswm Exp $"
+// "$Id: Fl_Gl_Choice.H,v 1.4.2.6.2.3 2001/12/18 11:00:09 matthiaswm Exp $"
//
// OpenGL definitions for the Fast Light Tool Kit (FLTK).
//
@@ -76,7 +76,7 @@ public:
int pixelformat; // the visual to use
PIXELFORMATDESCRIPTOR pfd; // some wgl calls need this thing
#elif defined(__APPLE__)
- //++
+ AGLPixelFormat pixelformat;
#else
XVisualInfo *vis; // the visual to use
Colormap colormap; // a colormap for that visual
@@ -115,5 +115,5 @@ void fl_delete_gl_context(GLContext);
#endif
//
-// End of "$Id: Fl_Gl_Choice.H,v 1.4.2.6.2.2 2001/12/06 00:17:47 matthiaswm Exp $".
+// End of "$Id: Fl_Gl_Choice.H,v 1.4.2.6.2.3 2001/12/18 11:00:09 matthiaswm Exp $".
//
diff --git a/src/Fl_Gl_Choice.cxx b/src/Fl_Gl_Choice.cxx
index 7a59f8db5..8e3842269 100644
--- a/src/Fl_Gl_Choice.cxx
+++ b/src/Fl_Gl_Choice.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.4 2001/12/09 12:52:13 easysw Exp $"
+// "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.5 2001/12/18 11:00:09 matthiaswm Exp $"
//
// OpenGL visual selection code for the Fast Light Tool Kit (FLTK).
//
@@ -48,10 +48,51 @@ Fl_Gl_Choice *Fl_Gl_Choice::find(int mode, const int *alist) {
return g;
#ifdef __APPLE__
-
- //++ later
-
+ const int *blist;
+ int list[32];
+
+ if (alist)
+ blist = alist;
+ else {
+ int n = 0;
+ if (mode & FL_INDEX) {
+ list[n++] = AGL_BUFFER_SIZE;
+ list[n++] = 8; // glut tries many sizes, but this should work...
+ } else {
+ list[n++] = AGL_RGBA;
+ list[n++] = AGL_GREEN_SIZE;
+ list[n++] = (mode & FL_RGB8) ? 8 : 1;
+ if (mode & FL_ALPHA) {
+ list[n++] = AGL_ALPHA_SIZE;
+ list[n++] = 1;
+ }
+ if (mode & FL_ACCUM) {
+ list[n++] = AGL_ACCUM_GREEN_SIZE;
+ list[n++] = 1;
+ if (mode & FL_ALPHA) {
+ list[n++] = AGL_ACCUM_ALPHA_SIZE;
+ list[n++] = 1;
+ }
+ }
+ }
+ if (mode & FL_DOUBLE) {
+ list[n++] = AGL_DOUBLEBUFFER;
+ }
+ if (mode & FL_DEPTH) {
+ list[n++] = AGL_DEPTH_SIZE; list[n++] = 16;
+ }
+ if (mode & FL_STENCIL) {
+ list[n++] = AGL_STENCIL_SIZE; list[n++] = 1;
+ }
+ list[n] = AGL_NONE;
+ blist = list;
+ }
+ fl_open_display();
+ AGLPixelFormat fmt = aglChoosePixelFormat(NULL, 0, (GLint*)blist);
+ if (!fmt) return 0;
+
#elif !defined(WIN32)
+
const int *blist;
int list[32];
@@ -151,7 +192,7 @@ Fl_Gl_Choice *Fl_Gl_Choice::find(int mode, const int *alist) {
g->pixelformat = pixelformat;
g->pfd = chosen_pfd;
#elif defined(__APPLE__)
- //++ later
+ g->pixelformat = fmt;
#else
g->vis = vis;
@@ -193,15 +234,8 @@ GLContext fl_create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g, int lay
#elif defined(__APPLE__)
GLContext fl_create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g, int layer) {
GLContext context;
- GLint attrib[5] = {AGL_RGBA, //++ replace with requested data!
- AGL_DOUBLEBUFFER,
- AGL_DEPTH_SIZE, 16,
- AGL_NONE };
- AGLPixelFormat fmt;
- fmt = aglChoosePixelFormat(NULL, 0, attrib);
- context = aglCreateContext(fmt, first_context);
+ context = aglCreateContext( g->pixelformat, first_context);
if ( !first_context ) first_context = (GLContext)context;
- aglDestroyPixelFormat( fmt );
if ( window->parent() ) {
Rect wrect; GetWindowPortBounds( fl_xid(window), &wrect );
GLint rect[] = { window->x(), wrect.bottom-window->h()-window->y(), window->w(), window->h() };
@@ -237,7 +271,7 @@ void fl_set_gl_context(Fl_Window* w, GLContext context) {
aglSetInteger( context, AGL_BUFFER_RECT, rect );
aglEnable( context, AGL_BUFFER_RECT );
}
- aglSetDrawable(context, GetWindowPort( fl_xid(w) ) ); //++ here or in Fl_Gl_Window::make_current creation part?
+ aglSetDrawable(context, GetWindowPort( fl_xid(w) ) ); //++ Matt: this probably belongs only in create_gl_context
aglSetCurrentContext(context);
#else
glXMakeCurrent(fl_display, fl_xid(w), context);
@@ -275,5 +309,5 @@ void fl_delete_gl_context(GLContext context) {
#endif
//
-// End of "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.4 2001/12/09 12:52:13 easysw Exp $".
+// End of "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.5 2001/12/18 11:00:09 matthiaswm Exp $".
//
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx
index 9b491cf6d..7e44098f8 100644
--- a/src/Fl_Gl_Window.cxx
+++ b/src/Fl_Gl_Window.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.4 2001/12/11 16:03:12 easysw Exp $"
+// "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.5 2001/12/18 11:00:09 matthiaswm Exp $"
//
// OpenGL window code for the Fast Light Tool Kit (FLTK).
//
@@ -85,21 +85,22 @@ void Fl_Gl_Window::invalidate() {
int Fl_Gl_Window::mode(int m, const int *a) {
if (m == mode_ && a == alist) return 0;
-#if !defined(__APPLE__)
+#ifndef __APPLE__
int oldmode = mode_;
Fl_Gl_Choice* oldg = g;
#endif
context(0);
mode_ = m; alist = a;
if (shown()) {
- g = Fl_Gl_Choice::find(m, a);
-#ifdef WIN32
- if (!g || (oldmode^m)&FL_DOUBLE) {
- hide();
- show();
- }
-#endif
-#if !defined(WIN32) && !defined(__APPLE__)
+ g = Fl_Gl_Choice::find(m, a);
+#if defined(WIN32)
+ if (!g || (oldmode^m)&FL_DOUBLE) {
+ hide();
+ show();
+ }
+#elif defined(__APPLE__)
+ redraw();
+#else
// under X, if the visual changes we must make a new X window (yuck!):
if (!g || g->vis->visualid!=oldg->vis->visualid || (oldmode^m)&FL_DOUBLE) {
hide();
@@ -170,6 +171,24 @@ int fl_overlay_depth = 0;
void Fl_Gl_Window::flush() {
uchar save_valid = valid_;
+#ifdef __APPLE__
+ // matt: I have no idea hw expensive the following code is, but we need to reset the buffer rect after
+ // every window-reconfiguration, especially after window resizes.
+ if ( parent() ) { //: resize our GL buffer rectangle
+ Rect wrect; GetWindowPortBounds( fl_xid(this), &wrect );
+ GLint rect[] = { x(), wrect.bottom-h()-y(), w(), h() };
+ aglSetInteger( context_, AGL_BUFFER_RECT, rect );
+ aglEnable( context_, AGL_BUFFER_RECT );
+ }
+ //: clear previous clipping in this shared port
+ GrafPtr port = GetWindowPort( fl_xid(this) );
+ Rect rect; SetRect( &rect, 0, 0, 0x7fff, 0x7fff );
+ GrafPtr old; GetPort( &old );
+ SetPort( port );
+ ClipRect( &rect );
+ SetPort( old );
+#endif
+
#if HAVE_GL_OVERLAY && defined(WIN32)
bool fixcursor = false; // for fixing the SGI 320 bug
@@ -200,16 +219,6 @@ void Fl_Gl_Window::flush() {
}
#endif
-#ifdef __APPLE__
- //: clear previous clipping in this shared port
- GrafPtr port = GetWindowPort( fl_xid(this) );
- Rect rect; SetRect( &rect, 0, 0, 0x7fff, 0x7fff );
- GrafPtr old; GetPort( &old );
- SetPort( port );
- ClipRect( &rect );
- SetPort( old );
-#endif
-
make_current();
if (mode_ & FL_DOUBLE) {
@@ -354,5 +363,5 @@ void Fl_Gl_Window::draw_overlay() {}
#endif
//
-// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.4 2001/12/11 16:03:12 easysw Exp $".
+// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.5 2001/12/18 11:00:09 matthiaswm Exp $".
//
diff --git a/src/Fl_Window_fullscreen.cxx b/src/Fl_Window_fullscreen.cxx
index 03dad78c4..b843c61e1 100644
--- a/src/Fl_Window_fullscreen.cxx
+++ b/src/Fl_Window_fullscreen.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Window_fullscreen.cxx,v 1.5.2.3.2.1 2001/11/27 17:44:06 easysw Exp $"
+// "$Id: Fl_Window_fullscreen.cxx,v 1.5.2.3.2.2 2001/12/18 11:00:09 matthiaswm Exp $"
//
// Fullscreen window support for the Fast Light Tool Kit (FLTK).
//
@@ -48,7 +48,7 @@ void Fl_Window::border(int b) {
// not yet implemented, but it's possible
// for full fullscreen we have to make the window topmost as well
#elif defined(__APPLE__)
- //++
+ //++ Matt: I have not looked into this yet
#else
if (shown()) Fl_X::i(this)->sendxjunk();
#endif
@@ -73,5 +73,5 @@ void Fl_Window::fullscreen_off(int X,int Y,int W,int H) {
}
//
-// End of "$Id: Fl_Window_fullscreen.cxx,v 1.5.2.3.2.1 2001/11/27 17:44:06 easysw Exp $".
+// End of "$Id: Fl_Window_fullscreen.cxx,v 1.5.2.3.2.2 2001/12/18 11:00:09 matthiaswm Exp $".
//
diff --git a/src/Fl_Window_iconize.cxx b/src/Fl_Window_iconize.cxx
index 92c1e8961..11e71f8d8 100644
--- a/src/Fl_Window_iconize.cxx
+++ b/src/Fl_Window_iconize.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Window_iconize.cxx,v 1.5.2.3.2.2 2001/11/27 17:44:06 easysw Exp $"
+// "$Id: Fl_Window_iconize.cxx,v 1.5.2.3.2.3 2001/12/18 11:00:09 matthiaswm Exp $"
//
// Window minification code for the Fast Light Tool Kit (FLTK).
//
@@ -35,9 +35,7 @@ void Fl_Window::iconize() {
#ifdef WIN32
ShowWindow(i->xid, SW_SHOWMINNOACTIVE);
#elif defined(__APPLE__)
- //: http://developer.apple.com/techpubs/mac/Toolbox/Toolbox-254.html#HEADING254-0
- //++ see iconize, above is the WRONG CALL
- //++ call "hide all" ZoomWindow(i->xid, inZoomIn, 0);
+ CollapseWindow( i->xid, true );
#else
XIconifyWindow(fl_display, i->xid, fl_screen);
#endif
@@ -45,5 +43,5 @@ void Fl_Window::iconize() {
}
//
-// End of "$Id: Fl_Window_iconize.cxx,v 1.5.2.3.2.2 2001/11/27 17:44:06 easysw Exp $".
+// End of "$Id: Fl_Window_iconize.cxx,v 1.5.2.3.2.3 2001/12/18 11:00:09 matthiaswm Exp $".
//
diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx
index 986f25741..2752775a1 100644
--- a/src/Fl_mac.cxx
+++ b/src/Fl_mac.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_mac.cxx,v 1.1.2.5 2001/12/14 19:34:30 easysw Exp $"
+// "$Id: Fl_mac.cxx,v 1.1.2.6 2001/12/18 11:00:09 matthiaswm Exp $"
//
// MacOS specific code for the Fast Light Tool Kit (FLTK).
//
@@ -397,7 +397,17 @@ OSStatus carbonMouseHandler( EventHandlerCallRef nextHandler, EventRef event, vo
case kEventMouseDown:
if ( btn==kEventMouseButtonPrimary && FindWindow( pos, &xid )!=inContent )
return CallNextEventHandler( nextHandler, event ); // we won't handle this. The OS should do that.
- if (xid!=FrontWindow()) SelectWindow( xid ); //{ SelectWindow(xid); return 1; } // do we want to keep this?!
+ //-- Matt: hmm, the following lines do not work the way I want: 'BringToFront' changes the window order only
+ // WITHIN the application, but not on the desktop, whereas 'SetFrontProcess' pulls ALL windows in this
+ // application to the front. Wanted: put only the clicked window in the front.
+ //if (xid!=FrontWindow()) {
+ SelectWindow( xid ); // <-- click througgh vs. classic Mac--> { SelectWindow(xid); return 1; }
+ BringToFront( xid ); // (but behind modal windows!!!)
+ //}
+ ProcessSerialNumber psn;
+ GetCurrentProcess( &psn );
+ SetFrontProcess( &psn );
+ // normal handling of mouse-down follows
sendEvent = FL_PUSH;
Fl::e_is_click = 1; px = pos.h; py = pos.v;
Fl::e_clicks = clickCount;
@@ -666,7 +676,7 @@ static void set_shift_states(const EventRecord &macevent)
if (macevent.modifiers&optionKey) state |= FL_ALT;
if (macevent.modifiers&cmdKey) state |= FL_CTRL;
if (macevent.modifiers&alphaLock) state |= FL_CAPS_LOCK;
- state |= FL_NUM_LOCK; //++ always num keypad on Mac?
+ state |= FL_NUM_LOCK; //++ always num keypad on Mac? - No, use Fn-F5 on iBooks and NumLock on regular keyboards
Fl::e_state = state;
}
@@ -1277,7 +1287,7 @@ void Fl_X::make(Fl_Window* w)
//++ hmmm, this should maybe set by the activate event?!
Fl::handle(FL_FOCUS, w);
//++ if (w->modal()) { Fl::modal_ = w; fl_fix_focus(); }
- if ( ! Fl_X::first->next ) // if this is the first window, we need to bring the application to the front
+ if ( ! Fl_X::first->next ) // if this is the first window, we need to bring the application to the front //++ this fails if the first window is a child window...
{
ProcessSerialNumber psn;
OSErr err = GetCurrentProcess( &psn );
@@ -1352,8 +1362,13 @@ void Fl_Window::show() {
if (!shown() || !i) {
Fl_X::make(this);
} else {
- //++ do we need to do grab and icon handling here?
- /*if (!fl_capture)*/ BringToFront(i->xid);
+ if ( !parent() )
+ {
+ if ( IsWindowCollapsed( i->xid ) ) CollapseWindow( i->xid, false );
+ //++ do we need to do grab and icon handling here?
+ /*if (!fl_capture)*/
+ BringToFront(i->xid);
+ }
}
}
@@ -1509,6 +1524,6 @@ elapsedNanoseconds = AbsoluteToNanoseconds(elapsedTime);
*/
//
-// End of "$Id: Fl_mac.cxx,v 1.1.2.5 2001/12/14 19:34:30 easysw Exp $".
+// End of "$Id: Fl_mac.cxx,v 1.1.2.6 2001/12/18 11:00:09 matthiaswm Exp $".
//
diff --git a/src/Fl_visual.cxx b/src/Fl_visual.cxx
index 82621eefb..b366b7ede 100644
--- a/src/Fl_visual.cxx
+++ b/src/Fl_visual.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_visual.cxx,v 1.7.2.4.2.1 2001/11/27 17:44:06 easysw Exp $"
+// "$Id: Fl_visual.cxx,v 1.7.2.4.2.2 2001/12/18 11:00:09 matthiaswm Exp $"
//
// Visual support for the Fast Light Tool Kit (FLTK).
//
@@ -40,7 +40,7 @@ int Fl::visual(int flags) {
}
#elif defined(__APPLE__)
-//++ later
+//++ Matt: add support for visual flags
int Fl::visual(int flags) {
(void)flags;
return 1;
@@ -115,5 +115,5 @@ int Fl::visual(int flags) {
#endif
//
-// End of "$Id: Fl_visual.cxx,v 1.7.2.4.2.1 2001/11/27 17:44:06 easysw Exp $".
+// End of "$Id: Fl_visual.cxx,v 1.7.2.4.2.2 2001/12/18 11:00:09 matthiaswm Exp $".
//
diff --git a/src/fl_shortcut.cxx b/src/fl_shortcut.cxx
index 2129de7aa..b97442da4 100644
--- a/src/fl_shortcut.cxx
+++ b/src/fl_shortcut.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_shortcut.cxx,v 1.4.2.9.2.1 2001/11/27 17:44:08 easysw Exp $"
+// "$Id: fl_shortcut.cxx,v 1.4.2.9.2.2 2001/12/18 11:00:09 matthiaswm Exp $"
//
// Shortcut support routines for the Fast Light Tool Kit (FLTK).
//
@@ -116,10 +116,10 @@ const char * fl_shortcut_label(int shortcut) {
char *p = buf;
if (!shortcut) {*p = 0; return buf;}
#ifdef __APPLE__
- //++ to avoid getting stoned and feathered by mac users we should replace the text with the correct symbols
+ //++ we might want to change the symbols for mAc users
if (shortcut & FL_SHIFT) {strcpy(p,"shift+"); p += 6;} //: Mac hollow up arrow
- if (shortcut & FL_META) {strcpy(p,"ctrl+"); p += 6;} //: Mac 'cotrol'
- if (shortcut & FL_ALT) {strcpy(p,"option+"); p += 4;} //: Mac 'Option' or fancy switch symbol
+ if (shortcut & FL_META) {strcpy(p,"ctrl+"); p += 5;} //: Mac 'cotrol'
+ if (shortcut & FL_ALT) {strcpy(p,"option+"); p += 7;} //: Mac 'Option' or fancy switch symbol
if (shortcut & FL_CTRL) {strcpy(p,"cmd+"); p += 4;} //: Mac Apple or Curlyflour
#else
if (shortcut & FL_META) {strcpy(p,"Meta+"); p += 5;}
@@ -200,5 +200,5 @@ int Fl_Widget::test_shortcut() {
}
//
-// End of "$Id: fl_shortcut.cxx,v 1.4.2.9.2.1 2001/11/27 17:44:08 easysw Exp $".
+// End of "$Id: fl_shortcut.cxx,v 1.4.2.9.2.2 2001/12/18 11:00:09 matthiaswm Exp $".
//
diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx
index 881d31966..782c2c16b 100644
--- a/src/gl_draw.cxx
+++ b/src/gl_draw.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: gl_draw.cxx,v 1.7.2.5.2.2 2001/11/27 17:44:08 easysw Exp $"
+// "$Id: gl_draw.cxx,v 1.7.2.5.2.3 2001/12/18 11:00:09 matthiaswm Exp $"
//
// OpenGL drawing support routines for the Fast Light Tool Kit (FLTK).
//
@@ -54,7 +54,7 @@ void gl_font(int fontid, int size) {
wglUseFontBitmaps(fl_gc, base, size, fl_fontsize->listbase+base);
SelectObject(fl_gc, oldFid);
#elif defined(__APPLE__)
- //++
+ //++ Matt: Insert MacOS/AGL font handling here
#else
int base = fl_xfont->min_char_or_byte2;
int size = fl_xfont->max_char_or_byte2-base+1;
@@ -157,5 +157,5 @@ void gl_draw_image(const uchar* b, int x, int y, int w, int h, int d, int ld) {
#endif
//
-// End of "$Id: gl_draw.cxx,v 1.7.2.5.2.2 2001/11/27 17:44:08 easysw Exp $".
+// End of "$Id: gl_draw.cxx,v 1.7.2.5.2.3 2001/12/18 11:00:09 matthiaswm Exp $".
//
diff --git a/src/gl_start.cxx b/src/gl_start.cxx
index f57767bda..ba435baa1 100644
--- a/src/gl_start.cxx
+++ b/src/gl_start.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: gl_start.cxx,v 1.6.2.5.2.4 2001/12/09 12:52:13 easysw Exp $"
+// "$Id: gl_start.cxx,v 1.6.2.5.2.5 2001/12/18 11:00:09 matthiaswm Exp $"
//
// OpenGL context routines for the Fast Light Tool Kit (FLTK).
//
@@ -54,6 +54,10 @@ static int pw, ph;
static Fl_Gl_Choice* gl_choice;
#endif
+#ifdef __APPLE__
+static Fl_Gl_Choice* gl_choice;
+#endif
+
Fl_Region XRectangleRegion(int x, int y, int w, int h); // in fl_rect.cxx
void gl_start() {
@@ -62,7 +66,8 @@ void gl_start() {
if (!gl_choice) Fl::gl_visual(0);
context = fl_create_gl_context(Fl_Window::current(), gl_choice);
#elif defined(__APPLE__)
- //++
+ //++ Matt: We need to check the code and verify it with Apple Sample code. 'shiny' give some output...
+ context = fl_create_gl_context(Fl_Window::current(), gl_choice);
#else
context = fl_create_gl_context(fl_visual);
#endif
@@ -106,7 +111,7 @@ int Fl::gl_visual(int mode, int *alist) {
#ifdef WIN32
gl_choice = c;
#elif defined(__APPLE__)
- //++
+ gl_choice = c;
#else
fl_visual = c->vis;
fl_colormap = c->colormap;
@@ -117,5 +122,5 @@ int Fl::gl_visual(int mode, int *alist) {
#endif
//
-// End of "$Id: gl_start.cxx,v 1.6.2.5.2.4 2001/12/09 12:52:13 easysw Exp $".
+// End of "$Id: gl_start.cxx,v 1.6.2.5.2.5 2001/12/18 11:00:09 matthiaswm Exp $".
//