diff options
author | callum <none@none> | 2009-11-03 09:33:21 -0800 |
---|---|---|
committer | callum <none@none> | 2009-11-03 09:33:21 -0800 |
commit | 996740607a11ac7f8633f12b65ead0508e1435fa (patch) | |
tree | 8acf8ab3ce5b3839346d5b5ee79851a18ea8a641 /indra/llwindow/lldragdropwin32.cpp | |
parent | 66ce1b04297cd48520e666a3fa903af143f89c57 (diff) |
Convert screen coordinates from IDropAction to window coordinates.
Diffstat (limited to 'indra/llwindow/lldragdropwin32.cpp')
-rw-r--r-- | indra/llwindow/lldragdropwin32.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/llwindow/lldragdropwin32.cpp b/indra/llwindow/lldragdropwin32.cpp index 0daff85395..d05dbf19a5 100644 --- a/indra/llwindow/lldragdropwin32.cpp +++ b/indra/llwindow/lldragdropwin32.cpp @@ -209,11 +209,18 @@ class LLDragDropWin32Target: LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(mWindowHandle, GWL_USERDATA);
if (NULL != window_imp)
{
- LLCoordGL gl_coord( pt.x, pt.y);
- LLCoordWindow cursor_coord_window( pt.x, pt.y );
+ 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);
llinfos << "### (Drop) URL is: " << lpszText << llendl;
llinfos << "### raw coords are: " << pt.x << " x " << pt.y << llendl;
+ llinfos << "### window coords are: " << pt2.x << " x " << pt2.y << llendl;
llinfos << "### GL coords are: " << gl_coord.mX << " x " << gl_coord.mY << llendl;
llinfos << llendl;
|