mirror of
https://github.com/fltk/fltk.git
synced 2026-05-22 07:01:34 +08:00
Use the new Fl_Surface_Device::is_current() virtual function
This commit is contained in:
@@ -62,7 +62,7 @@ Fl_Xlib_Copy_Surface_Driver::Fl_Xlib_Copy_Surface_Driver(int w, int h) : Fl_Copy
|
||||
|
||||
Fl_Xlib_Copy_Surface_Driver::~Fl_Xlib_Copy_Surface_Driver() {
|
||||
driver()->pop_clip();
|
||||
bool need_push = (Fl_Surface_Device::surface() != this);
|
||||
bool need_push = !is_current();
|
||||
if (need_push) Fl_Surface_Device::push_current(this);
|
||||
Fl_RGB_Image *rgb = Fl::screen_driver()->read_win_rectangle(0, 0, width, height);
|
||||
if (need_push) Fl_Surface_Device::pop_current();
|
||||
|
||||
Reference in New Issue
Block a user