fltk-1.3.x-r6916
I have a window with only one active item, a button (not counting
three active, but empty groups). When the mouse leaves the entire
window, I get a FL_LEAVE event over and over again, i.e. each time the
mouse leaves the entire window. It doesn't hurt anything, but it
doesn't seem correct either since the mouse never FL_ENTERed the
button to begin with.
Here's a fluid file to demonstrate the behavior.
Harvey
# data file for the Fltk User Interface Designer (fluid)
version 1.0300
header_name {.h}
code_name {.cxx}
decl {\#include <FL/Enumerations.H>} {selected
}
Function {fl_event_name(enum Fl_Event event)} {open selected
return_type {static const char *}
} {
code {switch (event)
{
\#define PEVENT(_E) case _E: return(\#_E)
PEVENT(FL_NO_EVENT);
PEVENT(FL_PUSH);
PEVENT(FL_RELEASE);
PEVENT(FL_ENTER);
PEVENT(FL_LEAVE);
PEVENT(FL_DRAG);
PEVENT(FL_FOCUS);
PEVENT(FL_UNFOCUS);
PEVENT(FL_KEYDOWN);
//PEVENT(FL_KEYBOARD);
PEVENT(FL_KEYUP);
PEVENT(FL_CLOSE);
PEVENT(FL_MOVE);
PEVENT(FL_SHORTCUT);
PEVENT(FL_DEACTIVATE);
PEVENT(FL_ACTIVATE);
PEVENT(FL_HIDE);
PEVENT(FL_SHOW);
PEVENT(FL_PASTE);
PEVENT(FL_SELECTIONCLEAR);
PEVENT(FL_MOUSEWHEEL);
PEVENT(FL_DND_ENTER);
PEVENT(FL_DND_DRAG);
PEVENT(FL_DND_LEAVE);
PEVENT(FL_DND_RELEASE);
\#undef PEVENT
}
return("unknown");} {}
}
Function {} {open
} {
Fl_Window {} {open
xywh {579 249 570 360} type Double visible
} {
Fl_Button {} {
label button
xywh {215 25 130 25}
class MyButton
}
}
}
widget_class MyButton {open
xywh {694 75 100 100} type Double
class Fl_Button visible
} {
Function {end()} {} {
code {} {}
}
Function {handle(int event)} {open return_type int
} {
code {printf("%-20s: %d: %-20s\\n", nameof(this), event,
fl_event_name((Fl_Event)event));
return Fl_Button::handle(event);} {}
}
Function {nameof(Fl_Widget *o)} {open return_type {const char *}
} {
code {if (!o) return "NULL";
if (!o->label()) return "<no label>";
return o->label();} {}
}
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk