From: handa Date: Mon, 15 Mar 2004 13:00:29 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=6ec7d22597c7ec08dfff162623cb0574fdc36c52;p=m17n%2Fm17n-lib.git *** empty log message *** --- diff --git a/src/face.c b/src/face.c index dc42a8f..216eafa 100644 --- a/src/face.c +++ b/src/face.c @@ -556,7 +556,7 @@ mface__realize (MFrame *frame, MFace **faces, int num, { MRealizedFace *rface; MRealizedFont *rfont; - MFace merged_face = *frame->face; + MFace merged_face = *(frame->face); void **props; int i, j; unsigned tick; @@ -565,8 +565,6 @@ mface__realize (MFrame *frame, MFace **faces, int num, if (num == 0 && language == Mnil && charset == Mnil && frame->rface) return frame->rface; - merged_face.property[MFACE_FOREGROUND] - = merged_face.property[MFACE_BACKGROUND] = NULL; for (i = 0; i < MFACE_PROPERTY_MAX; i++) for (j = num - 1; j >= 0; j--) if (faces[j]->property[i]) @@ -587,17 +585,6 @@ mface__realize (MFrame *frame, MFace **faces, int num, merged_face.property[MFACE_SIZE] = (void *) font_size; } - if ((MSymbol) merged_face.property[MFACE_VIDEOMODE] == Mreverse) - { - void *background = merged_face.property[MFACE_BACKGROUND]; - - merged_face.property[MFACE_BACKGROUND] - = merged_face.property[MFACE_FOREGROUND]; - merged_face.property[MFACE_FOREGROUND] = background; - } - if (! merged_face.property[MFACE_FONTSET]) - merged_face.property[MFACE_FONTSET] = frame->face->property[MFACE_FONTSET]; - rface = find_realized_face (frame, &merged_face, NULL); if (rface && rface->tick == tick) return rface->ascii_rface; diff --git a/src/internal-gui.h b/src/internal-gui.h index 9208ffd..1f42b07 100644 --- a/src/internal-gui.h +++ b/src/internal-gui.h @@ -41,6 +41,10 @@ struct MFrame with the frame. */ MWDevice *device; + MSymbol foreground, background, videomode; + + MFont *font; + /** The default face of the frame. */ MFace *face; diff --git a/src/m17n-gui.c b/src/m17n-gui.c index 2c3c011..a56873f 100644 --- a/src/m17n-gui.c +++ b/src/m17n-gui.c @@ -76,6 +76,7 @@ free_frame (void *object) M17N_OBJECT_UNREF (frame->face); mwin__close_device ((MFrame *) object); + free (frame->font); free (object); } @@ -313,7 +314,9 @@ mframe (MPlist *plist) MERROR (MERROR_WIN, NULL); } - frame->face = mface_copy (mface__default); + frame->face = mface_from_font (frame->font); + frame->face->property[MFACE_FONTSET] = mfontset (NULL); + M17N_OBJECT_REF (mface__default->property[MFACE_FONTSET]); if (plist) for (; (key = mplist_key (plist)) != Mnil; plist = mplist_next (plist)) if (key == Mface)