From: Cecilio Pardo <cpardo@imayhem.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 3468@debbugs.gnu.org
Subject: bug#3468: drag and drop text
Date: Sat, 5 Oct 2024 14:07:01 +0200 [thread overview]
Message-ID: <ad5ca569-f4d7-4999-b764-69330e86c7a8@imayhem.com> (raw)
In-Reply-To: <86ed4ux0xj.fsf@gnu.org>
On 05/10/2024 13:07, Eli Zaretskii wrote:
>> There is no malloc/strdup.
>
> Well, there are still 2 calls to malloc in w32_createwindow. Any
> reasons not to call xmalloc instead? Can w32_createwindow be called
> before we call init_heap?
[...]
> Do we ever have to free the two memory chunks we allocate here? Like
> when the window is disposed of?
They are freed in w32_drop_target_Release, which is called internally
when we call RevokeDragDrop while handling the WW_EMACS_DESTROYWINDOW on
w32_wnd_proc.
As this runs on the input thread, I used malloc/free instead of
xmalloc/xfree. I could send a message to handle on w32_read_socket and
then use xmalloc.
> This function should call block_input at entry and unblock_input
> before it exits, because we must make sure all the GlobalLock calls
> are paired with GlobalUnlock and GlobalFree, while functions we call
> here, process_dropfiles etc., all cons Lisp object, and therefore
> could potentially QUIT, which throws to top-level.
The function (w32_process_dnd_data) is called from within the
block_input/unblock_input on w32_read_socket.
Should I add its own calls for clarity? Maybe just a comment?
Thanks.
next prev parent reply other threads:[~2024-10-05 12:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-04 7:03 bug#3468: drag and drop text Erdkern Erdkern
2019-09-30 15:29 ` Lars Ingebrigtsen
2019-09-30 15:49 ` Eli Zaretskii
2024-09-28 21:52 ` Cecilio Pardo
2024-09-29 7:19 ` Eli Zaretskii
2024-09-29 11:17 ` Cecilio Pardo
2024-09-29 11:36 ` Eli Zaretskii
2024-09-29 11:45 ` Cecilio Pardo
2024-09-30 21:20 ` Cecilio Pardo
2024-10-05 11:07 ` Eli Zaretskii
2024-10-05 12:07 ` Cecilio Pardo [this message]
2024-10-05 12:30 ` Eli Zaretskii
2024-10-05 12:34 ` Eli Zaretskii
2024-10-05 21:41 ` Cecilio Pardo
2024-10-05 21:43 ` Cecilio Pardo
2024-10-06 6:10 ` Eli Zaretskii
2024-10-07 10:28 ` Cecilio Pardo
2024-10-07 12:00 ` Eli Zaretskii
2024-10-08 13:15 ` Eli Zaretskii
2024-10-08 18:51 ` Cecilio Pardo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ad5ca569-f4d7-4999-b764-69330e86c7a8@imayhem.com \
--to=cpardo@imayhem.com \
--cc=3468@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).