From c67c7ab53c0fe4ff03c722c9bac44fcea6ad0699 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 26 May 2022 14:27:32 +0800 Subject: [PATCH] Use x_get_atom_name for some more things * src/xterm.c (x_dnd_send_unsupported_drop, x_dnd_send_drop): Use x_get_atom_name instead of XGetAtomName. --- src/xterm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index d518ce331ae..cde98b43b45 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3244,13 +3244,13 @@ x_dnd_send_unsupported_drop (struct x_display_info *dpyinfo, Window target_windo XFree (atom_names[i - 1]); } - name = XGetAtomName (dpyinfo->display, - x_dnd_wanted_action); + name = x_get_atom_name (dpyinfo, x_dnd_wanted_action, + false); if (name) { arg = intern (name); - XFree (name); + xfree (name); } else arg = Qnil; @@ -3810,12 +3810,12 @@ x_dnd_send_drop (struct frame *f, Window target, Time timestamp, lval = Qnil; atom_names = alloca (x_dnd_n_targets * sizeof *atom_names); - name = XGetAtomName (dpyinfo->display, x_dnd_wanted_action); + name = x_get_atom_name (dpyinfo, x_dnd_wanted_action, false); if (!XGetAtomNames (dpyinfo->display, x_dnd_targets, x_dnd_n_targets, atom_names)) { - XFree (name); + xfree (name); return false; } @@ -3833,7 +3833,7 @@ x_dnd_send_drop (struct frame *f, Window target, Time timestamp, XSETINT (ie.x, win_x); XSETINT (ie.y, win_y); - XFree (name); + xfree (name); kbd_buffer_store_event (&ie); return false; -- 2.39.2