diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-08-30 07:58:16 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-08-30 07:58:16 +0200 |
| commit | 95c851fda10d5305082619dc977f63aa5df0929b (patch) | |
| tree | bcae487be80a33839f01ef388890764e09e04060 /src/Fl_Graphics_Driver.cxx | |
| parent | 510f71151325da461af7bc49a3c42b25598ee99f (diff) | |
Set Fl_Graphics_Driver::set_color(Fl_Color, unsigned) used by macOS, Wayland and display-cairo.
Diffstat (limited to 'src/Fl_Graphics_Driver.cxx')
| -rw-r--r-- | src/Fl_Graphics_Driver.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
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; + } } |
