summaryrefslogtreecommitdiff
path: root/indra/llwindow/lldragdropwin32.cpp
diff options
context:
space:
mode:
authorcallum <none@none>2009-11-24 18:31:30 -0800
committercallum <none@none>2009-11-24 18:31:30 -0800
commit8d84b7ae4062d8680aae2bb8325813bdac0335ed (patch)
treeb4bbdb7ae0e52c3fb93102abed93fb7cc4a50078 /indra/llwindow/lldragdropwin32.cpp
parent0b9aa795702ae9304b2e9d4c58698f95ac636399 (diff)
Add support for changing OS cursor when mouse passes
over a prim you can drop on versus one you can't.
Diffstat (limited to 'indra/llwindow/lldragdropwin32.cpp')
-rw-r--r--indra/llwindow/lldragdropwin32.cpp38
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
{