From 0481b8e7901539a19f0b243a86cc1d769a487009 Mon Sep 17 00:00:00 2001 From: Mooffie Date: Wed, 25 Jan 2017 18:24:46 +0200 Subject: [PATCH] WEdit shouldn't handle mouse events of overlapping buttonbar. Signed-off-by: Mooffie --- src/editor/editwidget.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/editor/editwidget.c b/src/editor/editwidget.c index 732db41e8..0d1b6b316 100644 --- a/src/editor/editwidget.c +++ b/src/editor/editwidget.c @@ -1071,6 +1071,16 @@ edit_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) return; } + /* If it's the last line on the screen, we abort the event to make the + * system channel it to the overlapping buttonbar instead. We have to do + * this because a WEdit has the WOP_TOP_SELECT flag, which makes it above + * the buttonbar in Z-order. */ + if (msg == MSG_MOUSE_DOWN && (event->y + w->y == LINES - 1)) + { + event->result.abort = TRUE; + return; + } + switch (msg) { case MSG_MOUSE_DOWN: