forked from AuroraMiddleware/gtk
tests: Stop using gtk_get_current_ apis
Replace these by equivalent event controller apis where needed.
This commit is contained in:
parent
4b346538e2
commit
443fd4d63d
@ -40,7 +40,6 @@ static void
|
||||
on_button_toggle (GtkWidget *button, gpointer data)
|
||||
{
|
||||
GdkSurface *surface = GDK_SURFACE (data);
|
||||
GdkEvent *event;
|
||||
|
||||
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)))
|
||||
{
|
||||
@ -49,8 +48,7 @@ on_button_toggle (GtkWidget *button, gpointer data)
|
||||
}
|
||||
|
||||
gtk_check_button_set_inconsistent (GTK_CHECK_BUTTON (button), TRUE);
|
||||
event = gtk_get_current_event ();
|
||||
gdk_toplevel_inhibit_system_shortcuts (GDK_TOPLEVEL (surface), event);
|
||||
gdk_toplevel_inhibit_system_shortcuts (GDK_TOPLEVEL (surface), NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -19,7 +19,7 @@ start_resize (GtkGestureClick *gesture,
|
||||
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
|
||||
|
||||
surface = gtk_native_get_surface (gtk_widget_get_native (widget));
|
||||
event = gtk_get_current_event ();
|
||||
event = gtk_event_controller_get_current_event (GTK_EVENT_CONTROLLER (gesture));
|
||||
if (gdk_event_get_event_type (event) == GDK_BUTTON_PRESS)
|
||||
button = gdk_button_event_get_button (event);
|
||||
else
|
||||
@ -67,7 +67,7 @@ start_move (GtkGestureClick *gesture,
|
||||
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
|
||||
|
||||
surface = gtk_native_get_surface (gtk_widget_get_native (widget));
|
||||
event = gtk_get_current_event ();
|
||||
event = gtk_event_controller_get_current_event (GTK_EVENT_CONTROLLER (gesture));
|
||||
if (gdk_event_get_event_type (event) == GDK_BUTTON_PRESS)
|
||||
button = gdk_button_event_get_button (event);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user