зеркало из https://github.com/mozilla/pjs.git
Fix for bug 46223, not being able to accept drops from other applications. Basically,
when a drag came in from outside, the drag service was never being notified and a drag session was never being created. Fix is to use the Start/EndDragSession() methods which were designed for just this situation. r=hyatt
This commit is contained in:
Родитель
aff2fb4f1e
Коммит
d74b58010f
|
@ -217,6 +217,11 @@ STDMETHODIMP nsNativeDragTarget::DragEnter(LPDATAOBJECT pIDataSource,
|
|||
if (DRAG_DEBUG) printf("DragEnter\n");
|
||||
|
||||
if (mDragService) {
|
||||
|
||||
// tell the drag service about this drag (it may have come from an
|
||||
// outside app).
|
||||
mDragService->StartDragSession();
|
||||
|
||||
// We have a new IDataObject, release the old one, if necessary and
|
||||
// keep a pointer to the new on
|
||||
NS_IF_RELEASE(mDataObj);
|
||||
|
@ -261,6 +266,10 @@ STDMETHODIMP nsNativeDragTarget::DragLeave() {
|
|||
|
||||
if (DRAG_DEBUG) printf("DragLeave\n");
|
||||
if (mDragService) {
|
||||
|
||||
// tell the drag service that we're done with it
|
||||
mDragService->EndDragSession();
|
||||
|
||||
// tell anyone interested to stop tracking drags, but only when we're
|
||||
// leaving a window, not a child widget
|
||||
nsCOMPtr<nsIWidget> parent ( dont_AddRef(mWindow->GetParent()) );
|
||||
|
|
Загрузка…
Ссылка в новой задаче