From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sonic307-54.consmr.mail.ir2.yahoo.com (sonic307-54.consmr.mail.ir2.yahoo.com [87.248.110.31]) by sourceware.org (Postfix) with ESMTPS id DD0DA3861036 for ; Sat, 5 Jun 2021 14:40:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DD0DA3861036 X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1622904019; bh=hzmwc2SBwZl/YLgJ8qPXYxXsX12kb2VZyjw+XcA0CaU=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=HVpns8SNrnO+TxISTNqqoOsP6mWT8I5t/ZD4dmxHqeFlXwMqPl7Tz70/+B17Ss7ulhgeQurI14JrOnMeLvUISugxEFk3c2HyQ3yn9kGa9jUl6hRE8T5EEE7wHwe91MU2L1mohE+lAx/qf6s/IKQUrDU16eMIJYD845qYvAamBEBZ5mPUYJ6T3Tb7F5nm4OKuv4OY7oVBqgJSxW8cGeg073vwTxQO/eOJMvqyS4t+vvkEhXXADYajNVAZjfEvWHFdejruoevuL+WVH+ynXMqCilvZtwd+hUu2vb1uhDHXTMSv3D8z2ynzW/N43nEdZAIi8jotvOhU8pb1uiOd+7DtBQ== X-YMail-OSG: EmECWKYVM1mlk.WuM8a5MKG3r7uudAjyBO10XNmWPYDl7.xZ50ufL8eiCAiz7nb snLsyxbq3ekgb0Ovc29_Sr0xNNpx9qWIqiqVVHEAV9f9J533h3B_kwrzAwnQsTe4KhqYE53s.L8. hIQq3htLFwVUSJR2t.75L89HA.Zr3QXFfJJpQVu1LPILDKlGsZL86XfO2LO.or5MXs09JVka2A7O prj3HE5sDjgeP7fyNHO_TCIkgdiRgPtMH5KLxf6oaJgA7ENIc8djhwf9Dk87mkX7KMjRG9Xh1irU ibJ06c.8gvCwVFxdyV0FCFTjDx3B7clsfI5jXwmEPaKEVJUXCfNGWZ8P1Nd16RvSH2ywx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FzWAMGg_n8n959qJt8bO0Ea9DLxS1MAI6r_KV_Aiv6Hey0rJBdG1BVxzpaMx683FdeuBbuYFKK5c 9BefLWGZjGWwxoYygtIuCSM.nTbsJ.k7VuKGeyboZI57KAy0- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ir2.yahoo.com with HTTP; Sat, 5 Jun 2021 14:40:19 +0000 Date: Sat, 5 Jun 2021 14:40:17 +0000 (UTC) From: Hannes Domani To: Tom Tromey , Pedro Alves Cc: Hannes Domani via Gdb-patches , Joel Brobecker Message-ID: <1231900744.5510610.1622904017896@mail.yahoo.com> In-Reply-To: <8cfc78b7-ecdc-b435-5c1f-f027c8704f9e@palves.net> References: <20210603151453.15248-1-ssbssa.ref@yahoo.de> <20210603151453.15248-1-ssbssa@yahoo.de> <87r1hhoi03.fsf@tromey.com> <1760297979.5212997.1622816480782@mail.yahoo.com> <0936428e-80c4-c192-cdfd-817ff9bcfab0@palves.net> <877dj9o4ch.fsf@tromey.com> <3facd73a-bfea-d46c-85a7-101ea893998f@palves.net> <8cfc78b7-ecdc-b435-5c1f-f027c8704f9e@palves.net> Subject: Re: [PATCHv3 1/2] Initial TUI mouse support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.18368 YMailNorrin X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jun 2021 14:40:31 -0000 Am Samstag, 5. Juni 2021, 01:48:38 MESZ hat Pedro Alves = Folgendes geschrieben: > On 2021-06-04 9:54 p.m., Pedro Alves wrote: > > On 2021-06-04 7:46 p.m., Tom Tromey wrote: > >> Pedro> The trouble is that now pressing anywhere on the screen with th= e > >> Pedro> mouse just results in weird characters being printed on the > >> Pedro> command line window (probably uninterpreted control sequences). > >> > >> I tried it here, and it worked fine for me. > >> > >> I couldn't select text, but I didn't see any control characters. > >> > >> Pedro> This was on Ubuntu 20.04. > >> > >> I'm on Fedora 32. > > > > I'm currently on Fedora 32 too, and while it works here too, I just fou= nd a way to reproduce a similar > > problem that I'm seeing on the Ubuntu machine (which I currently don't = have access to).=C2=A0 (Though > > on Ubuntu it was worse.) > > > > Try this: > > > > $ ./gdb ./gdb > > ... > > (gdb) start > > c-x a > > scroll up and down with mouse to check that it works ok. > > c-x o # select command window > > scroll up and down with mouse, and see escape codes being printed on th= e command window > > > > If I "c-x o" again to select the source window, then scrolling works co= rrectly again. > > > > If I "c-x o" again to select the command window, then scrolling and cli= cking with the mouse > > prints more bad characters.=C2=A0 Like these: > > > > (top-gdb) 64;40;21M64;40;21M65;40;21M65;40;21M64;40;21M64;40;21M64;40;2= 1M65;40;21M0;67;32M0;67;32m0;64;18M0;64;18m0;64;18M0;64;18m2;64;18M2;64;18m= 0;64;18M0;64;18M0;64;18M0 > > ;64;18m1;64;18M1;64;18m64;64;18M64;64;18M1;64;19M1;64;19m1;64;19M1;64;1= 9m2;64;19M2;64;19m0;64;19M0;64;19m0;51;13M0;51;13m0;1;27M0;1;27M0;1;27M0;1;= 27M0;1;27M0;1;27M0;1;27M0 > > ;1;27M0;1;27M0;1;27m > > I have access to the Ubuntu machine again now.=C2=A0 The symptom I see no= w the same as on Fedora -- I can scroll > the source window, when when I focus on the command window, I start seein= g all the badness.=C2=A0 I don't think > I focused on the command window earlier when I first reported it, maybe t= here's some other way to trigger > it, but can't say for sure.=C2=A0 So it is looking like this isn't OS spe= cific afterall. > > Sorry for the spotty reporting.=C2=A0 Hopefully the reproducer helps iden= tifying the issue. On Windows I can mostly reproduce this, when the command window has focus, mouse scrolling just doesn't work. I don't see any escape sequences, because the Windows console works differe= nt. I probably wouldn't have noticed this for a long time, because I never set the focus to the command window (I always wondered why this is possible at = all). Anyways, I think this happens because when the command window gets focus, we disable the curses keypad. As the docu says: =C2=A0 The keypad option enables the keypad of the user's terminal. If enab= led =C2=A0 (bf is TRUE), the user can press a function key (such as an arrow ke= y) and =C2=A0 wgetch returns a single value representing the function key, as in K= EY_LEFT. =C2=A0 If disabled (bf is FALSE), curses does not treat function keys speci= ally =C2=A0 and the program has to interpret the escape sequences itself. I imagine the same is true for mouse escape sequences. So I would just disable the mouse when the command window has focus, but what do you think? Hannes