summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-05-03 11:49:38 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-05-03 11:49:38 +0200
commita6e2940792e85e8dbc3b898251ed4363c9d5fb19 (patch)
treec798a990dffcbf407bf36d0a608fc9dc57f18fa1 /src
parent158d39df37e3da1c813cc843e2424a6c342462e7 (diff)
Remove one-pixel top and left borders of shaped windows.
Diffstat (limited to 'src')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index 13b7f27b8..cf589bd57 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ b/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_);