From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.devel Subject: Re: Whether a struct window *w is a live/valid window. Date: Sat, 23 Mar 2019 10:03:10 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="156801"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 23 18:03:25 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h7k3I-000ecy-Na for ged-emacs-devel@m.gmane.org; Sat, 23 Mar 2019 18:03:25 +0100 Original-Received: from localhost ([127.0.0.1]:45728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7k3H-00064k-K2 for ged-emacs-devel@m.gmane.org; Sat, 23 Mar 2019 13:03:23 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7k38-00063c-Gd for emacs-devel@gnu.org; Sat, 23 Mar 2019 13:03:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h7k37-0005TR-Fb for emacs-devel@gnu.org; Sat, 23 Mar 2019 13:03:14 -0400 Original-Received: from gateway32.websitewelcome.com ([192.185.145.107]:46575) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h7k37-0005RL-2l for emacs-devel@gnu.org; Sat, 23 Mar 2019 13:03:13 -0400 Original-Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway32.websitewelcome.com (Postfix) with ESMTP id E371E4666 for ; Sat, 23 Mar 2019 12:03:11 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id 7k35h75Wz90on7k35hMmo2; Sat, 23 Mar 2019 12:03:11 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date: Sender:Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=WVqaIjNOjETSFE9zcen/+nTxWq6YMQltlgnH+6q7i7o=; b=Mwpe03k4EQS7qf4EAuwNggIZHd Zmu4zqv4BZqBdVck70IAkvgld28/24Faa8K1uzZ9JixTRHpSWRabhaB0T8DXfUFar2SUrT7wZ4mb5 td/zsaGSQdhOR5XyncMvsggIGPQzQPNkPa2+AlKG+oi/4Hg7/xMmhIUs3wcLWitjIVXBq2IpYyYyW m2BUt7IPDx9TVZAYNWP0UJ4DBQkEEy+jvrS3QUIilz1sMZV3EddFGmrDfeVCs1vw22TcpBQQj44nn hq5X58jj8eKFCONm2u4hgu4S1OqxdLZi1l7gm2OTjHr044zylnoyLVK/tBpDhyvS7bmB6yN+clN0s ufZASoTw==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:49792 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.91) (envelope-from ) id 1h7k35-001RPr-4d; Sat, 23 Mar 2019 12:03:11 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Source-L: No X-Exim-ID: 1h7k35-001RPr-4d X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:49792 X-Source-Auth: lawlist X-Email-Count: 1 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 192.185.145.107 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:234655 Archived-At: Thank you, Alan, for confirming that a reasonable approach to checking whether the window is alive/valid is to use: if (w != NULL && NILP (w->contents)) The drawing method for glyphs that I am familiar with is as follows: draw_glyphs FRAME_RIF (f)->draw_glyph_string (s); font->driver->draw Those series of events do not occur when the vertical scroll bar is removed. The scroll bar removal is processed in the span of just one (1) gdb step; i.e., "s". ns_read_socket ... [NSAPP run]; The calls to "draw_glyphs ... font->driver->draw" have already occurred and the window has already been properly updated (with fake cursors) *before* "ns_read_socket ... [NSAPP run]" is processed. Does "ns_read_socket ... [NSAPP run]" have a sort of "selective photographic memory" of the glyphs, but not the fake cursors that were created with NSRectFill? http://www.lawlist.com/images/after_03_10_2019.png