From: Po Lu Date: Thu, 23 Jun 2022 05:58:16 +0000 (+0800) Subject: Minor fixes to last change X-Git-Tag: emacs-29.0.90~1447^2~1522 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1003f36febe91afe7381aac713d56335e555b22d;p=emacs.git 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. --- 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;