From e8185abf222014abb57138f78c18c8fbcbd27380 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Fri, 3 Apr 2020 16:32:11 +0200 Subject: Fix Fl_X11_Window_Driver::capture_titlebar_and_borders() for resizable window. --- src/drivers/X11/Fl_X11_Window_Driver.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/drivers/X11/Fl_X11_Window_Driver.cxx b/src/drivers/X11/Fl_X11_Window_Driver.cxx index 2ea16bf70..4996b3e0f 100644 --- a/src/drivers/X11/Fl_X11_Window_Driver.cxx +++ b/src/drivers/X11/Fl_X11_Window_Driver.cxx @@ -409,15 +409,16 @@ void Fl_X11_Window_Driver::capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_R XTranslateCoordinates(fl_display, xid, parent, 0, 0, &wsides, &htop, &child_win) == True); if (n) XFree(children); if (!do_it) wsides = htop = 0; - int hbottom = wsides; + //int hbottom = wsides; float s = Fl::screen_driver()->scale(screen_num()); + htop -= wsides; htop /= s; wsides /= s; fl_window = parent; if (htop) { - top = Fl::screen_driver()->read_win_rectangle(0, 0, - (w() + 2 * wsides), htop, pWindow); - if (top) top->scale(w() + 2 * wsides, htop, 0, 1); + top = Fl::screen_driver()->read_win_rectangle(wsides, wsides, -w(), htop, pWindow); + if (top) top->scale(w(), htop, 0, 1); } - if (wsides) { + /*if (wsides) { left = Fl::screen_driver()->read_win_rectangle(0, htop, -wsides, h(), pWindow); if (left) { left->scale(wsides, h(), 0, 1); @@ -429,7 +430,8 @@ void Fl_X11_Window_Driver::capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_R bottom = Fl::screen_driver()->read_win_rectangle(0, htop + h(), -(w() + 2*wsides), hbottom, pWindow); if (bottom) { bottom->scale(w() + 2*wsides, wsides, 0, 1); - } } + } + }*/ fl_window = from; } -- cgit v1.2.3