From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Identifying the face between STRETCH and right fringe. Date: Tue, 27 Nov 2018 13:29:44 +0200 Message-ID: <838t1ehi6v.fsf@gnu.org> References: <83h8gbis2d.fsf@gnu.org> <83zhu0f6tt.fsf@gnu.org> <83sgzrgb1f.fsf@gnu.org> <83r2fbg5bq.fsf@gnu.org> <83lg5jfs9o.fsf@gnu.org> <83a7luhnid.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1543318064 28620 195.159.176.226 (27 Nov 2018 11:27:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Nov 2018 11:27:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 27 12:27:40 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 1gRbWm-0007KV-5r for ged-emacs-devel@m.gmane.org; Tue, 27 Nov 2018 12:27:40 +0100 Original-Received: from localhost ([::1]:41518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRbYs-0006Hp-Ky for ged-emacs-devel@m.gmane.org; Tue, 27 Nov 2018 06:29:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRbYj-0006H0-VO for emacs-devel@gnu.org; Tue, 27 Nov 2018 06:29:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRbYf-0002X0-1q for emacs-devel@gnu.org; Tue, 27 Nov 2018 06:29:41 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRbYe-0002Wv-V5; Tue, 27 Nov 2018 06:29:37 -0500 Original-Received: from [176.228.60.248] (port=2020 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gRbYe-0006dT-HW; Tue, 27 Nov 2018 06:29:36 -0500 In-reply-to: (message from Robert Pluim on Tue, 27 Nov 2018 12:02:51 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:231441 Archived-At: > From: Robert Pluim > Cc: emacs-devel@gnu.org > Date: Tue, 27 Nov 2018 12:02:51 +0100 > > > if (FRAME_WINDOW_P (f) > > && MATRIX_ROW_DISPLAYS_TEXT_P (it->glyph_row) > > && face->box == FACE_NO_BOX > > && face->background == FRAME_BACKGROUND_PIXEL (f) > > #ifdef HAVE_WINDOW_SYSTEM > > && !face->stipple > > #endif > > && !it->glyph_row->reversed_p) > > return; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > > > > When we get here, face->background == 1, and FRAME_BACKGROUND_PIXEL == > 0xfffeffff > > Looking through nsfns.m, the problem becomes obvious: the NS port uses > indices into a color table to specify the background colour of faces, > and FRAME_BACKGROUND_PIXEL is an RGBA value. Why does NS use indices here, and not RGBA values? > Iʼm not sure how best to fix this. If no better/cleaner idea emerges, how about having an NS-specific code here that computed the it->face's background RGBA by indexing into the color table, before comparing that with FRAME_BACKGROUND_PIXEL?