diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-06-06 18:28:49 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-06-06 18:28:49 +0200 |
| commit | 94fffb701ce88adf7398fb37a007a04c08f1ca6f (patch) | |
| tree | 39c02278fa18939ebf7d5df8e1459e5297c086ea /src/Fl_Screen_Driver.cxx | |
| parent | 50b1c0878085b5f231616d78f1f1775874b1c9ae (diff) | |
Add one argument to Fl_Screen_Driver::read_win_rectangle()
The new argument gives the window to be captured, or NULL to indicate capture
from the current offscreen.
Calling this function becomes easier because less dependent on global variables.
Diffstat (limited to 'src/Fl_Screen_Driver.cxx')
| -rw-r--r-- | src/Fl_Screen_Driver.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx index 4f4bbff7f..93d0a23ea 100644 --- a/src/Fl_Screen_Driver.cxx +++ b/src/Fl_Screen_Driver.cxx @@ -196,8 +196,7 @@ Fl_RGB_Image *Fl_Screen_Driver::traverse_to_gl_subwindows(Fl_Group *g, int x, in full_img = plugin->rectangle_capture(g, x, y, w, h); } else if ( g->as_window() ) { - if (Fl_Window::current() != g) g->as_window()->make_current(); - full_img = Fl::screen_driver()->read_win_rectangle(x, y, w, h); + full_img = Fl::screen_driver()->read_win_rectangle(x, y, w, h, g->as_window()); } if (!full_img) return NULL; float full_img_scale = (full_img && w > 0 ? float(full_img->data_w())/w : 1); |
