summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-05-17 14:27:41 +0000
committerManolo Gouy <Manolo>2018-05-17 14:27:41 +0000
commit7ab8906ef0a7e972cd10965a7471152d5759e0f5 (patch)
treee868b87a44d9db3bc223944b8763d0d3d3a7b854 /src
parent509c5be0d56a9f79816f745e828c2a006af3188a (diff)
Improve Fl_Screen_Driver::traverse_to_gl_subwindows() so it can be called for a window that is not current.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12923 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Screen_Driver.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx
index 6006dcaf8..bbc354bb1 100644
--- a/src/Fl_Screen_Driver.cxx
+++ b/src/Fl_Screen_Driver.cxx
@@ -192,7 +192,7 @@ Fl_RGB_Image *Fl_Screen_Driver::traverse_to_gl_subwindows(Fl_Group *g, int x, in
full_img = pi->rectangle_capture(g, x, y, w, h);
}
else if ( g->as_window() ) {
- if (full_img) g->as_window()->make_current();
+ if (Fl_Window::current() != g) g->as_window()->make_current();
full_img = Fl::screen_driver()->read_win_rectangle(x, y, w, h);
}
float full_img_scale = (full_img && w > 0 ? float(full_img->data_w())/w : 1);