forked from pyrite-dev/milsko
gdi: properly quit drag and drop after its finished
This commit is contained in:
parent
0fd0611a99
commit
7e339cfd60
2 changed files with 7 additions and 1 deletions
|
|
@ -34,6 +34,7 @@ struct _MwLLGDI {
|
|||
struct _MwLLGDIDropTarget* dropTarget;
|
||||
struct _MwLLGDIDropSource* dropSource;
|
||||
MwBool drag_update;
|
||||
MwBool finishing_drag;
|
||||
};
|
||||
|
||||
struct _MwLLGDIColor {
|
||||
|
|
|
|||
|
|
@ -607,6 +607,10 @@ static void MwLLNextEventImpl(MwLL handle) {
|
|||
|
||||
handle->gdi.get_darktheme = 0;
|
||||
}
|
||||
if(handle->gdi.finishing_drag) {
|
||||
handle->gdi.drag_update = 0;
|
||||
handle->gdi.finishing_drag = 0;
|
||||
}
|
||||
while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
|
|
@ -1102,11 +1106,12 @@ static HRESULT STDMETHODCALLTYPE GDIDT_Drop(IDropTarget* this_, IDataObject* pDa
|
|||
for(n = 0; n < arrlen(self->handle->common.known_mime_types); n++) {
|
||||
if(strcmp(mime_type_normal, self->handle->common.known_mime_types[n]) == 0) {
|
||||
MwDispatchUserHandler(self->handle->common.user, MwNdragAndDropHandler, path_normal);
|
||||
break;
|
||||
self->handle->gdi.finishing_drag = 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
MwDispatchUserHandler(self->handle->common.user, MwNdragAndDropHandler, path_normal);
|
||||
self->handle->gdi.finishing_drag = 1;
|
||||
}
|
||||
}
|
||||
free(mime_type);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue