From d5943f85b9aa2885fb943ab7d3e7e2aa895829ca Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Wed, 10 Apr 2019 13:53:13 +0200 Subject: Use the new Fl_Surface_Device::is_current() virtual function --- src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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(); -- cgit v1.2.3