Author: spitzak
Date: 2007-06-06 13:46:35 -0400 (Wed, 06 Jun 2007)
New Revision: 5879
Log:
Previous checkin also needs this file.
Modified:
trunk/src/Menu_popup.cxx
Modified: trunk/src/Menu_popup.cxx
===================================================================
--- trunk/src/Menu_popup.cxx 2007-06-06 17:46:02 UTC (rev 5878)
+++ trunk/src/Menu_popup.cxx 2007-06-06 17:46:35 UTC (rev 5879)
@@ -687,6 +687,7 @@
}
static bool track_mouse;
+static bool valuator;
int MWindow::handle(int event) {
MenuState &p = *menustate;
@@ -816,14 +817,16 @@
// redraw checkboxes so they preview the state they will be in:
Widget* widget = p.menus[menu]->get_widget(item);
if (checkmark(widget))
- p.menus[menu]->redraw(DAMAGE_CHILD);
+ p.menus[menu]->redraw(DAMAGE_CHILD);
+ else if (widget->handle(event))
+ valuator = true;
} else if (event == DRAG) {
// allow scrolling for valuators, but ignore their handle() returns
Widget* widget = p.menus[menu]->get_widget(item);
- if (widget->type() == Widget::VALUATOR) {
- widget->handle(event);
- p.menus[menu]->redraw(DAMAGE_CHILD);
- }
+ if (valuator) {
+ widget->handle(event);
+ p.menus[menu]->redraw(DAMAGE_CHILD);
+ }
} else if (p.level || !p.hmenubar) {
// item didn't change on drag/move, check for autoscroll:
if (event_y_root() <= MENUAREA.y()) {
@@ -837,6 +840,7 @@
case RELEASE:
pushed_ = 0;
+ valuator = false;
// The initial click just brings up the menu. The user has to either
// drag the mouse around, hold it still for a long time, or click
// again to actually pick an item and dismiss the menu. You can
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit