From 766a1814212cb6ee2a75831e00a4739ed1792008 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Tue, 25 Nov 2014 09:03:30 +0000 Subject: Change necessary now that there are true FLTK sub-windows on the Mac OS X platform. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10468 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_read_image_mac.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/fl_read_image_mac.cxx b/src/fl_read_image_mac.cxx index a92684d1a..a6324e5c1 100644 --- a/src/fl_read_image_mac.cxx +++ b/src/fl_read_image_mac.cxx @@ -42,9 +42,7 @@ fl_read_image(uchar *p, // I - Pixel buffer or NULL to allocate if( (sw - x < w) || (sh - y < h) ) return NULL; } else { // reading from current window - Fl_Window *window = Fl_Window::current(); - while(window->window()) window = window->window(); - base = Fl_X::bitmap_from_window_rect(window,x,y,w,h,&delta); + base = Fl_X::bitmap_from_window_rect(Fl_Window::current(),x,y,w,h,&delta); if (!base) return NULL; rowBytes = delta*w; x = y = 0; -- cgit v1.2.3