GNU bug report logs - #3468
Support drag and drop of text on MS Windows

Previous Next

Package: emacs;

Reported by: "Erdkern Erdkern" <Erdkern2000 <at> gmx.de>

Date: Fri, 5 Jun 2009 00:00:04 UTC

Severity: wishlist

Tags: help

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Cecilio Pardo <cpardo <at> imayhem.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 3468 <at> debbugs.gnu.org
Subject: bug#3468: drag and drop text
Date: Sat, 5 Oct 2024 14:07:01 +0200
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.







This bug report was last modified 265 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.