|
From: | Mustafa Kocaturk |
Subject: | bug#21301: 25.0.50; Emacs Trunk: Fringe bitmaps confuse foreground/background colors. |
Date: | Thu, 8 Oct 2015 16:26:25 -0500 |
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; } } }
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 |
[Prev in Thread] | Current Thread | [Next in Thread] |