forked from AuroraMiddleware/gtk
gtk: s/gdk_event_free/g_object_unref/
This commit is contained in:
parent
b03d3fb268
commit
d491e49fd6
@ -323,13 +323,13 @@ touch_release_in_button (GtkButton *button)
|
||||
|
||||
if (gdk_event_get_event_type (event) != GDK_TOUCH_END)
|
||||
{
|
||||
gdk_event_free (event);
|
||||
g_object_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gdk_event_get_coords (event, &x, &y);
|
||||
|
||||
gdk_event_free (event);
|
||||
g_object_unref (event);
|
||||
|
||||
if (gtk_widget_contains (GTK_WIDGET (button), x, y))
|
||||
return TRUE;
|
||||
|
@ -1225,7 +1225,7 @@ gtk_drag_begin_internal (GtkWidget *widget,
|
||||
* 3. During a timeout handler, if you want to start a drag after the mouse
|
||||
* button is held down for some time. Try to save the last event that you got
|
||||
* from the mouse, using gdk_event_copy(), and pass it to this function
|
||||
* (remember to free the event with gdk_event_free() when you are done).
|
||||
* (remember to free the event with g_object_unref() when you are done).
|
||||
* If you can really not pass a real event, pass %NULL instead.
|
||||
*
|
||||
* Returns: (transfer none): the context for this drag
|
||||
|
@ -8622,7 +8622,7 @@ gtk_entry_do_popup (GtkEntry *entry,
|
||||
}
|
||||
}
|
||||
|
||||
g_clear_pointer (&trigger_event, gdk_event_free);
|
||||
g_clear_object (&trigger_event);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -529,7 +529,7 @@ _gtk_gesture_update_point (GtkGesture *gesture,
|
||||
}
|
||||
|
||||
if (data->event)
|
||||
gdk_event_free (data->event);
|
||||
g_object_unref (data->event);
|
||||
|
||||
data->event = gdk_event_copy (event);
|
||||
_update_touchpad_deltas (data);
|
||||
@ -912,7 +912,7 @@ free_point_data (gpointer data)
|
||||
PointData *point = data;
|
||||
|
||||
if (point->event)
|
||||
gdk_event_free (point->event);
|
||||
g_object_unref (point->event);
|
||||
|
||||
g_free (point);
|
||||
}
|
||||
|
@ -1057,7 +1057,7 @@ no_sequence_matches (GtkIMContextSimple *context_simple,
|
||||
gdk_event_set_keyval (tmp_event, priv->compose_buffer[len + i]);
|
||||
|
||||
gtk_im_context_filter_keypress (context, (GdkEventKey *)tmp_event);
|
||||
gdk_event_free (tmp_event);
|
||||
g_object_unref (tmp_event);
|
||||
}
|
||||
|
||||
return gtk_im_context_filter_keypress (context, event);
|
||||
|
@ -1416,7 +1416,7 @@ synth_crossing (GtkWidget *widget,
|
||||
event->crossing.detail = notify_type;
|
||||
|
||||
gtk_widget_event (widget, event);
|
||||
gdk_event_free (event);
|
||||
g_object_unref (event);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
@ -1912,7 +1912,7 @@ gtk_main_do_event (GdkEvent *event)
|
||||
g_list_free_1 (tmp_list);
|
||||
|
||||
if (rewritten_event)
|
||||
gdk_event_free (rewritten_event);
|
||||
g_object_unref (rewritten_event);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2332,7 +2332,7 @@ gtk_device_grab_remove (GtkWidget *widget,
|
||||
*
|
||||
* Returns: (transfer full) (nullable): a copy of the current event, or
|
||||
* %NULL if there is no current event. The returned event must be
|
||||
* freed with gdk_event_free().
|
||||
* freed with g_object_unref().
|
||||
*/
|
||||
GdkEvent*
|
||||
gtk_get_current_event (void)
|
||||
|
@ -1692,7 +1692,7 @@ gtk_menu_popup_internal (GtkMenu *menu,
|
||||
menu_shell->priv->ignore_enter = TRUE;
|
||||
|
||||
source_device = gdk_event_get_source_device (current_event);
|
||||
gdk_event_free (current_event);
|
||||
g_object_unref (current_event);
|
||||
}
|
||||
else
|
||||
menu_shell->priv->ignore_enter = TRUE;
|
||||
@ -1990,7 +1990,7 @@ gtk_menu_popup_at_rect (GtkMenu *menu,
|
||||
button,
|
||||
activate_time);
|
||||
|
||||
g_clear_pointer (¤t_event, gdk_event_free);
|
||||
g_clear_object (¤t_event);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2083,7 +2083,7 @@ gtk_menu_popup_at_widget (GtkMenu *menu,
|
||||
button,
|
||||
activate_time);
|
||||
|
||||
g_clear_pointer (¤t_event, gdk_event_free);
|
||||
g_clear_object (¤t_event);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2150,7 +2150,7 @@ gtk_menu_popup_at_pointer (GtkMenu *menu,
|
||||
GDK_GRAVITY_NORTH_WEST,
|
||||
trigger_event);
|
||||
|
||||
g_clear_pointer (¤t_event, gdk_event_free);
|
||||
g_clear_object (¤t_event);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -423,7 +423,7 @@ gtk_menu_button_toggled (GtkToggleButton *button)
|
||||
gtk_menu_shell_select_first (GTK_MENU_SHELL (priv->menu), FALSE);
|
||||
|
||||
if (event)
|
||||
gdk_event_free (event);
|
||||
g_object_unref (event);
|
||||
}
|
||||
}
|
||||
else if (priv->popover)
|
||||
|
@ -1178,7 +1178,7 @@ gtk_real_menu_item_select (GtkMenuItem *menu_item)
|
||||
if (current_event)
|
||||
{
|
||||
source_device = gdk_event_get_source_device (current_event);
|
||||
gdk_event_free (current_event);
|
||||
g_object_unref (current_event);
|
||||
}
|
||||
|
||||
if ((!source_device ||
|
||||
@ -1516,7 +1516,7 @@ gtk_menu_item_popup_timeout (gpointer data)
|
||||
|
||||
priv->timer = 0;
|
||||
|
||||
g_clear_pointer (&info->trigger_event, gdk_event_free);
|
||||
g_clear_object (&info->trigger_event);
|
||||
g_slice_free (PopupInfo, info);
|
||||
|
||||
return FALSE;
|
||||
|
@ -8379,7 +8379,7 @@ gtk_text_view_value_changed (GtkAdjustment *adjustment,
|
||||
if (gdk_event_get_event_type (current_event) == GDK_SCROLL)
|
||||
move_mark_to_pointer_and_scroll (text_view, "insert");
|
||||
|
||||
gdk_event_free (current_event);
|
||||
g_object_unref (current_event);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8860,7 +8860,7 @@ gtk_text_view_do_popup (GtkTextView *text_view,
|
||||
}
|
||||
}
|
||||
|
||||
g_clear_pointer (&trigger_event, gdk_event_free);
|
||||
g_clear_object (&trigger_event);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -5743,7 +5743,7 @@ gtk_tree_view_key_press (GtkWidget *widget,
|
||||
/* Because we keep the focus on the treeview, we need to forward the
|
||||
* key events to the entry, when it is visible. */
|
||||
gtk_widget_event (search_window, new_event);
|
||||
gdk_event_free (new_event);
|
||||
g_object_unref (new_event);
|
||||
|
||||
g_signal_handler_disconnect (tree_view->priv->search_entry,
|
||||
popup_menu_id);
|
||||
@ -10652,7 +10652,7 @@ send_focus_change (GtkWidget *widget,
|
||||
|
||||
gtk_widget_send_focus_change (widget, fevent);
|
||||
|
||||
gdk_event_free (fevent);
|
||||
g_object_unref (fevent);
|
||||
}
|
||||
|
||||
g_list_free (devices);
|
||||
|
@ -3448,7 +3448,7 @@ _gtk_widget_emulate_press (GtkWidget *widget,
|
||||
|
||||
/* Perform propagation state starting from the next child in the chain */
|
||||
gtk_propagate_event_internal (event_widget, press, next_child);
|
||||
gdk_event_free (press);
|
||||
g_object_unref (press);
|
||||
}
|
||||
|
||||
static const GdkEvent *
|
||||
@ -6511,7 +6511,7 @@ _gtk_widget_captured_event (GtkWidget *widget,
|
||||
g_object_unref (widget);
|
||||
|
||||
out:
|
||||
gdk_event_free (event_copy);
|
||||
g_object_unref (event_copy);
|
||||
|
||||
return return_val;
|
||||
}
|
||||
@ -6625,7 +6625,7 @@ gtk_widget_event_internal (GtkWidget *widget,
|
||||
|
||||
if (return_val == FALSE)
|
||||
return_val |= _gtk_widget_run_controllers (widget, event_copy, GTK_PHASE_BUBBLE);
|
||||
gdk_event_free (event_copy);
|
||||
g_object_unref (event_copy);
|
||||
|
||||
return return_val;
|
||||
}
|
||||
@ -10291,7 +10291,7 @@ synth_crossing (GtkWidget *widget,
|
||||
if (widget)
|
||||
gtk_widget_event_internal (widget, event);
|
||||
|
||||
gdk_event_free (event);
|
||||
g_object_unref (event);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -13321,7 +13321,7 @@ gtk_widget_get_opacity (GtkWidget *widget)
|
||||
*
|
||||
* gtk_widget_send_focus_change (widget, fevent);
|
||||
*
|
||||
* gdk_event_free (event);
|
||||
* g_object_unref (event);
|
||||
* ]|
|
||||
*
|
||||
* Returns: the return value from the event signal emission: %TRUE
|
||||
|
@ -1337,7 +1337,7 @@ send_delete_event (gpointer data)
|
||||
priv->delete_event_handler = 0;
|
||||
|
||||
gtk_main_do_event (event);
|
||||
gdk_event_free (event);
|
||||
g_object_unref (event);
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
@ -7637,7 +7637,7 @@ do_focus_change (GtkWidget *widget,
|
||||
|
||||
gtk_widget_send_focus_change (widget, fevent);
|
||||
|
||||
gdk_event_free (fevent);
|
||||
g_object_unref (fevent);
|
||||
}
|
||||
|
||||
g_list_free (devices);
|
||||
|
Loading…
Reference in New Issue
Block a user