зеркало из https://github.com/mozilla/gecko-dev.git
Bug 776865 - change mWindow to mWidget in nsNativeDragTarget to avoid confusion. r=bbondy.
This commit is contained in:
Родитель
52fc40391f
Коммит
04ab528588
|
@ -31,13 +31,13 @@ static POINTL gDragLastPoint;
|
|||
/*
|
||||
* class nsNativeDragTarget
|
||||
*/
|
||||
nsNativeDragTarget::nsNativeDragTarget(nsIWidget * aWnd)
|
||||
nsNativeDragTarget::nsNativeDragTarget(nsIWidget * aWidget)
|
||||
: m_cRef(0),
|
||||
mEffectsAllowed(DROPEFFECT_MOVE | DROPEFFECT_COPY | DROPEFFECT_LINK),
|
||||
mEffectsPreferred(DROPEFFECT_NONE),
|
||||
mTookOwnRef(false), mWindow(aWnd), mDropTargetHelper(nsnull)
|
||||
mTookOwnRef(false), mWidget(aWidget), mDropTargetHelper(nsnull)
|
||||
{
|
||||
mHWnd = (HWND)mWindow->GetNativeData(NS_NATIVE_WINDOW);
|
||||
mHWnd = (HWND)mWidget->GetNativeData(NS_NATIVE_WINDOW);
|
||||
|
||||
/*
|
||||
* Create/Get the DragService that we have implemented
|
||||
|
@ -97,7 +97,7 @@ nsNativeDragTarget::GetGeckoDragAction(DWORD grfKeyState, LPDWORD pdwEffect,
|
|||
{
|
||||
// If a window is disabled or a modal window is on top of it
|
||||
// (which implies it is disabled), then we should not allow dropping.
|
||||
if (!mWindow->IsEnabled()) {
|
||||
if (!mWidget->IsEnabled()) {
|
||||
*pdwEffect = DROPEFFECT_NONE;
|
||||
*aGeckoAction = nsIDragService::DRAGDROP_ACTION_NONE;
|
||||
return;
|
||||
|
@ -153,9 +153,9 @@ void
|
|||
nsNativeDragTarget::DispatchDragDropEvent(PRUint32 aEventType, POINTL aPT)
|
||||
{
|
||||
nsEventStatus status;
|
||||
nsDragEvent event(true, aEventType, mWindow);
|
||||
nsDragEvent event(true, aEventType, mWidget);
|
||||
|
||||
nsWindow * win = static_cast<nsWindow *>(mWindow);
|
||||
nsWindow * win = static_cast<nsWindow *>(mWidget);
|
||||
win->InitEvent(event);
|
||||
POINT cpos;
|
||||
|
||||
|
@ -176,7 +176,7 @@ nsNativeDragTarget::DispatchDragDropEvent(PRUint32 aEventType, POINTL aPT)
|
|||
|
||||
event.inputSource = static_cast<nsBaseDragService*>(mDragService)->GetInputSource();
|
||||
|
||||
mWindow->DispatchEvent(&event, status);
|
||||
mWidget->DispatchEvent(&event, status);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -29,7 +29,7 @@ struct IDataObject;
|
|||
class nsNativeDragTarget MOZ_FINAL : public IDropTarget
|
||||
{
|
||||
public:
|
||||
nsNativeDragTarget(nsIWidget * aWnd);
|
||||
nsNativeDragTarget(nsIWidget * aWidget);
|
||||
~nsNativeDragTarget();
|
||||
|
||||
// IUnknown members - see iunknown.h for documentation
|
||||
|
@ -85,7 +85,7 @@ protected:
|
|||
bool mTookOwnRef;
|
||||
|
||||
// Gecko Stuff
|
||||
nsIWidget * mWindow;
|
||||
nsIWidget * mWidget;
|
||||
nsIDragService * mDragService;
|
||||
// Drag target helper
|
||||
IDropTargetHelper * GetDropTargetHelper();
|
||||
|
|
Загрузка…
Ссылка в новой задаче