From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.devel Subject: Re: nsterm.m: How to prevent _inactive_ window update from overreaching. Date: Mon, 26 Nov 2018 20:58:59 -0800 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: blaine.gmane.org 1543294639 19370 195.159.176.226 (27 Nov 2018 04:57:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Nov 2018 04:57:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 27 05:57:15 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRVQv-0004st-Q7 for ged-emacs-devel@m.gmane.org; Tue, 27 Nov 2018 05:57:14 +0100 Original-Received: from localhost ([::1]:40024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRVT2-0002vm-AI for ged-emacs-devel@m.gmane.org; Mon, 26 Nov 2018 23:59:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRVSv-0002vU-V4 for emacs-devel@gnu.org; Mon, 26 Nov 2018 23:59:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRVSs-0004WU-MN for emacs-devel@gnu.org; Mon, 26 Nov 2018 23:59:17 -0500 Original-Received: from gateway31.websitewelcome.com ([192.185.143.43]:42503) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gRVSs-0004VX-EJ for emacs-devel@gnu.org; Mon, 26 Nov 2018 23:59:14 -0500 Original-Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway31.websitewelcome.com (Postfix) with ESMTP id A38106E4F8 for ; Mon, 26 Nov 2018 22:59:00 -0600 (CST) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id RVSegXKWSRPojRVSeggAB6; Mon, 26 Nov 2018 22:59:00 -0600 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=pn8flyu1kLqz95jMSOmKeu/FwlaaX7LWYwCUfysd8KE=; b=MfymO748QtvsNEgAXtArfDtXxI lf56AntggAyHVSBaWWiHCQrfi7dfKqnrOLQfmmrYrrVElwtF8dM/Eb8kHxa91a5pxO3mG2BsccJsr CpkG5VS//3xoErEBAMaYJ6sFaxmFO7kWxDcPy4dGdTe02GxoFvQY4Quh3SQ4ktH8BNyKTEpzK3nHT G6FGgStw/Yi9bL69/m08PRjcF2SeSJzX5it1t0YEgogs8QTDLFMiaJQpPWkrgiOEEUrQnPewjDAFs DUPv5p/A53Y5nAqxg4SvHGkXrA5XnrMtXsrAdLne+n1hSnjtpJptpmNUgnkXCzJU/cBlduTyL03pI L4gCrcfw==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:55221 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.91) (envelope-from ) id 1gRVSd-000Gwt-Sx; Mon, 26 Nov 2018 22:59:00 -0600 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: 1gRVSd-000Gwt-Sx X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:55221 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] [fuzzy] X-Received-From: 192.185.143.43 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:231430 Archived-At: Feature requests #17684 (crosshairs / visible fill column) and #22873 (multiple fake cursors) have not been approved by anyone on the Emacs development team. There has been some discussion regarding whether multiple fake cursors should become a part of Emacs someday, but nothing was ever decided. I continue to develop these features because I use them in my every day workflow and am hoping to convince the Emacs development team to someday include similar features. I figure that if I do a good enough job, eventually the Emacs development team will say: "sure, why not ..." - Fake cursors are removed in two (2) locations within redisplay_internal (if the cursor cache exists). If the frame is not being updated, then call update_begin before removing and call update_end when removing is complete. - Fake cursors are removed in two (2) locations within redisplay_window (if the cursor cache exists). If the frame is not being updated, then call update_begin before removing and call update_end when removing is complete. - Whenever display_and_set_cursor is called and not immediately returned, fake cursors are calculated and drawn; or if the cursor cache already exist, then erase and redraw. If the frame is not being updated, then call update_begin before drawing/removing and call update_end when drawing/removing is complete. - The calculations for drawing fake cursors are based upon modified versions of the functions dump_glyph_matrix and dump_glyph_row, which generate the correct coordinates for placing the fake cursors. - Fake cursors come in two types: (1) cursor with a glyph on top; (2) cursor with nothing on top [e.g., floating anywhere on the visible window]. - There are two basic settings: (1) draw or erase/redraw forthwith (whenever the real cursor would ordinarily be drawn); or, (2) draw on an idle-timer and, if the cursor cache exists, then erase/redraw in certain circumstances when the real cursor would ordinarily be redrawn. New calculations and cursor cache update occur on the initial call of either of the two scenarios. The present design calculates and draws/erases fake cursors based upon particular visible windows that get updated during redisplay, rather than rectangles within a particular window or set of windows. If I am understanding your comments correctly, it sounds like a new rectangle system of fake cursor calculation and drawing/erasing of fake cursors would need to be designed (solely for the benefit of MacOS Mojave users). Or, at the very least, calculate fake cursors once for each visible window (where fake cursors are active) and then loop through cached coordinates when a rectangle is drawn to see if any fake cursors are contained within -- if so, then draw/erase fake cursors within that rectangle. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > Date: [11-26-2018 12:09:02] <26 Nov 2018 20:09:02 +0000> > From: Alan Third > To: Keith David Bershatsky > Cc: emacs-devel@gnu.org > Subject: Re: nsterm.m: How to prevent _inactive_ window update from overreaching. > > * * * > > Because we can't draw directly to the screen any more, when redisplay > is running all we can do is mark the parts of the frame that need > updated. Later we call expose_frame on those parts and it does the > actual drawing. > > That process must be working to some extent. I don't know your code > very well but I suspect the crosshair code is called when the cursor > is redrawn. If part of the frame is marked as dirty, but that doesn't > include the cursor, then the cursor isn't redrawn and therefore your > crosshair code will not be called. Does that make sense? > > If that is the case we need to work out how to ensure the crosshair > code is called even if the cursor is not redrawn. > > I've had a quick look at the patches and, if I'm honest, it would take > me some time to work out what's going on. How is the crosshair drawn? > -- > Alan Third