[gtk/wip/carlosg/text-handle-natives: 1/6] gdk: Avoid poking possibly freed memory
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/text-handle-natives: 1/6] gdk: Avoid poking possibly freed memory
- Date: Mon, 3 Feb 2020 20:55:06 +0000 (UTC)
commit c99d6193b512b1ea081a0fd96c8e275a91ae0f33
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Oct 8 17:56:10 2019 +0200
gdk: Avoid poking possibly freed memory
The event may end up freed after delivery, ensure to keep a ref in order
to emit the matching emulated crossed event matching a proximity event.
gtk/gtkscrolledwindow.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 83b4c1e285..f9d1fb1bec 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1174,6 +1174,7 @@ captured_scroll_cb (GtkEventControllerScroll *scroll,
double delta_y,
GtkScrolledWindow *scrolled_window)
{
+ g_print ("capture..\n");
gtk_scrolled_window_cancel_deceleration (scrolled_window);
return GDK_EVENT_PROPAGATE;
@@ -1269,6 +1270,7 @@ scroll_controller_scroll (GtkEventControllerScroll *scroll,
gboolean shifted;
GdkModifierType state;
+ g_print ("bubble..\n");
if (!gtk_get_current_event_state (&state))
return GDK_EVENT_PROPAGATE;
@@ -1353,6 +1355,8 @@ scroll_controller_decelerate (GtkEventControllerScroll *scroll,
gboolean shifted;
GdkModifierType state;
+ g_print ("decellll\n");
+
if (!gtk_get_current_event_state (&state))
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]