diff options
| author | Manolo Gouy <Manolo> | 2016-08-23 11:35:42 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-08-23 11:35:42 +0000 |
| commit | b7146df3691ae0810df3a9d48c906ac15df22a7b (patch) | |
| tree | 8e800c0010c207c3421ada647251793758b96369 | |
| parent | 12f086cb7ef334ed3be085b8fd84d623c15102f7 (diff) | |
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
| -rw-r--r-- | FL/Fl_Gl_Window_Driver.H | 1 | ||||
| -rw-r--r-- | src/Fl_Gl_Window.cxx | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/FL/Fl_Gl_Window_Driver.H b/FL/Fl_Gl_Window_Driver.H index db8702185..03dd5c0e8 100644 --- a/FL/Fl_Gl_Window_Driver.H +++ b/FL/Fl_Gl_Window_Driver.H @@ -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(); diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx index 72468fd5c..4f9285b16 100644 --- a/src/Fl_Gl_Window.cxx +++ b/src/Fl_Gl_Window.cxx @@ -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(); |
