From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17294 invoked by alias); 8 Jan 2015 12:32:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 17283 invoked by uid 89); 8 Jan 2015 12:32:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-pa0-f42.google.com Received: from mail-pa0-f42.google.com (HELO mail-pa0-f42.google.com) (209.85.220.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 08 Jan 2015 12:32:38 +0000 Received: by mail-pa0-f42.google.com with SMTP id et14so11578368pad.1 for ; Thu, 08 Jan 2015 04:32:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=n2L6nD0jR6yyxwM4JQE8ZvDFmCqPLHBsJLCFfAY9XXo=; b=XneygF8aE0dsMIyq29qX73/ErxW1/3uWEfblnzwLxkN1FFbN49Y6CMoKn7/pvTl7kC 4o4UUzOghtCvLbW4JjXPXJKvxl6Q2zA54RiObrGaw/KSXgDdbM2th8Fa9a+8Qo2fhJrv FrJ4UygFUmvEFt1QR2k/DhAF5B+gVBAtoc+LWaiUdDCIur8kHRTVM5MSqdhSVdN2N00Z az/qJxFxOKst/MDvjzQEgnDedLZ8vHs6iLdiRLO0ylbm76KeKjQfk5ISmMQ2cLK3Q2Mk 1h8kbOcc4jfv0FEEhc/rdTyimW+ciWxmUyDJau18hOZpuUzfbIxLk0bnxiIZgInZORdd jYBQ== X-Gm-Message-State: ALoCoQl7qpBDM2gXaVdOEH85oVcZxY6Ynj1Spxo2h+hMEkWQs3Jj0J7Ke/gjkkYsthYTPwUKk6aF X-Received: by 10.66.254.232 with SMTP id al8mr14592289pad.76.1420720356354; Thu, 08 Jan 2015 04:32:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.70.22.145 with HTTP; Thu, 8 Jan 2015 04:32:16 -0800 (PST) In-Reply-To: <54AE6A19.9070901@redhat.com> References: <1420689885-31156-1-git-send-email-patrick@parcs.ath.cx> <1420689885-31156-2-git-send-email-patrick@parcs.ath.cx> <54AE6A19.9070901@redhat.com> From: Patrick Palka Date: Thu, 08 Jan 2015 12:32:00 -0000 Message-ID: Subject: Re: [PATCH 2/3] TUI: Don't print KEY_RESIZE keys To: Pedro Alves Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-01/txt/msg00174.txt.bz2 On Thu, Jan 8, 2015 at 6:29 AM, Pedro Alves wrote: > On 01/08/2015 04:04 AM, Patrick Palka wrote: >> wgetch() sometimes returns KEY_RESIZE when ncurses detects that the >> terminal has been resized. > > I think curses SIGWINCH handler ends up _not_ installed, right? > We install our own, and so does readline. > So how did a resize manage to be detected/processed while inside > wgetch? I'm pretty sure that the SIGWINCH handlers does not get installed. However ncurses may detect a resize event when we exit TUI (exiting ncurses), then resize the terminal, then re-enter TUI (restarting ncurses). From there a KEY_RESIZE key is added to its internal FIFO. And the next call to wgetch will return this KEY_RESIZE key. > > Thanks, > Pedro Alves >