mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master See merge request GNOME/gtk!1580
This commit is contained in:
commit
3437f85aaf
@ -120,7 +120,7 @@ handle_focus_change (GdkEvent *event)
|
||||
gdk_event_get_source_device (event),
|
||||
focus_in);
|
||||
gdk_display_put_event (gdk_event_get_display (event), focus_event);
|
||||
g_object_unref (focus_event);
|
||||
gdk_event_unref (focus_event);
|
||||
}
|
||||
}
|
||||
|
||||
@ -209,7 +209,7 @@ handle_touch_synthetic_crossing (GdkEvent *event)
|
||||
if (crossing)
|
||||
{
|
||||
gdk_display_put_event (gdk_device_get_display (device), crossing);
|
||||
g_object_unref (crossing);
|
||||
gdk_event_unref (crossing);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -306,10 +306,11 @@ click_pressed_cb (GtkGestureClick *gesture,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
touch_release_in_button (GtkButton *button)
|
||||
touch_release_in_button (GtkButton *button,
|
||||
double x,
|
||||
double y)
|
||||
{
|
||||
GdkEvent *event;
|
||||
gdouble x, y;
|
||||
|
||||
event = gtk_get_current_event ();
|
||||
|
||||
@ -322,8 +323,6 @@ touch_release_in_button (GtkButton *button)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gdk_event_get_position (event, &x, &y);
|
||||
|
||||
gdk_event_unref (event);
|
||||
|
||||
if (gtk_widget_contains (GTK_WIDGET (button), x, y))
|
||||
@ -346,7 +345,7 @@ click_released_cb (GtkGestureClick *gesture,
|
||||
gtk_button_do_release (button,
|
||||
gtk_widget_is_sensitive (GTK_WIDGET (button)) &&
|
||||
(priv->in_button ||
|
||||
touch_release_in_button (button)));
|
||||
touch_release_in_button (button, x, y)));
|
||||
|
||||
sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
|
||||
|
||||
|
@ -1042,12 +1042,19 @@ gtk_cell_area_real_event (GtkCellArea *area,
|
||||
GtkCellRenderer *renderer = NULL;
|
||||
GtkCellRenderer *focus_renderer;
|
||||
GdkRectangle alloc_area;
|
||||
gdouble event_x, event_y;
|
||||
double event_x, event_y;
|
||||
int x, y;
|
||||
GtkNative *native;
|
||||
|
||||
/* We may need some semantics to tell us the offset of the event
|
||||
* window we are handling events for (i.e. GtkTreeView has a bin_window) */
|
||||
gdk_event_get_position (event, &event_x, &event_y);
|
||||
|
||||
native = gtk_widget_get_native (widget);
|
||||
gtk_widget_translate_coordinates (GTK_WIDGET (native), widget, event_x, event_y, &x, &y);
|
||||
event_x = x;
|
||||
event_y = y;
|
||||
|
||||
/* Dont try to search for an event coordinate that is not in the area, that will
|
||||
* trigger a runtime warning.
|
||||
*/
|
||||
|
@ -1293,8 +1293,6 @@ gtk_gesture_get_bounding_box (GtkGesture *gesture,
|
||||
|
||||
while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &data))
|
||||
{
|
||||
gdouble x, y;
|
||||
|
||||
if (data->state == GTK_EVENT_SEQUENCE_DENIED)
|
||||
continue;
|
||||
|
||||
@ -1304,12 +1302,11 @@ gtk_gesture_get_bounding_box (GtkGesture *gesture,
|
||||
event_type == GDK_BUTTON_RELEASE)
|
||||
continue;
|
||||
|
||||
gdk_event_get_position (data->event, &x, &y);
|
||||
n_points++;
|
||||
x1 = MIN (x1, x);
|
||||
y1 = MIN (y1, y);
|
||||
x2 = MAX (x2, x);
|
||||
y2 = MAX (y2, y);
|
||||
x1 = MIN (x1, data->widget_x);
|
||||
y1 = MIN (y1, data->widget_y);
|
||||
x2 = MAX (x2, data->widget_x);
|
||||
y2 = MAX (y2, data->widget_y);
|
||||
}
|
||||
|
||||
if (n_points == 0)
|
||||
|
@ -929,7 +929,7 @@ no_sequence_matches (GtkIMContextSimple *context_simple,
|
||||
0);
|
||||
|
||||
gtk_im_context_filter_keypress (context, tmp_event);
|
||||
g_object_unref (tmp_event);
|
||||
gdk_event_unref (tmp_event);
|
||||
}
|
||||
|
||||
return gtk_im_context_filter_keypress (context, event);
|
||||
|
Loading…
Reference in New Issue
Block a user