diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-04-10 13:53:13 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-04-10 13:53:13 +0200 |
| commit | d5943f85b9aa2885fb943ab7d3e7e2aa895829ca (patch) | |
| tree | 315f476e01175430ee10edb2bb148b9735d5fd30 /src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx | |
| parent | 4f0a16697eeb62bfa0b5dda13b209e63b03832f7 (diff) | |
Use the new Fl_Surface_Device::is_current() virtual function
Diffstat (limited to 'src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx')
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx b/src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx index 532714980..2f1edd9dd 100644 --- a/src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx @@ -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(); |
