[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59875: 30.0.50; [PATCH] fallout c73f99f
From: |
Po Lu |
Subject: |
bug#59875: 30.0.50; [PATCH] fallout c73f99f |
Date: |
Thu, 08 Dec 2022 09:58:08 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
dick <dick.r.chiang@gmail.com> writes:
> src/xselect.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/src/xselect.c b/src/xselect.c
> index 121b17df1b0..78820cb3a7c 100644
> --- a/src/xselect.c
> +++ b/src/xselect.c
> @@ -624,6 +624,13 @@ x_pop_current_selection_request (void)
> xfree (tem);
> }
>
> +static bool
> +x_selection_for_multiple (struct selection_data *data)
> +{
> + return (Atom *) data->data
> + == &selection_request_stack->conversion_fail_tag;
> +}
> +
> /* Used as an unwind-protect clause so that, if a selection-converter signals
> an error, we tell the requestor that we were unable to do what they wanted
> before we throw to top-level or go into the debugger or whatever. */
> @@ -639,7 +646,7 @@ x_selection_request_lisp_error (void)
> for (cs = frame->converted_selections; cs; cs = next)
> {
> next = cs->next;
> - if (cs->data)
> + if (cs->data && ! x_selection_for_multiple (cs))
> xfree (cs->data);
> xfree (cs);
> }
> @@ -839,8 +846,7 @@ x_start_selection_transfer (struct x_display_info
> *dpyinfo, Window requestor,
> secs = timeout / 1000;
> nsecs = (timeout % 1000) * 1000000;
>
> - if ((Atom *) data->data
> - == &selection_request_stack->conversion_fail_tag)
> + if (x_selection_for_multiple (data))
> return;
>
> transfer = xzalloc (sizeof *transfer);
No. I will install a better fix and am closing this bug.
Don't you think `x_selection_for_multiple' is a misleading name? Did you
try to understand the code there?
In addition, if you do not write even a real commit message for a patch
you attach, or explain what it fixes, you are simply wasting everyone
else's time. If you see a bug, it's better to just report it rather
than submitting a patch like this.