FLTK logo

Re: [LOW] STR #3528: Fl_Tree: dragging an item over a widget() can cause FL_RELEASE to be ignored

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.bugs  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [LOW] STR #3528: Fl_Tree: dragging an item over a widget() can cause FL_RELEASE to be ignored Albrecht Schlosser Aug 28, 2019  
 
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: https://www.fltk.org/str.php?L3528
Version: 1.4-current


Note: I wrote "FL_DROP" in comment 2 but this should read "FL_RELEASE" of
course.

Regarding a possible solution (just a thought): you could probably call
Fl_Group::handle() later *after* handling FL_DRAG and other events if and
only if the event was not handled by Fl_Tree. I see that there are some
status variables, for instance (in 'case FL_DRAG'):

      if ( _lastpushed == PUSHED_NONE ||
           _lastpushed == PUSHED_OPEN_CLOSE ) return 0;

etc.. Would it make sense to handle the FL_RELEASE event only if an Fl_Tree
object (item) was pushed/dragged/released and call Fl_Group::handle() later
and only if the event was NOT handled by Fl_Tree::handle()?

Technically speaking: set the above mentioned 'ret' variable to 1 if we
handled the event and call Fl_Group::handle() only if ret == 0 ? Or
something like this...


Link: https://www.fltk.org/str.php?L3528
Version: 1.4-current


Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]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'.