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: Drawing dirty rectangles with expose_window: row->clip = fr Date: Wed, 03 Apr 2019 12:28:57 -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="246698"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 03 21:29:43 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 1hBlZv-00124R-1a for ged-emacs-devel@m.gmane.org; Wed, 03 Apr 2019 21:29:43 +0200 Original-Received: from localhost ([127.0.0.1]:48133 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBlZt-0006GU-Pu for ged-emacs-devel@m.gmane.org; Wed, 03 Apr 2019 15:29:41 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBlZG-0006GP-1q for emacs-devel@gnu.org; Wed, 03 Apr 2019 15:29:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hBlZF-0005Bj-4e for emacs-devel@gnu.org; Wed, 03 Apr 2019 15:29:02 -0400 Original-Received: from gateway32.websitewelcome.com ([192.185.145.100]:24990) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hBlZE-0005B3-Qg for emacs-devel@gnu.org; Wed, 03 Apr 2019 15:29:01 -0400 Original-Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway32.websitewelcome.com (Postfix) with ESMTP id 8A927486B04 for ; Wed, 3 Apr 2019 14:28:59 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id BlZCh8vQr2qH7BlZDhXJ8r; Wed, 03 Apr 2019 14:28:59 -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=AJFt5E+0+bBi29HosxGgv7uMJkvoiW1K+QXeaI44uzQ=; b=AScYaw0FnEaAHY41MTmXfUqUeb gp7uD7Fo/7ORKbZbRlXQgr6UNh9KLEw6Yccp1oCFpBT/SV2Z2IICuGQnK4UEarQZ1HYKIZs43/X2f vSBlXHldhsY5UHVNZ3yb7wzjBVmh2gfhkEkKHETpdCBcy4SoRIxgHxX3aZMaplgMhyizb4aWRaFA/ 05jB220Xglawd7Rh8v6EIUgxB5YHhkC9Q3MC+4cIJVH1k2n0RREaaAT0QecxzmxLVMJ5c+9/QknGS e6HQidyQKO6+pc7et8BdozKLaIN8BZqz3VoggUWM4tYykCFEl5E2a5F5vbrbSVeQ/3SAeq0l8CieT NCoUCAPQ==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:52214 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.91) (envelope-from ) id 1hBlZC-001SA3-FS; Wed, 03 Apr 2019 14:28:58 -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: 1hBlZC-001SA3-FS X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:52214 X-Source-Auth: lawlist X-Email-Count: 2 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.100 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:234930 Archived-At: After some additional testing and digging into the core code of Emacs, I made the following observations: . ns_draw_window_cursor calls ns_clip_to_rect, which does _not_ take "row->clip" into consideration when drawing cursors with NSRectFill. . When it comes time to draw glyphs on top of the box/hollow family of cursors, "row->clip" is taken into consideration by get_glyph_string_clip: if (s->row->clip) { XRectangle r_save = r; if (! x_intersect_rectangles (&r_save, s->row->clip, &r)) r.width = 0; } Inasmuch as fake cursors are drawn immediately following calls to draw_glyphs (e.g., during expose_window), I have created a slightly modified version of ns_clip_to_rect that takes "row->clip" into consideration and calls an NS version of x_intersect_rectangles ... In a few tests, this approach appears to be achieving the desired results. Keith