FLTK logo

[master] c0d2aa3 - Fix problem in window titlebar capture under X11.

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] c0d2aa3 - Fix problem in window titlebar capture under X11. "ManoloFLTK" 06:17 Apr 25  
 
commit c0d2aa3f09ab0f68265d1aee28b9121bfadc945e
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Thu Apr 25 15:12:34 2024 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Thu Apr 25 15:12:34 2024 +0200

    Fix problem in window titlebar capture under X11.

 src/drivers/X11/Fl_X11_Screen_Driver.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git src/drivers/X11/Fl_X11_Screen_Driver.cxx src/drivers/X11/Fl_X11_Screen_Driver.cxx
index 8dc79fc..270504f 100644
--- src/drivers/X11/Fl_X11_Screen_Driver.cxx
+++ src/drivers/X11/Fl_X11_Screen_Driver.cxx
@@ -703,8 +703,8 @@ Fl_RGB_Image *Fl_X11_Screen_Driver::read_win_rectangle(int X, int Y, int w, int
       hs = (h+1) * s;
      }
 #endif
-    if (win && Xs + ws >= int(win->w()*s)) ws = win->w()*s - Xs -1;
-    if (win && Ys + hs >= int(win->h()*s)) hs = win->h()*s - Ys -1;
+    if (!allow_outside && win && Xs + ws >= int(win->w()*s)) ws = win->w()*s - Xs -1;
+    if (!allow_outside && win && Ys + hs >= int(win->h()*s)) hs = win->h()*s - Ys -1;
     if (ws < 1) ws = 1;
     if (hs < 1) hs = 1;
     if (!win || (dx >= sx && dy >= sy && dx + ws <= sx+sw && dy + hs <= sy+sh) ) {
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.