From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Redisplay issue Date: Sat, 28 Nov 2015 10:06:28 +0200 Message-ID: <83fuzqr1iz.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1448698020 321 80.91.229.3 (28 Nov 2015 08:07:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Nov 2015 08:07:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Yuan MEI Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 28 09:06:49 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a2aWu-0007AY-CR for ged-emacs-devel@m.gmane.org; Sat, 28 Nov 2015 09:06:48 +0100 Original-Received: from localhost ([::1]:59910 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2aWx-00009Y-6X for ged-emacs-devel@m.gmane.org; Sat, 28 Nov 2015 03:06:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2aWt-00009N-BK for emacs-devel@gnu.org; Sat, 28 Nov 2015 03:06:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2aWo-0003Ag-BN for emacs-devel@gnu.org; Sat, 28 Nov 2015 03:06:47 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:61633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2aWo-0003AX-3h for emacs-devel@gnu.org; Sat, 28 Nov 2015 03:06:42 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NYI00M00LNYMM00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Sat, 28 Nov 2015 10:06:40 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NYI00MUBMJ3GS80@a-mtaout20.012.net.il>; Sat, 28 Nov 2015 10:06:40 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195435 Archived-At: > Date: Fri, 27 Nov 2015 14:31:55 -0800 > From: Yuan MEI > > Sometimes when I switch to another virtual desktop then come back > to emacs What is a "virtual desktop" in this case? > the entire frame shows only the background color, no letter > or only part of the frame is visible. This does not happen all the > time though. I just happened to capture a screenshot (attached, I > hope the mailing server accepts it.) The screenshot shows a text-mode Emacs frame, AFAICT. Does this happen only with text-mode frames, or do you see that in GUI frames as well? If this happens with text-mode frames only, then that's not an Emacs problem. It's a problem with the terminal emulator (xterm etc.) you are using: it should sense the switch and redraw the display on the low level. When Emacs runs on a TTY, it doesn't listen to any expose or conceal messages sent by the windowing system, so it has no idea that its display was concealed or exposed, and cannot initiate a redisplay in these situations. From the Emacs POV, a TTY frame is the only thing displayed by the console device, and the only way such a frame can be concealed and exposed is by stopping Emacs (with the likes of "C-z") and then resuming it. And these are the only cases a TTY frame will be completely redrawn. GUI frames are different: Emacs gets expose events for them, and should react by redrawing the exposed portion(s) of the frame.