From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alp Aker Newsgroups: gmane.emacs.devel Subject: Re: [patch] add "underwave" face attribute Date: Sun, 5 Feb 2012 20:14:42 -0500 Message-ID: References: <037B3467A9FE4EC9B681DF3B1171A539@us.oracle.com> <87obtii1y4.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec52be5bb1f0e3004b84163a2 X-Trace: dough.gmane.org 1328500126 7066 80.91.229.3 (6 Feb 2012 03:48:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Feb 2012 03:48:46 +0000 (UTC) Cc: Juanma Barranquero , emacs-devel@gnu.org, Juri Linkov , Stefan Monnier , =?ISO-8859-1?Q?Jan_Dj=E4rv?= , Drew Adams To: =?ISO-8859-1?Q?Aur=E9lien_Aptel?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 06 04:48:44 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RuFZM-000486-15 for ged-emacs-devel@m.gmane.org; Mon, 06 Feb 2012 04:48:44 +0100 Original-Received: from localhost ([::1]:56146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuFZI-00088z-I3 for ged-emacs-devel@m.gmane.org; Sun, 05 Feb 2012 22:48:40 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:33136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuDAK-0003bV-Eq for emacs-devel@gnu.org; Sun, 05 Feb 2012 20:14:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RuDAJ-0001ki-69 for emacs-devel@gnu.org; Sun, 05 Feb 2012 20:14:44 -0500 Original-Received: from mail-ee0-f41.google.com ([74.125.83.41]:64920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuDAI-0001ke-UJ for emacs-devel@gnu.org; Sun, 05 Feb 2012 20:14:43 -0500 Original-Received: by eekc13 with SMTP id c13so1982357eek.0 for ; Sun, 05 Feb 2012 17:14:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IIWXYK6ayFBDmuCtQvtskgP95KMSh06CnqNJoFsmlrg=; b=DBs3dKyN4G62fK7CL2jOoQzIgEOCvJJ2T7/MVDIYjYd06I1knK20DViTJ3PRteU3tm IhrJlppdW1z6SdSxjoo0Vq/iIPXOWe9PkxHLQgsHFNyRDOEiqWrNLtFCCm5qbw+p0+7n hgHg7P+KQvl/phV89X/arLU3xGeJxEuJ0S1k0= Original-Received: by 10.14.39.207 with SMTP id d55mr4977360eeb.36.1328490882206; Sun, 05 Feb 2012 17:14:42 -0800 (PST) Original-Received: by 10.213.23.72 with HTTP; Sun, 5 Feb 2012 17:14:42 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.83.41 X-Mailman-Approved-At: Sun, 05 Feb 2012 22:48:25 -0500 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:148230 Archived-At: --bcaec52be5bb1f0e3004b84163a2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Aur=E9lien Aptel wrote: > Are you sure this won't break the rest of the code? (which relies > heavily on clipping) It sure looks cleaner but the rest of the code > uses ns_focus/unfocus. Fairly sure. What's needed here is a temporary change to the graphics state in the middle of a redisplay; we change the clipping rectangle, draw the underwave, then restore the previous clipping rectangle, if any. ns_focus/ns_unfocus can't be used to do that; they're intended to be used at the beginning and end of redisplay. --bcaec52be5bb1f0e3004b84163a2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Aur=E9lien Aptel=A0wrote:

> Are you= sure this won't break the rest of the code? (which relies
> heavily on clipping) It sure looks cleaner but the res= t of the code
> uses ns_focus/unfocus.

Fairly sure. =A0= What's needed here is a temporary change to the graphics state in the m= iddle of a redisplay; we change the clipping rectangle, draw the underwave,= then restore the previous clipping rectangle, if any. =A0 ns_focus/ns_unfo= cus can't be used to do that;=A0they're intended to be used at the = beginning and end of redisplay. =A0

--bcaec52be5bb1f0e3004b84163a2--