[branch-1.3] 6582110 - Avoid "Bogus FL_MOVE/FL_DRAG events" (#76)

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[branch-1.3] 6582110 - Avoid "Bogus FL_MOVE/FL_DRAG events" (#76) "Albrecht Schlosser" 05:32 Apr 26 top right image
 
commit 65821103b3956ba37231f3bbd4e2c002b9057bd9
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Mon Apr 26 14:17:38 2021 +0200
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Mon Apr 26 14:17:38 2021 +0200

    Avoid "Bogus FL_MOVE/FL_DRAG events" (#76)
    
    Fix sending bogus events if CONSOLIDATE_MOTION is on.
    
    Backported from 1.4 (master):
      commit 7a7f3c33243912b118f2fbf813dc5d80e8fef501.

 src/Fl_x.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git src/Fl_x.cxx src/Fl_x.cxx
index 593909f..46c5c5d 100644
--- src/Fl_x.cxx
+++ src/Fl_x.cxx
@@ -210,7 +210,7 @@ static void do_queued_events() {
   // we send FL_LEAVE only if the mouse did not enter some other window:
   if (!in_a_window) Fl::handle(FL_LEAVE, 0);
 #if CONSOLIDATE_MOTION
-  else if (send_motion == fl_xmousewin) {
+  else if (send_motion && send_motion == fl_xmousewin) {
     send_motion = 0;
     Fl::handle(FL_MOVE, fl_xmousewin);
   }
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]Next Message ]
 
 

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