diff options
author | Rick Pasetto <rick@lindenlab.com> | 2009-11-12 11:06:29 -0800 |
---|---|---|
committer | Rick Pasetto <rick@lindenlab.com> | 2009-11-12 11:06:29 -0800 |
commit | bf5ce0fcbd9a71ce1372db0f42395ba47747fd78 (patch) | |
tree | 10eca747caca961efcbcfa6f173f4118232b1929 /indra/llwindow/lldragdropwin32.cpp | |
parent | 3dd79ad226bc8e0aec18dba87223a3f50ecf360b (diff) |
Change 'handleDrop()' API to 'handleDragNDrop', which now takes a "drop" BOOL
Diffstat (limited to 'indra/llwindow/lldragdropwin32.cpp')
-rw-r--r-- | indra/llwindow/lldragdropwin32.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/llwindow/lldragdropwin32.cpp b/indra/llwindow/lldragdropwin32.cpp index d05dbf19a5..879f2d2b90 100644 --- a/indra/llwindow/lldragdropwin32.cpp +++ b/indra/llwindow/lldragdropwin32.cpp @@ -171,6 +171,22 @@ class LLDragDropWin32Target: STDMETHOD (DragOver)(DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect)
{
HRESULT hr = S_OK;
+ // XXX MAJOR MAJOR HACK!
+ LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(mWindowHandle, GWL_USERDATA);
+ if (NULL != window_imp)
+ {
+ LLCoordGL gl_coord( 0, 0 );
+
+ POINT pt2;
+ pt2.x = pt.x;
+ pt2.y = pt.y;
+ ScreenToClient( mWindowHandle, &pt2 );
+
+ LLCoordWindow cursor_coord_window( pt2.x, pt2.y );
+ window_imp->convertCoords(cursor_coord_window, &gl_coord);
+ MASK mask = gKeyboard->currentMask(TRUE);
+ bDropTargetValid = window_imp->completeDragNDropRequest( gl_coord, mask, FALSE, std::string( "" ) );
+ }
if (bDropTargetValid)
*pdwEffect=DROPEFFECT_COPY;
@@ -225,7 +241,7 @@ class LLDragDropWin32Target: llinfos << llendl;
MASK mask = gKeyboard->currentMask(TRUE);
- window_imp->completeDropRequest( gl_coord, mask, std::string( lpszText ) );
+ window_imp->completeDragNDropRequest( gl_coord, mask, TRUE, std::string( lpszText ) );
};
GlobalUnlock(hText);
|