From 85f5887625c7c1d193da5f521786b7dfce1091ed Mon Sep 17 00:00:00 2001 From: dannye <33dannye@gmail.com> Date: Thu, 5 Dec 2024 16:49:49 -0600 Subject: Fix button down state when triggered by shortcut (#1145) The visual feedback is really important. I was not aware that my patch suppressed that. And for the state values, I find it best to get back to what 1.3 did at this point. `value` is essential for check boxes and radio and toggle buttons. On push buttons, it has really not much of a meaning. --- src/Fl_Button.cxx | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/Fl_Button.cxx') diff --git a/src/Fl_Button.cxx b/src/Fl_Button.cxx index 05f0fad4c..308bb9bf3 100644 --- a/src/Fl_Button.cxx +++ b/src/Fl_Button.cxx @@ -192,17 +192,14 @@ int Fl_Button::handle(int event) { do_callback(FL_REASON_RELEASED); } else { simulate_key_action(); - value(1); if (when() & FL_WHEN_CHANGED) { set_changed(); Fl_Widget_Tracker wp(this); do_callback(FL_REASON_CHANGED); if (wp.deleted()) return 1; - value(0); set_changed(); do_callback(FL_REASON_RELEASED); } else if (when() & FL_WHEN_RELEASE) { - value(0); set_changed(); do_callback(FL_REASON_RELEASED); } -- cgit v1.2.3