aboutsummaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorselurvedu <selurvedu@users.noreply.github.com>2020-04-22 01:26:10 +0000
committerfiaxh <fiaxh@users.noreply.github.com>2020-04-22 20:13:24 +0200
commitb73ec9e0ca69277241bb8a39fdf7214a4823ebe4 (patch)
tree8c9b53ff1bda5895bf4c63bf25e04e6518f1967a /main/src
parent2631a9bdbaf9a40f329f05c55c6e2ea38efeb10c (diff)
downloaddino-b73ec9e0ca69277241bb8a39fdf7214a4823ebe4.tar.gz
dino-b73ec9e0ca69277241bb8a39fdf7214a4823ebe4.zip
Fix late highlighting of conversation items
If the pointer was moved from outside to a conversation item with a straight horizontal move, the conversation item was not getting highlighted.
Diffstat (limited to 'main/src')
-rw-r--r--main/src/ui/conversation_content_view/conversation_view.vala7
1 files changed, 5 insertions, 2 deletions
diff --git a/main/src/ui/conversation_content_view/conversation_view.vala b/main/src/ui/conversation_content_view/conversation_view.vala
index aadb5fdc..43c138cf 100644
--- a/main/src/ui/conversation_content_view/conversation_view.vala
+++ b/main/src/ui/conversation_content_view/conversation_view.vala
@@ -102,7 +102,10 @@ public class ConversationView : Box, Plugins.ConversationItemCollection, Plugins
private bool on_leave_notify_event(Gdk.EventCrossing event) {
mouse_inside = false;
- if (currently_highlighted != null) currently_highlighted.unset_state_flags(StateFlags.PRELIGHT);
+ if (currently_highlighted != null) {
+ currently_highlighted.unset_state_flags(StateFlags.PRELIGHT);
+ currently_highlighted = null;
+ }
message_menu_box.visible = false;
return false;
}
@@ -114,7 +117,7 @@ public class ConversationView : Box, Plugins.ConversationItemCollection, Plugins
}
private void update_highlight(int x_root, int y_root) {
- if ((last_y_root - y_root).abs() <= 2) {
+ if (currently_highlighted != null && (last_y_root - y_root).abs() <= 2) {
return;
}