diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-08-26 22:55:59 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-08-26 22:56:27 +0200 |
| commit | 008d71f5b7c121335bc2de620cf7cddfaa0f8d70 (patch) | |
| tree | efacbfc0fe353681e44c0b2807d0cfd61d947f6f | |
| parent | 9568d5bb737eb468e87fd43f21404e2def101e30 (diff) | |
Fix for artefact in X11 1-pixel thick rect drawing with some drivers (#156, #1052)
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx index 689f0eccf..25cb6a285 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx @@ -228,7 +228,10 @@ void Fl_Xlib_Graphics_Driver::focus_rect(int x, int y, int w, int h) { } void Fl_Xlib_Graphics_Driver::rect_unscaled(int x, int y, int w, int h) { + void *old = NULL; + if (line_width_ == 0) old = change_pen_width(1); // #156, #1052 XDrawRectangle(fl_display, fl_window, gc_, x, y, w, h); + if (old) reset_pen_width(old); } void Fl_Xlib_Graphics_Driver::rectf_unscaled(int x, int y, int w, int h) { |
