diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-03-03 19:03:29 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-03-03 19:03:29 +0100 |
| commit | 8f142b938ae5bbbb5a7677f1a7e71ee6308a7589 (patch) | |
| tree | 82d4e8399a87f5facf15df515c65409fba9888ee /src/Fl_Window.cxx | |
| parent | 87c994e2f8f094dedca9429dc13cd9fe953c0dc1 (diff) | |
Fix for STR#3534 to draw correctly Fl_Tiled_Image's on non-display surfaces.
Diffstat (limited to 'src/Fl_Window.cxx')
| -rw-r--r-- | src/Fl_Window.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx index 0b4961062..fb77cf01d 100644 --- a/src/Fl_Window.cxx +++ b/src/Fl_Window.cxx @@ -482,6 +482,9 @@ void Fl_Window::flush() void Fl_Window::draw() { + Fl_Window *save_current = current_; + bool to_display = Fl_Display_Device::display_device()->is_current(); + if (!to_display) current_ = this; // so drawing of background Fl_Tiled_Image is correct pWindowDriver->draw_begin(); // The following is similar to Fl_Group::draw(), but ... @@ -510,6 +513,7 @@ void Fl_Window::draw() draw_children(); pWindowDriver->draw_end(); + if (!to_display) current_ = save_current; # if defined(FLTK_USE_CAIRO) Fl::cairo_make_current(this); // checkout if an update is necessary # endif |
