[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116006: * macfont.m: Include termchar.h.
From: |
Jan D. |
Subject: |
[Emacs-diffs] trunk r116006: * macfont.m: Include termchar.h. |
Date: |
Mon, 13 Jan 2014 10:32:52 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116006
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/16425
committer: Jan Djärv <address@hidden>
branch nick: trunk
timestamp: Mon 2014-01-13 11:32:48 +0100
message:
* macfont.m: Include termchar.h.
(CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND)
(CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND)
(CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Modified from
*_WITH_GC_* to take face and f as parameters.
(macfont_draw): Check for DRAW_MOUSE_FACE and set face accordingly.
Use *_WITH_FACE_*, and pass face as parameter.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/macfont.m macfont.m-20130915173740-04lgloz0557bz98l-2
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-01-13 01:50:46 +0000
+++ b/src/ChangeLog 2014-01-13 10:32:48 +0000
@@ -1,3 +1,13 @@
+2014-01-13 Jan Djärv <address@hidden>
+
+ * macfont.m: Include termchar.h.
+ (CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND)
+ (CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND)
+ (CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Modified from
+ *_WITH_GC_* to take face and f as parameters.
+ (macfont_draw): Check for DRAW_MOUSE_FACE and set face accordingly.
+ Use *_WITH_FACE_*, and pass face as parameter (Bug#16425).
+
2014-01-13 Daniel Colascione <address@hidden>
Fix menu item updating in the presence of the Unity global menu
=== modified file 'src/macfont.m'
--- a/src/macfont.m 2014-01-06 06:25:30 +0000
+++ b/src/macfont.m 2014-01-13 10:32:48 +0000
@@ -30,6 +30,7 @@
#include "composite.h"
#include "fontset.h"
#include "font.h"
+#include "termchar.h"
#include "nsgui.h"
#include "nsterm.h"
#include "macfont.h"
@@ -630,24 +631,21 @@
return cgColor;
}
-#define CG_SET_FILL_COLOR_WITH_GC_FOREGROUND(context, s) \
+#define CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND(context, face, f) \
do { \
- CGColorRef refcol_ = get_cgcolor (NS_FACE_FOREGROUND (s->face), \
- s->f); \
+ CGColorRef refcol_ = get_cgcolor (NS_FACE_FOREGROUND (face), f); \
CGContextSetFillColorWithColor (context, refcol_) ; \
CGColorRelease (refcol_); \
} while (0)
-#define CG_SET_FILL_COLOR_WITH_GC_BACKGROUND(context, s) \
+#define CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND(context, face, f) \
do { \
- CGColorRef refcol_ = get_cgcolor (NS_FACE_BACKGROUND (s->face),\
- s->f); \
+ CGColorRef refcol_ = get_cgcolor (NS_FACE_BACKGROUND (face), f); \
CGContextSetFillColorWithColor (context, refcol_); \
CGColorRelease (refcol_); \
} while (0)
-#define CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND(context, s) \
+#define CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND(context, face, f) \
do { \
- CGColorRef refcol_ = get_cgcolor (NS_FACE_FOREGROUND (s->face),\
- s->f); \
+ CGColorRef refcol_ = get_cgcolor (NS_FACE_FOREGROUND (face), f); \
CGContextSetStrokeColorWithColor (context, refcol_); \
CGColorRelease (refcol_); \
} while (0)
@@ -2719,6 +2717,7 @@
BOOL isComposite = s->first_glyph->type == COMPOSITE_GLYPH;
int end = isComposite ? s->cmp_to : s->nchars;
int len = end - s->cmp_from;
+ struct face *face = s->face;
int i;
block_input ();
@@ -2741,7 +2740,14 @@
if (with_background)
{
- CG_SET_FILL_COLOR_WITH_GC_BACKGROUND (context, s);
+ if (s->hl == DRAW_MOUSE_FACE)
+ {
+ face = FACE_FROM_ID (s->f, MOUSE_HL_INFO (s->f)->mouse_face_face_id);
+ if (!face)
+ face = FACE_FROM_ID (s->f, MOUSE_FACE_ID);
+ }
+
+ CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND (context, face, f);
CGContextFillRect (context,
CGRectMake (x, y,
s->width, FONT_HEIGHT (s->font)));
@@ -2776,7 +2782,7 @@
}
CGContextScaleCTM (context, 1, -1);
- CG_SET_FILL_COLOR_WITH_GC_FOREGROUND (context, s);
+ CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND (context, face, s->f);
if (macfont_info->synthetic_italic_p)
atfm = synthetic_italic_atfm;
else
@@ -2785,7 +2791,7 @@
{
CGContextSetTextDrawingMode (context, kCGTextFillStroke);
CGContextSetLineWidth (context, synthetic_bold_factor * font_size);
- CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND (context, s);
+ CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND (context, face, f);
}
if (no_antialias_p)
CGContextSetShouldAntialias (context, false);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116006: * macfont.m: Include termchar.h.,
Jan D. <=