Re: [PATCHv3 1/2] Initial TUI mouse support

Hannes Domani via Gdb-patches
2021-06-04T16:07:18Z

Am Freitag, 4. Juni 2021, 17:20:44 MESZ hat Pedro Alves <pedro@palves.net> Folgendes geschrieben:

> On 2021-06-04 3:21 p.m., Hannes Domani via Gdb-patches wrote:
>
> >  Am Freitag, 4. Juni 2021, 15:51:27 MESZ hat Tom Tromey <tom@tromey.com> Folgendes geschrieben:
> >
> >>>>>>> "Hannes" == Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> writes:
> >>
> >> Hannes> Implements an overridable tui_win_info::click method whose arguments
> >> Hannes> are the mouse coordinates inside the specific window, and the mouse
> >> Hannes> button clicked.
> >>
> >> Hannes> And if the curses implementation supports 5 buttons, the 4th and 5th
> >> Hannes> buttons are used for scrolling.
> >>
> >> Hannes> 2021-06-03  Hannes Domani  <ssbssa@yahoo.de>
> >>
> >> Hannes>     * ser-mingw.c (console_select_thread): Handle MOUSE_EVENT.
> >> Hannes>     * tui/tui-data.h (struct tui_win_info): Add click function.
> >> Hannes>     * tui/tui-io.c (tui_prep_terminal): Enable mouse events.
> >> Hannes>     (tui_deprep_terminal): Disable mouse events.
> >> Hannes>     (tui_dispatch_ctrl_char): Handle KEY_MOUSE.
> >> Hannes>     * tui/tui.c (tui_disable): Disable mouse events.
> >>
> >> Looks good.  Thank you again.
> >
> > Pushed both, thanks.
>
> >
>
> Yay, mouse support finally.  Thank you!
>
> Don't we need a NEWS entry, though?

I never think of NEWS.

See at the end what I came up with, maybe the phrasing could need some
improvement.

Hannes

From 95c7890b45cbfb80682451962f5e57f3eef95a03 Mon Sep 17 00:00:00 2001
From: Hannes Domani <ssbssa@yahoo.de>
Date: Fri, 4 Jun 2021 17:58:15 +0200
Subject: [PATCH] Mention mouse support in NEWS

gdb/ChangeLog:

2021-06-04  Hannes Domani  <ssbssa@yahoo.de>

* NEWS: Mention mouse support.
---
gdb/NEWS | 3 +++
1 file changed, 3 insertions(+)

diff --git a/gdb/NEWS b/gdb/NEWS
index ab678acec8b..8c876e71e63 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -75,6 +75,9 @@
and "-eiex" that allow options (that would normally appear in a
gdbearlyinit file) to be passed on the command line.

+* TUI windows now support mouse actions.  The mouse wheel scrolls the
+  appropriate window, and Python TUI windows can receive mouse click events.
+
* New commands

set debug event-loop
--
2.15.1.windows.2