70274 - right-clicking should cancel link/text drag on Windows

r=ere@atp.fi  sr=jag
This commit is contained in:
dean_tessman%hotmail.com 2003-03-07 03:53:31 +00:00
parent ebc97acbfd
commit 00a714a684
2 changed files with 6 additions and 10 deletions

View File

@ -52,8 +52,6 @@ nsNativeDragSource::~nsNativeDragSource()
{
}
// IUnknown methods - see iunknown.h for documentation
STDMETHODIMP nsNativeDragSource::QueryInterface(REFIID riid, void** ppv)
{
*ppv=NULL;
@ -88,8 +86,6 @@ STDMETHODIMP_(ULONG) nsNativeDragSource::Release(void)
return 0;
}
// IDataSource methods - see idropsrc.h for documentation
STDMETHODIMP nsNativeDragSource::QueryContinueDrag(BOOL fEsc, DWORD grfKeyState)
{
#ifdef DEBUG
@ -102,13 +98,13 @@ STDMETHODIMP nsNativeDragSource::QueryContinueDrag(BOOL fEsc, DWORD grfKeyState)
return ResultFromScode(DRAGDROP_S_CANCEL);
}
if (!(grfKeyState & MK_LBUTTON)) {
if (!(grfKeyState & MK_LBUTTON) || (grfKeyState & MK_RBUTTON)) {
#ifdef DEBUG
//printf("grfKeyState & MK_LBUTTON\n");
#endif
return ResultFromScode(DRAGDROP_S_DROP);
}
#ifdef DEBUG
//printf("NOERROR\n");
#endif

View File

@ -61,7 +61,7 @@ class nsNativeDragSource : public IDropSource
STDMETHODIMP_(ULONG) AddRef ();
STDMETHODIMP_(ULONG) Release ();
public: // IDropSource methods
public: // IDropSource methods - see idropsrc.h for documentation
// Return DRAGDROP_S_USEDEFAULTCURSORS if this object lets OLE provide
// default cursors, otherwise return NOERROR. This method gets called in
@ -69,9 +69,9 @@ class nsNativeDragSource : public IDropSource
// DragOver).
STDMETHODIMP GiveFeedback (DWORD dEffect);
// If fESC is TRUE return DRAGDROP_S_CANCEL. If the left mouse button
// is released return DRAGDROP_S_DROP. Otherwise return NOERROR. This
// method gets called if there is any change in the mouse or key state.
// This method gets called if there is any change in the mouse or key
// state. Return DRAGDROP_S_CANCEL to stop the drag, DRAGDROP_S_DROP
// to execute the drop, otherwise NOERROR.
STDMETHODIMP QueryContinueDrag (BOOL fESC, DWORD grfKeyState);
protected: