diff options
author | Armin Weatherwax | 2009-06-08 11:10:27 +0200 |
---|---|---|
committer | McCabe Maxsted | 2009-09-04 11:34:24 -0700 |
commit | 3f0082a9dda60432b8b759e09f19b495d9d5275c (patch) | |
tree | 989f5e10f9b9891ec7718b5ee2406582b6c0e352 /linden/indra/llui/llview.cpp | |
parent | Rebranded startup loading page to Imprudence (diff) | |
download | meta-impy-3f0082a9dda60432b8b759e09f19b495d9d5275c.zip meta-impy-3f0082a9dda60432b8b759e09f19b495d9d5275c.tar.gz meta-impy-3f0082a9dda60432b8b759e09f19b495d9d5275c.tar.bz2 meta-impy-3f0082a9dda60432b8b759e09f19b495d9d5275c.tar.xz |
Linux middle mouse button paste/primary selection support and gtk clipboard handler (fixes crashbug using synergy mouse-keyboard-clipboard-sharing over lan)
modified: linden/doc/contributions.txt
modified: linden/indra/llui/llclipboard.cpp
modified: linden/indra/llui/llclipboard.h
modified: linden/indra/llui/llfloater.cpp
modified: linden/indra/llui/llfloater.h
modified: linden/indra/llui/lllineeditor.cpp
modified: linden/indra/llui/lllineeditor.h
modified: linden/indra/llui/lltexteditor.cpp
modified: linden/indra/llui/lltexteditor.h
modified: linden/indra/llui/llview.cpp
modified: linden/indra/llui/llview.h
modified: linden/indra/llwindow/CMakeLists.txt
new file: linden/indra/llwindow/llmousehandler.cpp
modified: linden/indra/llwindow/llmousehandler.h
modified: linden/indra/llwindow/llwindow.cpp
modified: linden/indra/llwindow/llwindow.h
modified: linden/indra/llwindow/llwindowsdl.cpp
modified: linden/indra/llwindow/llwindowsdl.h
modified: linden/indra/newview/lltool.cpp
modified: linden/indra/newview/lltool.h
modified: linden/indra/newview/llviewertexteditor.cpp
modified: linden/indra/newview/llviewertexteditor.h
modified: linden/indra/newview/llviewerwindow.cpp
modified: linden/indra/newview/llviewerwindow.h
(cherry picked from commit 594f4830922f4294dda432fa748935adffaeed8f)
Diffstat (limited to 'linden/indra/llui/llview.cpp')
-rw-r--r-- | linden/indra/llui/llview.cpp | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/linden/indra/llui/llview.cpp b/linden/indra/llui/llview.cpp index 9cdf481..78bf168 100644 --- a/linden/indra/llui/llview.cpp +++ b/linden/indra/llui/llview.cpp | |||
@@ -981,6 +981,30 @@ BOOL LLView::handleRightMouseUp(S32 x, S32 y, MASK mask) | |||
981 | } | 981 | } |
982 | return handled; | 982 | return handled; |
983 | } | 983 | } |
984 | |||
985 | BOOL LLView::handleMiddleMouseDown(S32 x, S32 y, MASK mask) | ||
986 | { | ||
987 | LLView* handled_view = childrenHandleMiddleMouseDown( x, y, mask ); | ||
988 | BOOL handled = (handled_view != NULL); | ||
989 | if( !handled && blockMouseEvent(x, y) ) | ||
990 | { | ||
991 | handled = TRUE; | ||
992 | handled_view = this; | ||
993 | } | ||
994 | |||
995 | return handled; | ||
996 | } | ||
997 | |||
998 | BOOL LLView::handleMiddleMouseUp(S32 x, S32 y, MASK mask) | ||
999 | { | ||
1000 | BOOL handled = childrenHandleMiddleMouseUp( x, y, mask ) != NULL; | ||
1001 | if( !handled && blockMouseEvent(x, y) ) | ||
1002 | { | ||
1003 | handled = TRUE; | ||
1004 | } | ||
1005 | return handled; | ||
1006 | } | ||
1007 | |||
984 | 1008 | ||
985 | LLView* LLView::childrenHandleScrollWheel(S32 x, S32 y, S32 clicks) | 1009 | LLView* LLView::childrenHandleScrollWheel(S32 x, S32 y, S32 clicks) |
986 | { | 1010 | { |
@@ -1142,6 +1166,34 @@ LLView* LLView::childrenHandleRightMouseDown(S32 x, S32 y, MASK mask) | |||
1142 | return handled_view; | 1166 | return handled_view; |
1143 | } | 1167 | } |
1144 | 1168 | ||
1169 | LLView* LLView::childrenHandleMiddleMouseDown(S32 x, S32 y, MASK mask) | ||
1170 | { | ||
1171 | LLView* handled_view = NULL; | ||
1172 | |||
1173 | if (getVisible() && getEnabled() ) | ||
1174 | { | ||
1175 | for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) | ||
1176 | { | ||
1177 | LLView* viewp = *child_it; | ||
1178 | S32 local_x = x - viewp->getRect().mLeft; | ||
1179 | S32 local_y = y - viewp->getRect().mBottom; | ||
1180 | if (viewp->pointInView(local_x, local_y) && | ||
1181 | viewp->getVisible() && | ||
1182 | viewp->getEnabled() && | ||
1183 | viewp->handleMiddleMouseDown( local_x, local_y, mask )) | ||
1184 | { | ||
1185 | if (sDebugMouseHandling) | ||
1186 | { | ||
1187 | sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage; | ||
1188 | } | ||
1189 | handled_view = viewp; | ||
1190 | break; | ||
1191 | } | ||
1192 | } | ||
1193 | } | ||
1194 | return handled_view; | ||
1195 | } | ||
1196 | |||
1145 | LLView* LLView::childrenHandleDoubleClick(S32 x, S32 y, MASK mask) | 1197 | LLView* LLView::childrenHandleDoubleClick(S32 x, S32 y, MASK mask) |
1146 | { | 1198 | { |
1147 | LLView* handled_view = NULL; | 1199 | LLView* handled_view = NULL; |
@@ -1227,6 +1279,32 @@ LLView* LLView::childrenHandleRightMouseUp(S32 x, S32 y, MASK mask) | |||
1227 | return handled_view; | 1279 | return handled_view; |
1228 | } | 1280 | } |
1229 | 1281 | ||
1282 | LLView* LLView::childrenHandleMiddleMouseUp(S32 x, S32 y, MASK mask) | ||
1283 | { | ||
1284 | LLView* handled_view = NULL; | ||
1285 | if( getVisible() && getEnabled() ) | ||
1286 | { | ||
1287 | for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) | ||
1288 | { | ||
1289 | LLView* viewp = *child_it; | ||
1290 | S32 local_x = x - viewp->getRect().mLeft; | ||
1291 | S32 local_y = y - viewp->getRect().mBottom; | ||
1292 | if (viewp->pointInView(local_x, local_y) && | ||
1293 | viewp->getVisible() && | ||
1294 | viewp->getEnabled() && | ||
1295 | viewp->handleMiddleMouseUp( local_x, local_y, mask )) | ||
1296 | { | ||
1297 | if (sDebugMouseHandling) | ||
1298 | { | ||
1299 | sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage; | ||
1300 | } | ||
1301 | handled_view = viewp; | ||
1302 | break; | ||
1303 | } | ||
1304 | } | ||
1305 | } | ||
1306 | return handled_view; | ||
1307 | } | ||
1230 | 1308 | ||
1231 | void LLView::draw() | 1309 | void LLView::draw() |
1232 | { | 1310 | { |