diff options
author | Palmer <palmer@lindenlab.com> | 2009-08-06 14:51:11 -0700 |
---|---|---|
committer | Palmer <palmer@lindenlab.com> | 2009-08-06 14:51:11 -0700 |
commit | b2632c50efc12eacdcadace64e6c0f1906b86ff6 (patch) | |
tree | c32d7e9b29e37d5c30ac16dfac55733456d7eee0 /indra/llui/lldraghandle.cpp | |
parent | 27cf39cdbf27fe52dcf9c70cfdadcc18ddf2e75c (diff) | |
parent | a8d216e194327c7bee8a42c983f7f2ca01adb385 (diff) |
Merge of my DEV-36732 work and all the main line login api work that went on.
Diffstat (limited to 'indra/llui/lldraghandle.cpp')
-rw-r--r-- | indra/llui/lldraghandle.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp index 8ecbdb98e1..6e8e37ded3 100644 --- a/indra/llui/lldraghandle.cpp +++ b/indra/llui/lldraghandle.cpp @@ -317,6 +317,23 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask) S32 delta_x = screen_x - mDragLastScreenX; S32 delta_y = screen_y - mDragLastScreenY; + // if dragging a docked floater we want to undock + if (((LLFloater*)getParent())->isDocked()) + { + const S32 SLOP = 12; + + if (delta_y <= -SLOP || + delta_y >= SLOP) + { + ((LLFloater*)getParent())->setDocked(false, false); + return TRUE; + } + else + { + return FALSE; + } + } + LLRect original_rect = getParent()->getRect(); LLRect translated_rect = getParent()->getRect(); translated_rect.translate(delta_x, delta_y); |