aboutsummaryrefslogtreecommitdiff
path: root/dw/selection.cc
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2011-07-17 21:14:30 +0000
committercorvid <corvid@lavabit.com>2011-07-17 21:14:30 +0000
commit2a2c5a48f21e32d4b5232931a4c4a380f547b1ff (patch)
tree0d0f81ebe9347558a711e978ff7d991a9ec4d989 /dw/selection.cc
parent34db57b66f5338f5287bab7ea440d51d5c43cc59 (diff)
selection press button 3, don't bother going through most of the link stuff
It just had the effect of getting it confused sometimes -- pop up the link menu, and then click elsewhere, and it would select the text between A and B.
Diffstat (limited to 'dw/selection.cc')
-rw-r--r--dw/selection.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/dw/selection.cc b/dw/selection.cc
index 9702eee0..311c551b 100644
--- a/dw/selection.cc
+++ b/dw/selection.cc
@@ -94,7 +94,11 @@ bool SelectionState::buttonPress (Iterator *it, int charPos, int linkNo,
if (!event) return ret;
- if (linkNo != -1) {
+ if (event->button == 3) {
+ // menu popup
+ layout->emitLinkPress (itWidget, linkNo, -1, -1, -1, event);
+ ret = true;
+ } else if (linkNo != -1) {
// link handling
(void) layout->emitLinkPress (itWidget, linkNo, -1, -1, -1, event);
resetLink ();
@@ -134,10 +138,6 @@ bool SelectionState::buttonPress (Iterator *it, int charPos, int linkNo,
toChar = correctCharPos (to, charPos);
}
ret = true;
- } else if (event->button == 3) {
- // menu popup
- layout->emitLinkPress (itWidget, -1, -1, -1, -1, event);
- ret = true;
}
return ret;