diff options
author | Rick Pasetto <rick@lindenlab.com> | 2009-11-19 09:29:08 -0800 |
---|---|---|
committer | Rick Pasetto <rick@lindenlab.com> | 2009-11-19 09:29:08 -0800 |
commit | 0627d550f371c26b00e802bae288a5e6def53345 (patch) | |
tree | 8f4e740736d4fbca2eb543bb0148232e968286ef /indra/llwindow | |
parent | 9e53ad6111ce0e15cb10f2ffb47fee8b48d1c3db (diff) | |
parent | 51e640e5d753ac9dc005cd6827db77988a04b8fa (diff) |
Automated merge with ssh://rick@hg.lindenlab.com/rick/viewer-2-0-rickcallum/
Diffstat (limited to 'indra/llwindow')
-rw-r--r-- | indra/llwindow/lldragdropwin32.cpp | 18 | ||||
-rw-r--r-- | indra/llwindow/llwindowcallbacks.cpp | 2 | ||||
-rw-r--r-- | indra/llwindow/llwindowcallbacks.h | 2 | ||||
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 13 | ||||
-rw-r--r-- | indra/llwindow/llwindowwin32.h | 2 |
5 files changed, 24 insertions, 13 deletions
diff --git a/indra/llwindow/lldragdropwin32.cpp b/indra/llwindow/lldragdropwin32.cpp index 471c88675d..a10cfbf12f 100644 --- a/indra/llwindow/lldragdropwin32.cpp +++ b/indra/llwindow/lldragdropwin32.cpp @@ -125,6 +125,22 @@ 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 );
+
+ 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;
}
else
@@ -183,7 +199,7 @@ class LLDragDropWin32Target: MASK mask = gKeyboard->currentMask( TRUE );
// actually do the drop
- window_imp->completeDropRequest( gl_coord, mask, std::string( (char*)data ) );
+ window_imp->completeDragNDropRequest( gl_coord, mask, TRUE, std::string( (char*)data ) );
};
GlobalUnlock( stgmed.hGlobal );
diff --git a/indra/llwindow/llwindowcallbacks.cpp b/indra/llwindow/llwindowcallbacks.cpp index 1098529e1c..b8927a1ac4 100644 --- a/indra/llwindow/llwindowcallbacks.cpp +++ b/indra/llwindow/llwindowcallbacks.cpp @@ -163,7 +163,7 @@ void LLWindowCallbacks::handleDataCopy(LLWindow *window, S32 data_type, void *da { } -BOOL LLWindowCallbacks::handleDrop(LLWindow *window, LLCoordGL pos, MASK mask, std::string data ) +BOOL LLWindowCallbacks::handleDragNDrop(LLWindow *window, LLCoordGL pos, MASK mask, BOOL drop, std::string data ) { return FALSE; } diff --git a/indra/llwindow/llwindowcallbacks.h b/indra/llwindow/llwindowcallbacks.h index 3a09100168..8e7605a650 100644 --- a/indra/llwindow/llwindowcallbacks.h +++ b/indra/llwindow/llwindowcallbacks.h @@ -68,7 +68,7 @@ public: virtual void handleWindowBlock(LLWindow *window); // window is taking over CPU for a while virtual void handleWindowUnblock(LLWindow *window); // window coming back after taking over CPU for a while virtual void handleDataCopy(LLWindow *window, S32 data_type, void *data); - virtual BOOL handleDrop(LLWindow *window, LLCoordGL pos, MASK mask, std::string data); + virtual BOOL handleDragNDrop(LLWindow *window, LLCoordGL pos, MASK mask, BOOL drop, std::string data); virtual BOOL handleTimerEvent(LLWindow *window); virtual BOOL handleDeviceChange(LLWindow *window); diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index da096b9a0a..eda8cf15b0 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -2401,7 +2401,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ MASK mask = gKeyboard->currentMask(TRUE);
- if ( window_imp->completeDropRequest( gl_coord, mask, (char*)url ) )
+ if ( window_imp->completeDragNDropRequest( gl_coord, mask, true, (char*)url ) )
{
return 0;
};
@@ -3578,15 +3578,10 @@ static LLWString find_context(const LLWString & wtext, S32 focus, S32 focus_leng // final stage of handling drop requests - both from WM_DROPFILES message
// for files and via IDropTarget interface requests.
-BOOL LLWindowWin32::completeDropRequest( const LLCoordGL gl_coord, const MASK mask, const std::string url )
+BOOL LLWindowWin32::completeDragNDropRequest( const LLCoordGL gl_coord, const MASK mask, BOOL drop, const std::string url )
{
- if ( mCallbacks->handleDrop( this, gl_coord, mask, url ) )
- {
- return TRUE;
- };
-
- return FALSE;
-};
+ return mCallbacks->handleDragNDrop( this, gl_coord, mask, drop, url );
+}
// Handle WM_IME_REQUEST message.
// If it handled the message, returns TRUE. Otherwise, FALSE.
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index 1382cf93a2..e99c26b7f1 100644 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -113,7 +113,7 @@ public: /*virtual*/ void interruptLanguageTextInput(); /*virtual*/ void spawnWebBrowser(const std::string& escaped_url); - BOOL completeDropRequest( const LLCoordGL gl_coord, const MASK mask, const std::string url ); + BOOL completeDragNDropRequest( const LLCoordGL gl_coord, const MASK mask, BOOL drop, const std::string url ); static std::vector<std::string> getDynamicFallbackFontList(); |