diff options
| author | Po Lu | 2022-05-26 14:27:32 +0800 |
|---|---|---|
| committer | Po Lu | 2022-05-26 14:27:32 +0800 |
| commit | c67c7ab53c0fe4ff03c722c9bac44fcea6ad0699 (patch) | |
| tree | 3a35d616cc4601e2f59f117ea466ae49ba28e860 /src | |
| parent | 79d0b1a14c19c7bfcf2af694ec333cc6ac8b054b (diff) | |
| download | emacs-c67c7ab53c0fe4ff03c722c9bac44fcea6ad0699.tar.gz emacs-c67c7ab53c0fe4ff03c722c9bac44fcea6ad0699.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 12 |
1 files 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 | |||
| 3244 | XFree (atom_names[i - 1]); | 3244 | XFree (atom_names[i - 1]); |
| 3245 | } | 3245 | } |
| 3246 | 3246 | ||
| 3247 | name = XGetAtomName (dpyinfo->display, | 3247 | name = x_get_atom_name (dpyinfo, x_dnd_wanted_action, |
| 3248 | x_dnd_wanted_action); | 3248 | false); |
| 3249 | 3249 | ||
| 3250 | if (name) | 3250 | if (name) |
| 3251 | { | 3251 | { |
| 3252 | arg = intern (name); | 3252 | arg = intern (name); |
| 3253 | XFree (name); | 3253 | xfree (name); |
| 3254 | } | 3254 | } |
| 3255 | else | 3255 | else |
| 3256 | arg = Qnil; | 3256 | arg = Qnil; |
| @@ -3810,12 +3810,12 @@ x_dnd_send_drop (struct frame *f, Window target, Time timestamp, | |||
| 3810 | 3810 | ||
| 3811 | lval = Qnil; | 3811 | lval = Qnil; |
| 3812 | atom_names = alloca (x_dnd_n_targets * sizeof *atom_names); | 3812 | atom_names = alloca (x_dnd_n_targets * sizeof *atom_names); |
| 3813 | name = XGetAtomName (dpyinfo->display, x_dnd_wanted_action); | 3813 | name = x_get_atom_name (dpyinfo, x_dnd_wanted_action, false); |
| 3814 | 3814 | ||
| 3815 | if (!XGetAtomNames (dpyinfo->display, x_dnd_targets, | 3815 | if (!XGetAtomNames (dpyinfo->display, x_dnd_targets, |
| 3816 | x_dnd_n_targets, atom_names)) | 3816 | x_dnd_n_targets, atom_names)) |
| 3817 | { | 3817 | { |
| 3818 | XFree (name); | 3818 | xfree (name); |
| 3819 | return false; | 3819 | return false; |
| 3820 | } | 3820 | } |
| 3821 | 3821 | ||
| @@ -3833,7 +3833,7 @@ x_dnd_send_drop (struct frame *f, Window target, Time timestamp, | |||
| 3833 | XSETINT (ie.x, win_x); | 3833 | XSETINT (ie.x, win_x); |
| 3834 | XSETINT (ie.y, win_y); | 3834 | XSETINT (ie.y, win_y); |
| 3835 | 3835 | ||
| 3836 | XFree (name); | 3836 | xfree (name); |
| 3837 | kbd_buffer_store_event (&ie); | 3837 | kbd_buffer_store_event (&ie); |
| 3838 | 3838 | ||
| 3839 | return false; | 3839 | return false; |