diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-06-15 19:05:34 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-06-15 19:05:47 +0200 |
| commit | 46b89686df06102af64454bc7b2e722c1ff16927 (patch) | |
| tree | 8e73dc3298cb6a24069c8f2fd8abedb7f71e9ca0 /src/drivers/X11 | |
| parent | 91b78572c7ab2e4bd7692d2aa5352fcbbb33b236 (diff) | |
Allow using an Fl_SVG_Image object as window icon.
Fix for issue #90: Setting an svg image as a window icon causes a segfault.
Diffstat (limited to 'src/drivers/X11')
| -rw-r--r-- | src/drivers/X11/Fl_X11_Window_Driver.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/drivers/X11/Fl_X11_Window_Driver.cxx b/src/drivers/X11/Fl_X11_Window_Driver.cxx index 4996b3e0f..50a013ba6 100644 --- a/src/drivers/X11/Fl_X11_Window_Driver.cxx +++ b/src/drivers/X11/Fl_X11_Window_Driver.cxx @@ -356,8 +356,10 @@ void Fl_X11_Window_Driver::icons(const Fl_RGB_Image *icons[], int count) { icon_->icons = new Fl_RGB_Image*[count]; icon_->count = count; // FIXME: Fl_RGB_Image lacks const modifiers on methods - for (int i = 0;i < count;i++) + for (int i = 0;i < count;i++) { icon_->icons[i] = (Fl_RGB_Image*)((Fl_RGB_Image*)icons[i])->copy(); + icon_->icons[i]->normalize(); + } } if (Fl_X::i(pWindow)) |
