diff options
Diffstat (limited to 'indra/llwindow/lldragdropwin32.cpp')
-rw-r--r-- | indra/llwindow/lldragdropwin32.cpp | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/indra/llwindow/lldragdropwin32.cpp b/indra/llwindow/lldragdropwin32.cpp index a10cfbf12f..6024931092 100644 --- a/indra/llwindow/lldragdropwin32.cpp +++ b/indra/llwindow/lldragdropwin32.cpp @@ -125,23 +125,29 @@ class LLDragDropWin32Target: {
if ( mAllowDrop )
{
- // XXX MAJOR MAJOR HACK!
- LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(mAppWindowHandle, GWL_USERDATA);
- if (NULL != window_imp)
- {
- LLCoordGL gl_coord( 0, 0 );
-
- POINT pt2;
- pt2.x = pt.x;
- pt2.y = pt.y;
- ScreenToClient( mAppWindowHandle, &pt2 );
+ bool allowed_to_drop = false;
- LLCoordWindow cursor_coord_window( pt2.x, pt2.y );
- window_imp->convertCoords(cursor_coord_window, &gl_coord);
- MASK mask = gKeyboard->currentMask(TRUE);
- window_imp->completeDragNDropRequest( gl_coord, mask, FALSE, std::string( "" ) );
- }
- *pdwEffect = DROPEFFECT_COPY;
+ // XXX MAJOR MAJOR HACK!
+ LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(mAppWindowHandle, GWL_USERDATA);
+ if (NULL != window_imp)
+ {
+ LLCoordGL gl_coord( 0, 0 );
+
+ POINT pt2;
+ pt2.x = pt.x;
+ pt2.y = pt.y;
+ ScreenToClient( mAppWindowHandle, &pt2 );
+
+ LLCoordWindow cursor_coord_window( pt2.x, pt2.y );
+ window_imp->convertCoords(cursor_coord_window, &gl_coord);
+ MASK mask = gKeyboard->currentMask(TRUE);
+ allowed_to_drop = window_imp->completeDragNDropRequest( gl_coord, mask, FALSE, std::string( "" ) );
+ }
+
+ if ( allowed_to_drop )
+ *pdwEffect = DROPEFFECT_COPY;
+ else
+ *pdwEffect = DROPEFFECT_NONE;
}
else
{
|