diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-04-27 08:13:17 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-04-27 08:13:17 +0200 |
| commit | e4b0668fad36fe28497cf5fa9242e92b0865c90f (patch) | |
| tree | d7f290ff532d55eba50446439680c4a637472251 /src/drivers/X11/Fl_X11_Window_Driver.cxx | |
| parent | e4f18c6e3ca2ea1c49c8e834fae329229c461914 (diff) | |
X11: simpler code to capture window decoration under xfce
Diffstat (limited to 'src/drivers/X11/Fl_X11_Window_Driver.cxx')
| -rw-r--r-- | src/drivers/X11/Fl_X11_Window_Driver.cxx | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/drivers/X11/Fl_X11_Window_Driver.cxx b/src/drivers/X11/Fl_X11_Window_Driver.cxx index aed4b146f..39d01a7ae 100644 --- a/src/drivers/X11/Fl_X11_Window_Driver.cxx +++ b/src/drivers/X11/Fl_X11_Window_Driver.cxx @@ -382,28 +382,13 @@ void Fl_X11_Window_Driver::capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_R fl_window = parent; if (htop) { if (true_sides) { - top = Fl::screen_driver()->read_win_rectangle(1, 1, -(ww-1), htop, pWindow); - if (top) top->scale(decorated_w()+1, (htop / s)+1, 0, 1); + top = Fl::screen_driver()->read_win_rectangle(1, 1, -(ww-2), hh-2, pWindow); + if (top) top->scale(decorated_w(), decorated_h(), 0, 1); } else { top = Fl::screen_driver()->read_win_rectangle(wsides, wsides, -(ww-1), htop, pWindow); if (top) top->scale(w(), htop / s, 0, 1); } } - if (true_sides && wsides) { - left = Fl::screen_driver()->read_win_rectangle(1, htop, -wsides, hh - htop - wsides, pWindow); - if (left) { - left->scale(wsides/s, h(), 0, 1); - } - if (left) { - right = (Fl_RGB_Image*)left->copy(left->data_w(), left->data_h()); - right->scale(left->w(), left->h(), 0, 1); - } else right = NULL; - - bottom = Fl::screen_driver()->read_win_rectangle(1, hh-wsides, -(ww-1), wsides, pWindow); - if (bottom) { - bottom->scale(decorated_w(), wsides / s, 0, 1); - } - } fl_window = from; } |
