From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71343: 30.0.50; TTY frame doesn't automatically redisplay itself after having closed another frame Date: Thu, 06 Jun 2024 14:54:02 +0300 Message-ID: <86o78egucl.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4063"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71343@debbugs.gnu.org To: Daniel Clemente , Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 06 13:55:11 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sFBi3-0000m0-12 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Jun 2024 13:55:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFBhh-0007g6-0s; Thu, 06 Jun 2024 07:54:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFBhf-0007fv-OL for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 07:54:47 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sFBhf-0001QM-Gp for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 07:54:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sFBht-0007DS-PP for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 07:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Jun 2024 11:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71343 X-GNU-PR-Package: emacs Original-Received: via spool by 71343-submit@debbugs.gnu.org id=B71343.171767487127698 (code B ref 71343); Thu, 06 Jun 2024 11:55:01 +0000 Original-Received: (at 71343) by debbugs.gnu.org; 6 Jun 2024 11:54:31 +0000 Original-Received: from localhost ([127.0.0.1]:52598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFBhO-0007Cg-ST for submit@debbugs.gnu.org; Thu, 06 Jun 2024 07:54:31 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFBhK-0007CS-PI for 71343@debbugs.gnu.org; Thu, 06 Jun 2024 07:54:29 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFBgz-0001Mt-QW; Thu, 06 Jun 2024 07:54:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=d1Kick3Lmp1Ahr3ps0AmgJ68FpEFClysBTvuxoTVIhc=; b=XfDB8rNAAQdO GvSxmCJwNtnMykHgvlhuSU+o9DR9rW9x56z9aS0CD6hQy1dxTxSUEfa8gCvicoQHbk7KGjo9pI+b3 xvDXTzZm2lEIZt7xarEBah/6WJudaFR9nQ+7+b59n41GaDhredyd6XjjkKJcClJg0yxcF0+lI1TBu YDjD9+I+EHqsiPPBya+un36tnbToutZYjwttxOIHHUD4dYmCT+Q9oPSczwsjYbQp1PheHV53zPW7m ZCuZPwuntXms8SGcIRtM4XnlOYHJGPTkT4mJEQHfZaDfeK/0ECz8Vamya0VluHcseVhEBujcgDgtl IXD0P6MYk54ipGACZ7z9GA==; In-Reply-To: (message from Daniel Clemente on Mon, 3 Jun 2024 15:33:16 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286688 Archived-At: > From: Daniel Clemente > Date: Mon, 3 Jun 2024 15:33:16 +0000 > > This happens since I started using TTY emacs (with no X support) > around 2 months ago. It's easy to reproduce but it may have something > to do with my terminal or window manager. > > The problem is that Emacs doesn't redisplay in one particular case. > It's just a minor annoyance because I can just press a key or move the > mouse and the frame will redisplay. But it may hint at some other bug > that could be worthy of fixing. > > > I can consistently do this to reproduce it: > > 1. Launch emacs --daemon -Q > 2. Using my tiling window manager "wmii", I divide the screen in a > left part and a right part. Each one has other non-Emacs windows > 3. In the left side, I press a key to launch a terminal with TTY > emacs. I use a command like this: urxvtcd -e emacsclient -c & > 4. I move focus to the right side, I launch another > terminal+emacsclient with the same command > 5. Sanity check; verifying that everything works: I move to the left > terminal and press wmii keys to make the terminal wider or thinner. It > works as expected, it redisplays; Emacs uses all available space > inside the X window > 6. Now I go to the right side. I press a key to kill the terminal > running emacsclient. Now only the terminal in the left side remains > 7. I move to the left side (pressing a wmii key) and I press the wmii > keys to make the terminal wider or thinner (same as step 5). wmii > obeys, the X windows change size as expected. > 8. However, the Emacs TTY frame isn't redisplayed: if I made it wider, > the new area at the right of the frame is shown in black (it sometimes > shows garbage from previous attempts). The mode line doesn't extend to > the right. If I make it thinner, the text isn't readjusted to the new > line length. Etc. The cursor keeps blinking. > 9. I can keep circulating through other X windows and come back to > this X window, and try to resize it again. It still doesn't redisplay. > Pressing Ctrl also doesn't redisplay it > 10. Only when I press a non-modifier key (e.g. right arrow) or I move > the mouse, it redisplays and starts using the whole X window > > > Note that step 6 is essential. This issue only appears immediately > after having killed another emacslient. It doesn't happen e.g. after > killing another type of X window. Or after having shuffled the X > windows (moving the terminal around, left/right, without killing it). > It's just after killing a frame. I'm not sure this is a bug. Emacs switches to reading input from a different terminal/keyboard when there's actually some input from that terminal's keyboard. In the situation you described, the terminal whose keyboard was active was killed. I'm guessing we get SIGHUP in this case, so we could do something about it, but what exactly should we do? Since no other keyboard provided any input, to which keyboard to switch, and why? So I think we should not change this behavior, since the "workaround" is so easy. Paul, any other ideas or comments?