From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Henrik Nyman Newsgroups: gmane.emacs.bugs Subject: bug#22060: 25.1.50; Fringe faces or not honored in 25.1.50.1 on OSX 10.11 installed via homebrew --use-git-head --cocoa Date: Sun, 23 Apr 2017 19:40:17 +0000 Message-ID: References: <30EE68E8-0158-4079-8DD4-B80599305039@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c07259ea61691054ddaa920 X-Trace: blaine.gmane.org 1492978813 17896 195.159.176.226 (23 Apr 2017 20:20:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 23 Apr 2017 20:20:13 +0000 (UTC) To: 22060@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 23 22:20:06 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1d2NzK-0004Ur-4O for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Apr 2017 22:20:06 +0200 Original-Received: from localhost ([::1]:40476 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2NzP-0002Rf-UB for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Apr 2017 16:20:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2NzK-0002Q6-18 for bug-gnu-emacs@gnu.org; Sun, 23 Apr 2017 16:20:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d2NzG-0007Lq-RA for bug-gnu-emacs@gnu.org; Sun, 23 Apr 2017 16:20:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38601) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d2NzG-0007Lj-MY for bug-gnu-emacs@gnu.org; Sun, 23 Apr 2017 16:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d2NzG-0004XW-GZ for bug-gnu-emacs@gnu.org; Sun, 23 Apr 2017 16:20:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <30EE68E8-0158-4079-8DD4-B80599305039@gmail.com> Resent-From: Henrik Nyman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Apr 2017 20:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22060 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22060-submit@debbugs.gnu.org id=B22060.149297879117428 (code B ref 22060); Sun, 23 Apr 2017 20:20:02 +0000 Original-Received: (at 22060) by debbugs.gnu.org; 23 Apr 2017 20:19:51 +0000 Original-Received: from localhost ([127.0.0.1]:36800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2Nz4-0004X2-Qc for submit@debbugs.gnu.org; Sun, 23 Apr 2017 16:19:51 -0400 Original-Received: from mail-qk0-f181.google.com ([209.85.220.181]:35012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2NN4-0003cp-80 for 22060@debbugs.gnu.org; Sun, 23 Apr 2017 15:40:34 -0400 Original-Received: by mail-qk0-f181.google.com with SMTP id f76so23060724qke.2 for <22060@debbugs.gnu.org>; Sun, 23 Apr 2017 12:40:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=O54I3tcEcuz9lMEXiO7DVI+zAiG93PB/KtnowmcyR9A=; b=VoErYW1xR0dwqjU2NijDvT38IF5nCA56jcJN310PG9piAZ6sVF7v4Sodf8Kb+reG/F J2QC27apzhdSiRyv//47ntmdZB2pCO325D0U1feYMnMoZnMjhaok3rRb/ov/pXQpiSwT i5LbXHDqQaSG3inZ8tqeWoY/eOcI7X1M7mZUusJ1lVefKKLyACHi0eTWTX0ME2F8vLfu Y+HczqM2YpubN/gnPnE/Ke+KlsaTIGL16panmkdLdP6DBMa6u/eHA1Y68JXDehgGc2kR luBzxHuLiB03/xs8cuOyhqsfueL9CmkdwpaLNJftWJw3DqkiX7tKMPtelEPsEkw7cc64 9RiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=O54I3tcEcuz9lMEXiO7DVI+zAiG93PB/KtnowmcyR9A=; b=qxN+Z2Gjg592Ea25QgCkYYiPqqXlBAMuHTCc1qhNKqyhMJ6ceS8Q0tUoxUvqb8FDhU 6b/kcHZ9k/ovyyk2ilqb657loDQw5CjWUVV5ItuFCcVbezbfGyrcyQyqSsKLn4IT+oQS XmPvJkzx6WbTf58NyvsDkQY/R0+hJn+UAT0D/vIDzhJgOvQ4VNrKr1DgCfFCMnEr0iTI g5TpZ9FGKSCnxB+floVxZXrVujn3fCADZw665V6CM5YnkYZDdwVdjAdF39I13NXbX/N1 ARpOMwefqrdYcojieXZz64vQqhhaEfb0v/B5tu7Va+ZOe9Ro2l3xj5AlQe1SzYe9Eep/ g11A== X-Gm-Message-State: AN3rC/40kcNJVdvE6zjovWacN9EaZiuZiBuGLuGadGxYK/2ns0y5nHId eepvxZCbcZyUyD27ASNBFFFbmddbZ1gk X-Received: by 10.55.137.133 with SMTP id l127mr16008212qkd.113.1492976427995; Sun, 23 Apr 2017 12:40:27 -0700 (PDT) X-Mailman-Approved-At: Sun, 23 Apr 2017 16:19:49 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:131917 Archived-At: --94eb2c07259ea61691054ddaa920 Content-Type: text/plain; charset=UTF-8 Referred to this issue at: https://github.com/flycheck/flycheck/issues/811#issuecomment-296476404 I hope this helps with creating a proper fix. In short: - Discovered this one is caused by: http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=67a878f78f879ce534232408c34dd11f42dd802b - Was able to temporarily fix this issue with (applied on tag emacs-25.2, see below). This fixes the behaviour with flycheck but may have some other undesired effects (there probably was a reason to save the foreground color in a member variable in the first place). diff --git src/nsimage.m src/nsimage.m index 3f49fc046b..ff7ccef0bf 100644 --- src/nsimage.m +++ src/nsimage.m @@ -270,7 +270,6 @@ ns_set_alpha (void *img, int x, int y, unsigned char a) } } - xbm_fg = fg; [self addRepresentation: bmRep]; return self; } @@ -298,18 +297,14 @@ ns_set_alpha (void *img, int x, int y, unsigned char a) { int i, len = s.width*s.height; int rr = r * 0xff, gg = g * 0xff, bb = b * 0xff; - unsigned char fgr = (xbm_fg >> 16) & 0xff; - unsigned char fgg = (xbm_fg >> 8) & 0xff; - unsigned char fgb = xbm_fg & 0xff; for (i = 0; i < len; ++i) - if (planes[0][i] == fgr && planes[1][i] == fgg && planes[2][i] == fgb) + if (planes[3][i] != 0) { planes[0][i] = rr; planes[1][i] = gg; planes[2][i] = bb; } - xbm_fg = ((rr << 16) & 0xff) + ((gg << 8) & 0xff) + (bb & 0xff); } return self; diff --git src/nsterm.h src/nsterm.h index 5d2513aea7..9de7d94be4 100644 --- src/nsterm.h +++ src/nsterm.h @@ -643,7 +643,6 @@ char const * nstrace_fullscreen_type_name (int); NSBitmapImageRep *bmRep; /* used for accessing pixel data */ unsigned char *pixmapData[5]; /* shortcut to access pixel data */ NSColor *stippleMask; - unsigned long xbm_fg; } + allocInitFromFile: (Lisp_Object)file; - (void)dealloc; Tested with Emacs 25.2 @3a34412caa, macOS Sierra 10.12.2 --94eb2c07259ea61691054ddaa920 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Referred to this= issue at:

=C2=A0 https://github.com/= flycheck/flycheck/issues/811#issuecomment-296476404


<= p class=3D"inbox-inbox-p1">I hope this helps= with creating a proper fix.


In short:=

=C2=A0 - Discovered this one is ca= used by: http://git.savannah.gnu.org/cg= it/emacs.git/commit/?id=3D67a878f78f879ce534232408c34dd11f42dd802b

=C2=A0 - Was able to temporarily f= ix this issue with (applied on tag=C2=A0emacs-25.2,=C2=A0

=C2=A0 =C2=A0 see below). This fixes the behaviour wit= h flycheck =C2=A0but may have some=C2=A0

=C2= =A0 =C2=A0 other undesired effects (there probably was a reason to save the= =C2=A0

=C2=A0 =C2=A0 foreground color in a m= ember variable in the first place).


diff --git src/n= simage.m src/nsimage.m

index 3f49fc046b= ..ff7ccef0bf 100644

--- src/nsimage.= m

+++ src/nsimage.= m

@@ -270,7 +270,6= @@ ns_set_alpha (void *img, int x, int y, unsigned char a)

=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 = }

=C2=A0=C2=A0 }


-=C2=A0 xbm_fg =3D fg;

=C2=A0=C2=A0 [self addRepresentati= on: bmRep];

=C2=A0=C2=A0 return self;

}

@@ -298,18 +297,= 14 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)

=C2=A0=C2=A0 {

=C2=A0=C2=A0 =C2=A0 int i, len =3D= s.width*s.height;

=C2=A0=C2=A0 =C2=A0 int rr =3D r *= 0xff, gg =3D g * 0xff, bb =3D b * 0xff;

-=C2=A0 =C2=A0 unsigned char fgr = =3D (xbm_fg >> 16) & 0xff;

-=C2=A0 =C2=A0 unsigned char fgg = =3D (xbm_fg >> 8) & 0xff;

-=C2=A0 =C2=A0 unsigned char fgb = =3D xbm_fg & 0xff;


=C2=A0=C2=A0 =C2=A0 for (i =3D 0; = i < len; ++i)

-=C2=A0 =C2=A0 =C2=A0 if (planes[0= ][i] =3D=3D fgr && planes[1][i] =3D=3D fgg && planes[2][i] = =3D=3D fgb)

+=C2=A0 =C2=A0 =C2=A0 if (planes[3= ][i] !=3D 0)

=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 = {

=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = planes[0][i] =3D rr;

=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = planes[1][i] =3D gg;

=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = planes[2][i] =3D bb;

=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 = }

-=C2=A0 =C2=A0 xbm_fg =3D ((rr <= ;< 16) & 0xff) + ((gg << 8) & 0xff) + (bb & 0xff);

=C2=A0=C2=A0 }


=C2=A0=C2=A0 return self;

diff --git src/n= sterm.h src/nsterm.h

index 5d2513aea7= ..9de7d94be4 100644

--- src/nsterm.h=

+++ src/nsterm.h=

@@ -643,7 +643,6= @@ char const * nstrace_fullscreen_type_name (int);

=C2=A0=C2=A0 NSBitmapImageRep *bmR= ep; /* used for accessing pixel data */

=C2=A0=C2=A0 unsigned char *pixmap= Data[5]; /* shortcut to access pixel data */

=C2=A0=C2=A0 NSColor *stippleMask;=

-=C2=A0 unsigned long xbm_fg;

}

+ allocInitFromF= ile: (Lisp_Object)file;

- (void)dealloc;=


Tested with Emac= s 25.2 @3a34412caa, macOS Sierra 10.12.2

--94eb2c07259ea61691054ddaa920--