diff options
| author | Manolo Gouy <Manolo> | 2016-02-27 13:52:27 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-02-27 13:52:27 +0000 |
| commit | 0b406baa0f05d8b829d2c35b10c8450e7628be53 (patch) | |
| tree | 62d91890f7194e00ea9f40e89f640c7c013c7b45 /src/Fl_Copy_Surface.cxx | |
| parent | 5d24872dc40e1047cea6337d8823718ac2acd575 (diff) | |
Rewrite all fl_XXX_offscreen() functions so they use an Fl_Image_Surface object.
These functions become therefore platform-independent.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11241 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Copy_Surface.cxx')
| -rw-r--r-- | src/Fl_Copy_Surface.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_Copy_Surface.cxx b/src/Fl_Copy_Surface.cxx index 1484504b6..8076325bc 100644 --- a/src/Fl_Copy_Surface.cxx +++ b/src/Fl_Copy_Surface.cxx @@ -77,6 +77,7 @@ Fl_Copy_Surface::Fl_Copy_Surface(int w, int h) : Fl_Widget_Surface(NULL) Fl::first_window()->make_current(); oldwindow = fl_xid(Fl::first_window()); xid = fl_create_offscreen(w,h); + _ss = NULL; Fl_Surface_Device *present_surface = Fl_Surface_Device::surface(); set_current(); fl_color(FL_WHITE); @@ -128,7 +129,7 @@ void Fl_Copy_Surface::set_current() # pragma message "FL_PORTING: implement Fl_Copy_Surface::set_current" #else fl_window=xid; - _ss = Fl_Surface_Device::surface(); + if (!_ss) _ss = Fl_Surface_Device::surface(); Fl_Surface_Device::set_current(); fl_push_no_clip(); #endif |
