Merge branch '3760_wedit_over_buttonbar'
* 3760_wedit_over_buttonbar: WEdit shouldn't draw frame over buttonbar. WEdit shouldn't handle mouse events of overlapping buttonbar. Ticket #3760: Fix aborts of MSG_MOUSE_DOWN.
Этот коммит содержится в:
Коммит
9ccd22310a
@ -181,6 +181,11 @@ mouse_process_event (Widget * w, mouse_event_t * event)
|
||||
{
|
||||
w->mouse_callback (w, event->msg, event);
|
||||
|
||||
/* If a widget aborts a MSG_MOUSE_DOWN, we uncapture it so it
|
||||
* doesn't steal events from other widgets. */
|
||||
if (event->msg == MSG_MOUSE_DOWN && event->result.abort)
|
||||
w->mouse.capture = FALSE;
|
||||
|
||||
/* Upon releasing the mouse button: if the mouse hasn't been dragged
|
||||
* since the MSG_MOUSE_DOWN, we also trigger a click. */
|
||||
if (event->msg == MSG_MOUSE_UP && w->mouse.last_msg == MSG_MOUSE_DOWN)
|
||||
|
@ -1005,6 +1005,7 @@ edit_mouse_handle_move_resize (Widget * w, mouse_msg_t msg, mouse_event_t * even
|
||||
{
|
||||
/* Exit move/resize mode. */
|
||||
edit_execute_cmd (edit, CK_Enter, -1);
|
||||
edit_update_screen (edit); /* Paint the buttonbar over our possibly overlapping frame. */
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1071,6 +1072,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:
|
||||
@ -1090,6 +1101,7 @@ edit_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event)
|
||||
{
|
||||
/* start window move */
|
||||
edit_execute_cmd (edit, CK_WindowMove, -1);
|
||||
edit_update_screen (edit); /* Paint the buttonbar over our possibly overlapping frame. */
|
||||
edit->drag_state_start = event->x;
|
||||
}
|
||||
break;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user