mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +00:00
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
This commit is contained in:
commit
e30c83e166
@ -2562,6 +2562,7 @@ struct w32_drop_target {
|
|||||||
/* i_drop_target must be the first member. */
|
/* i_drop_target must be the first member. */
|
||||||
IDropTarget i_drop_target;
|
IDropTarget i_drop_target;
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
|
int ref_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE
|
static HRESULT STDMETHODCALLTYPE
|
||||||
@ -2573,13 +2574,16 @@ w32_drop_target_QueryInterface (IDropTarget *t, REFIID ri, void **r)
|
|||||||
static ULONG STDMETHODCALLTYPE
|
static ULONG STDMETHODCALLTYPE
|
||||||
w32_drop_target_AddRef (IDropTarget *This)
|
w32_drop_target_AddRef (IDropTarget *This)
|
||||||
{
|
{
|
||||||
return 1;
|
struct w32_drop_target *target = (struct w32_drop_target *) This;
|
||||||
|
return ++target->ref_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG STDMETHODCALLTYPE
|
static ULONG STDMETHODCALLTYPE
|
||||||
w32_drop_target_Release (IDropTarget *This)
|
w32_drop_target_Release (IDropTarget *This)
|
||||||
{
|
{
|
||||||
struct w32_drop_target *target = (struct w32_drop_target *) This;
|
struct w32_drop_target *target = (struct w32_drop_target *) This;
|
||||||
|
if (--target->ref_count > 0)
|
||||||
|
return target->ref_count;
|
||||||
free (target->i_drop_target.lpVtbl);
|
free (target->i_drop_target.lpVtbl);
|
||||||
free (target);
|
free (target);
|
||||||
return 0;
|
return 0;
|
||||||
@ -2770,6 +2774,7 @@ w32_createwindow (struct frame *f, int *coords)
|
|||||||
if (vtbl != NULL)
|
if (vtbl != NULL)
|
||||||
{
|
{
|
||||||
drop_target->hwnd = hwnd;
|
drop_target->hwnd = hwnd;
|
||||||
|
drop_target->ref_count = 0;
|
||||||
drop_target->i_drop_target.lpVtbl = vtbl;
|
drop_target->i_drop_target.lpVtbl = vtbl;
|
||||||
vtbl->QueryInterface = w32_drop_target_QueryInterface;
|
vtbl->QueryInterface = w32_drop_target_QueryInterface;
|
||||||
vtbl->AddRef = w32_drop_target_AddRef;
|
vtbl->AddRef = w32_drop_target_AddRef;
|
||||||
|
Loading…
Reference in New Issue
Block a user