summaryrefslogtreecommitdiff
path: root/src/drivers/X11/Fl_X11_Screen_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-04-27 08:13:17 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-04-27 08:13:17 +0200
commite4b0668fad36fe28497cf5fa9242e92b0865c90f (patch)
treed7f290ff532d55eba50446439680c4a637472251 /src/drivers/X11/Fl_X11_Screen_Driver.cxx
parente4f18c6e3ca2ea1c49c8e834fae329229c461914 (diff)
X11: simpler code to capture window decoration under xfce
Diffstat (limited to 'src/drivers/X11/Fl_X11_Screen_Driver.cxx')
-rw-r--r--src/drivers/X11/Fl_X11_Screen_Driver.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.cxx b/src/drivers/X11/Fl_X11_Screen_Driver.cxx
index 02ab347b2..fffce8d35 100644
--- a/src/drivers/X11/Fl_X11_Screen_Driver.cxx
+++ b/src/drivers/X11/Fl_X11_Screen_Driver.cxx
@@ -640,6 +640,10 @@ extern "C" {
}
}
+
+// When capturing window decoration, w is negative and X,Y,w and h are in pixels;
+// otherwise X,Y,w and h are in FLTK units.
+//
Fl_RGB_Image *Fl_X11_Screen_Driver::read_win_rectangle(int X, int Y, int w, int h, Fl_Window *win, bool may_capture_subwins, bool *did_capture_subwins)
{
XImage *image; // Captured image
@@ -665,7 +669,6 @@ Fl_RGB_Image *Fl_X11_Screen_Driver::read_win_rectangle(int X, int Y, int w, int
//
int allow_outside = w < 0; // negative w allows negative X or Y, that is, window frame
if (w < 0) w = - w;
-// when capturing window decoration, X,Y,w and h are in pixels (not in FLTK units).
Window xid = (win && !allow_outside ? fl_xid(win) : fl_window);
float s = allow_outside ? 1 : Fl_Surface_Device::surface()->driver()->scale();