Do not propagate mouse wheel events of ComboBox, TextArea, Slider and ScrollBar, as in Qt components.

[GB.GTK]
* BUG: Do not propagate mouse wheel events of ComboBox, TextArea, Slider and ScrollBar, as in Qt components.

[GB.GTK3]
* BUG: Do not propagate mouse wheel events of ComboBox, TextArea, Slider and ScrollBar, as in Qt components.
This commit is contained in:
gambas 2019-01-07 22:44:03 +01:00
parent 790412c028
commit 9a77f14b5c
6 changed files with 11 additions and 3 deletions

View file

@ -787,9 +787,12 @@ __FOUND_WIDGET:
goto __SCROLL_TRY_PROXY;
}
control = control->parent();
if (control)
goto __SCROLL_TRY_PROXY;
if (!control->_use_wheel)
{
control = control->parent();
if (control)
goto __SCROLL_TRY_PROXY;
}
if (widget != save_control->border && widget != save_control->widget)
{

View file

@ -265,6 +265,7 @@ gComboBox::gComboBox(gContainer *parent) : gTextBox(parent, true)
entry = NULL;
_button = NULL;
cell = NULL;
_use_wheel = true;
g_typ = Type_gComboBox;

View file

@ -315,6 +315,7 @@ void gControl::initAll(gContainer *parent)
_inside = false;
_no_auto_grab = false;
_no_background = false;
_use_wheel = false;
_scrollbar = SCROLL_NONE;
_input_method = NULL;

View file

@ -258,6 +258,7 @@ public:
unsigned _inside : 1; // if we got an enter event, but not a leave event yet.
unsigned _no_auto_grab : 1; // do not automatically grab widget on button press event
unsigned _no_background : 1; // Don't draw the background automatically
unsigned _use_wheel : 1; // Do not propagate the mouse wheel event
void removeParent() { pr = NULL; }
void initSignals();

View file

@ -75,6 +75,7 @@ void gSlider::init()
{
GtkAdjustment* adj = gtk_range_get_adjustment(GTK_RANGE(widget));
_use_wheel = true;
onChange = NULL;
g_signal_connect(adj, "value-changed", G_CALLBACK(cb_change), (gpointer)this);

View file

@ -477,6 +477,7 @@ gTextArea::gTextArea(gContainer *parent) : gControl(parent)
_not_undoable_action = 0;
_undo_in_progress = false;
_has_input_method = true;
_use_wheel = true;
onChange = 0;
onCursor = 0;