Fixes incorrect grabbing behaviour causing subsequent rejection of input
mouse_location can be set to NULL in gtk_range_update_mouse_location(). This causes a match with stepper_?_gadget in gtk_range_multipress_gesture_pressed(), as both are NULL. This leads to a grab being added internally and as well, a critical error message, and a subsequent rejection of touch inputs. Returning early when mouse_location is NULL prevents this. Closes #4947
This commit is contained in:
@@ -2711,6 +2711,11 @@ gtk_range_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
|
||||
priv->mouse_y = y;
|
||||
|
||||
gtk_range_update_mouse_location (range);
|
||||
if (!priv->mouse_location)
|
||||
{
|
||||
g_warning(G_STRLOC "value of mouse_location is 'NULL'");
|
||||
return;
|
||||
}
|
||||
gtk_css_gadget_get_margin_box (priv->slider_gadget, &slider_alloc);
|
||||
|
||||
g_object_get (gtk_widget_get_settings (widget),
|
||||
|
||||
Reference in New Issue
Block a user