Make Fl_Gl_Window::make_current() set the value of the fl_window global variable under the X11 platform.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11886 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2016-08-23 11:35:42 +00:00
parent 12f086cb7e
commit b7146df369
2 changed files with 5 additions and 0 deletions

View File

@ -158,6 +158,7 @@ class Fl_X11_Gl_Window_Driver : public Fl_Gl_Window_Driver {
Fl_X11_Gl_Window_Driver(Fl_Gl_Window *win) : Fl_Gl_Window_Driver(win) {}
virtual void before_show(int& need_redraw);
virtual int mode_(int m, const int *a);
virtual void make_current_before();
virtual void swap_buffers();
virtual void resize(int is_a_resize, int w, int h);
virtual char swap_type();

View File

@ -648,6 +648,10 @@ Fl_Gl_Window_Driver *Fl_Gl_Window_Driver::newGlWindowDriver(Fl_Gl_Window *w)
return new Fl_X11_Gl_Window_Driver(w);
}
void Fl_X11_Gl_Window_Driver::make_current_before() {
fl_window = fl_xid(pWindow);
}
void Fl_X11_Gl_Window_Driver::before_show(int& need_redraw) {
Fl_X::make_xid(pWindow, g()->vis, g()->colormap);
if (overlay() && overlay() != pWindow) ((Fl_Gl_Window*)overlay())->show();