[gtk/readonly-events-1: 31/33] gtk-demo: Stop using gtk_get_event_widget
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/readonly-events-1: 31/33] gtk-demo: Stop using gtk_get_event_widget
- Date: Fri, 21 Feb 2020 04:41:45 +0000 (UTC)
commit a34b6da14eb4ea4539d2936b6b6c6f2dd541cfc2
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Feb 20 21:27:26 2020 -0500
gtk-demo: Stop using gtk_get_event_widget
This is convenience api that will be going away.
demos/gtk-demo/popover.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/demos/gtk-demo/popover.c b/demos/gtk-demo/popover.c
index 860df60416..2d5c44cf59 100644
--- a/demos/gtk-demo/popover.c
+++ b/demos/gtk-demo/popover.c
@@ -99,6 +99,7 @@ day_selected_cb (GtkCalendar *calendar,
GtkWidget *popover;
GdkEvent *event;
gdouble x, y;
+ GtkWidget *widget;
event = gtk_get_current_event ();
@@ -106,7 +107,8 @@ day_selected_cb (GtkCalendar *calendar,
return;
gdk_event_get_position (event, &x, &y);
- gtk_widget_translate_coordinates (gtk_get_event_widget (event),
+ widget = gtk_native_get_for_surface (gdk_event_get_surface (event));
+ gtk_widget_translate_coordinates (widget,
GTK_WIDGET (calendar),
x, y,
&rect.x, &rect.y);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]