all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mustafa Kocaturk <murskt@gmail.com>
To: 21301@debbugs.gnu.org
Subject: bug#21301: 25.0.50; Emacs Trunk:  Fringe bitmaps confuse foreground/background colors.
Date: Thu, 8 Oct 2015 16:26:25 -0500	[thread overview]
Message-ID: <3F9297F4-810B-4092-8697-96E97645E680@gmail.com> (raw)
In-Reply-To: <m2pp2j2f62.wl%esq@lawlist.com>

[-- Attachment #1: Type: text/plain, Size: 2933 bytes --]

Hi,

The fringe bitmap is not only displayed in inverse video, but also as a mirror image of the original.

Both issues are fixed in initFromXBM as follows:

1. Flip the bit shift direction: Put most significant bit first. Fixes the mirrored image back to normal.
2. Swap background and foreground color.

The resulting display makes better sense and looks as original as I can tell.

————— Patch follows:

*** Temp/ediff7256bpj	Wed Oct  7 19:22:04 2015
--- src/nsimage.m	Wed Oct  7 18:50:41 2015
***************
*** 253,272 ****
            for (k = 0; i < w && k < 8; ++k, ++i)
              {
                *alpha++ = 0xff;
!               if (c & 1)
!                 {
!                   *rr++ = fgr;
!                   *gg++ = fgg;
!                   *bb++ = fgb;
!                 }
!               else
                  {
                    *rr++ = bgr;
                    *gg++ = bgg;
                    *bb++ = bgb;
                  }
                idx++;
!               c >>= 1;
              }
          }
    }
--- 253,272 ----
            for (k = 0; i < w && k < 8; ++k, ++i)
              {
                *alpha++ = 0xff;
!               if (c & 0x80)
                  {
                    *rr++ = bgr;
                    *gg++ = bgg;
                    *bb++ = bgb;
                  }
+               else
+                 {
+                   *rr++ = fgr;
+                   *gg++ = fgg;
+                   *bb++ = fgb;
+                 }
                idx++;
!               c <<= 1;
              }
          }
    }


> > Date:  Sat, 29 Aug 2015 12:51:11 -0700
> > From:  Keith David Bershatsky <address@hidden>
> > Cc:  address@hidden
> > 
> > I rolled back to the commit "SHA 67a878f78f879ce534232408c34dd11f42dd802b" 
> > [May 15, 2015 at 2:31 a.m.], then built Emacs, and bug#21301 WAS present.
> > 
> > I rolled back to the commit "SHA b1c23fb94072cca7f08ea5f50430916b9ea168e6" 
> > [May 15, 2015 at 2:17 a.m.], then built Emacs, and bug#21301 was NOT present 
> > -- i.e., everything was working as it should.
> > 
> Great, thanks.  So we now know for sure that 67a878f _was_ the
> culprit.
> 
> I hope someone knowledgeable about NS and OS X will be able to tell
> what's wrong with that change, and how to fix it.
Just the two reversals mentioned above, which were obvious from the way bitmaps appear on screen.
Not much else was needed in the way of OS X or NS knowledge, luckily for me :).

Another annoying display issue remains, though: 
Visible bell no longer displays solid black, but distorted pieces of bitmap from another part of the screen, and leaves a stubborn garbled rectangle behind, hiding the original text. 
I’m not sure if this has been reported as a bug, but suspecting it involves ns_ring_bell in nsterm.m and around the same time frame.

Best regards,
Mustafa

[-- Attachment #2: Type: text/html, Size: 6666 bytes --]

  parent reply	other threads:[~2015-10-08 21:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19 20:31 bug#21301: 25.0.50; Emacs Trunk: Fringe bitmaps confuse foreground/background colors Keith David Bershatsky
2015-08-21 13:47 ` Eli Zaretskii
2015-08-22 23:45 ` Keith David Bershatsky
2015-08-23  2:43   ` Eli Zaretskii
2015-08-23 14:05     ` Eli Zaretskii
2015-08-23 17:07 ` Keith David Bershatsky
2015-08-23 17:11   ` Eli Zaretskii
2015-08-23 23:41     ` Glenn Morris
2015-08-29  4:41 ` Keith David Bershatsky
2015-08-29  7:48   ` Eli Zaretskii
2015-08-29 16:15 ` Keith David Bershatsky
2015-08-29 16:34   ` Eli Zaretskii
2015-08-29 19:51 ` Keith David Bershatsky
2015-08-29 20:18   ` Eli Zaretskii
2015-08-29 21:52 ` Keith David Bershatsky
2015-10-08 21:26 ` Mustafa Kocaturk [this message]
2015-11-04  6:13 ` bug#21301: Fixed bug 21301 Anders Lindgren
2015-11-04 16:40   ` Glenn Morris
2015-11-04 16:51     ` Anders Lindgren
2015-11-04 16:53   ` bug#21301: Fwd: " Anders Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F9297F4-810B-4092-8697-96E97645E680@gmail.com \
    --to=murskt@gmail.com \
    --cc=21301@debbugs.gnu.org \
    --cc=m.kocaturk@computer.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.