diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-03-10 22:31:51 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-04-13 13:46:17 +0200 |
| commit | fe235628ae2e24499213030ba8b6533ad1ec1bc3 (patch) | |
| tree | e2ed68774987a829b2193d8a7ca3ec191bd922f7 /main/src | |
| parent | baa4a6a1eb4e98558acfef6e2a24c2c13d42db5c (diff) | |
| download | dino-fe235628ae2e24499213030ba8b6533ad1ec1bc3.tar.gz | |
conversation_view.vala: update_highlight on touch event
Mobile devices such as the PinePhone do not receive leave/enter
events, so actions such as editing a previous message are not possible
unless a keyboard shortcut is used, which not be as convenient or even
possible under some DEs.
This commit should not affect desktop platforms with mouse or
touchpad.
Diffstat (limited to 'main/src')
| -rw-r--r-- | main/src/ui/conversation_content_view/conversation_view.vala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/src/ui/conversation_content_view/conversation_view.vala b/main/src/ui/conversation_content_view/conversation_view.vala index d6cbed62..00140f53 100644 --- a/main/src/ui/conversation_content_view/conversation_view.vala +++ b/main/src/ui/conversation_content_view/conversation_view.vala @@ -73,6 +73,8 @@ public class ConversationView : Box, Plugins.ConversationItemCollection, Plugins // the pointer motion events as long as the pointer is above the message menu. // This ensures that the currently highlighted item remains unchanged when the pointer // reaches the overlapping part of a button. + main_wrap_event_box.events = EventMask.TOUCH_MASK; + main_wrap_event_box.touch_event.connect(on_touch_event); main_event_box.events = EventMask.POINTER_MOTION_MASK; main_event_box.motion_notify_event.connect(on_motion_notify_event); @@ -102,6 +104,11 @@ public class ConversationView : Box, Plugins.ConversationItemCollection, Plugins } } + private bool on_touch_event(Gdk.Event event) { + update_highlight((int)event.touch.x_root, (int)event.touch.y_root); + return false; + } + private bool on_enter_notify_event(Gdk.EventCrossing event) { update_highlight((int)event.x_root, (int)event.y_root); return false; |
