From f5e52a71befdc7568e6e85b89a8d43e222bc7ada Mon Sep 17 00:00:00 2001
From: Mooffie <mooffie@gmail.com>
Date: Thu, 16 Feb 2017 00:23:33 +0200
Subject: [PATCH] Ticket #3760: WEdit shouldn't draw frame over buttonbar.
When dragging a framed WEdit with the mouse, the frame is painted over the
buttonbar. This happens in two cases: when pressing the mouse down, and when
releasing it.
The patch fixes the problem by calling edit_update_screen() in these two cases.
This paints the buttonbar over the frame.
(The problem doesn't occur when moving the frame with the keyboard because
edit_callback(msg==MSG_KEY) calls edit_update_screen() right after handling the
key.)
Signed-off-by: Mooffie <mooffie@gmail.com>
---
src/editor/editwidget.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/editor/editwidget.c b/src/editor/editwidget.c
index 0d1b6b3..7f85545 100644
a
|
b
|
edit_mouse_handle_move_resize (Widget * w, mouse_msg_t msg, mouse_event_t * even |
1005 | 1005 | { |
1006 | 1006 | /* Exit move/resize mode. */ |
1007 | 1007 | edit_execute_cmd (edit, CK_Enter, -1); |
| 1008 | edit_update_screen (edit); /* Paint the buttonbar over our possibly overlapping frame. */ |
1008 | 1009 | return; |
1009 | 1010 | } |
1010 | 1011 | |
… |
… |
edit_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) |
1100 | 1101 | { |
1101 | 1102 | /* start window move */ |
1102 | 1103 | edit_execute_cmd (edit, CK_WindowMove, -1); |
| 1104 | edit_update_screen (edit); /* Paint the buttonbar over our possibly overlapping frame. */ |
1103 | 1105 | edit->drag_state_start = event->x; |
1104 | 1106 | } |
1105 | 1107 | break; |