From 1003f36febe91afe7381aac713d56335e555b22d Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 23 Jun 2022 13:58:16 +0800 Subject: [PATCH] Minor fixes to last change * src/pgtkselect.c (pgtk_get_window_property): Add 1 to xdata when it is GdkAtom. * src/pgtkterm.c (drag_leave): Initialize inev.ie. --- src/pgtkselect.c | 2 +- src/pgtkterm.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pgtkselect.c b/src/pgtkselect.c index 2a4f6adba4b..fff163c92a7 100644 --- a/src/pgtkselect.c +++ b/src/pgtkselect.c @@ -1108,7 +1108,7 @@ pgtk_get_window_property (GdkWindow *window, unsigned char **data_ret, eassert (actual_format == 32); length = length / sizeof (GdkAtom); - xdata = xmalloc (sizeof (GdkAtom) * length); + xdata = xmalloc (sizeof (GdkAtom) * length + 1); memcpy (xdata, data, 1 + length * sizeof (GdkAtom)); g_free (data); diff --git a/src/pgtkterm.c b/src/pgtkterm.c index a123311366a..1eb4d378adf 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -6259,6 +6259,8 @@ drag_leave (GtkWidget *widget, GdkDragContext *context, g_object_unref); } + EVENT_INIT (inev.ie); + inev.ie.kind = DRAG_N_DROP_EVENT; inev.ie.modifiers = 0; inev.ie.arg = Qnil; -- 2.39.2