|
|
commit a6e2940792e85e8dbc3b898251ed4363c9d5fb19
Author: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Tue May 3 11:49:38 2022 +0200
Commit: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Tue May 3 11:49:38 2022 +0200
Remove one-pixel top and left borders of shaped windows.
src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index 13b7f27..cf589bd 100644
--- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -281,7 +281,9 @@ void Fl_Wayland_Window_Driver::draw_end()
Fl_Wayland_Graphics_Driver *gr_dr = (Fl_Wayland_Graphics_Driver*)fl_graphics_driver;
cairo_t *cr = gr_dr->cr();
cairo_matrix_t matrix;
- cairo_matrix_init_scale(&matrix, double(shape_data_->lw_)/pWindow->w() , double(shape_data_->lh_)/pWindow->h());
+ cairo_matrix_init_scale(&matrix, double(shape_data_->lw_) / (pWindow->w() + 1),
+ double(shape_data_->lh_) / (pWindow->h() + 1) );
+ cairo_matrix_translate(&matrix, 1, 1);
cairo_pattern_set_matrix(shape_data_->mask_pattern_, &matrix);
cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
cairo_mask(cr, shape_data_->mask_pattern_);
[ Direct Link to Message ] | |
|
| |