From 95c851fda10d5305082619dc977f63aa5df0929b Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 30 Aug 2022 07:58:16 +0200 Subject: Set Fl_Graphics_Driver::set_color(Fl_Color, unsigned) used by macOS, Wayland and display-cairo. --- src/Fl_Graphics_Driver.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Fl_Graphics_Driver.cxx') diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx index 76575d1df..5ba7853e0 100644 --- a/src/Fl_Graphics_Driver.cxx +++ b/src/Fl_Graphics_Driver.cxx @@ -38,6 +38,8 @@ const Fl_Graphics_Driver::matrix Fl_Graphics_Driver::m0 = {1, 0, 0, 1, 0, 0}; /** Used by the Windows platform to print Fl_Pixmap objects. */ unsigned Fl_Graphics_Driver::need_pixmap_bg_color = 0; +extern unsigned fl_cmap[256]; // defined in fl_color.cxx + /** Constructor */ Fl_Graphics_Driver::Fl_Graphics_Driver() { @@ -135,7 +137,9 @@ void Fl_Graphics_Driver::global_gc() /** see Fl::set_color(Fl_Color, unsigned) */ void Fl_Graphics_Driver::set_color(Fl_Color i, unsigned c) { - // nothing to do, reimplement in driver if needed + if (fl_cmap[i] != c) { + fl_cmap[i] = c; + } } -- cgit v1.2.3