Wed Jul 5 19:48:10 PDT 2000 Michael Jennings <mej@eterm.org>
The multibyte font size patches caused weird behavior if your multibyte font sizes didn't match your regular font sizes for those who don't actually use the multibyte support. So I fixed that. I also fixed the XA_TEXT problem for people using old/broken X. SVN revision: 2904
This commit is contained in:
parent
9648bcd0a0
commit
d5b5f49ae8
|
@ -3763,3 +3763,11 @@ Wed Jul 5 18:31:39 PDT 2000 Michael Jennings <mej@eterm.org>
|
||||||
Imlib2.h works again.
|
Imlib2.h works again.
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
Wed Jul 5 19:48:10 PDT 2000 Michael Jennings <mej@eterm.org>
|
||||||
|
|
||||||
|
The multibyte font size patches caused weird behavior if your
|
||||||
|
multibyte font sizes didn't match your regular font sizes for those
|
||||||
|
who don't actually use the multibyte support. So I fixed that. I
|
||||||
|
also fixed the XA_TEXT problem for people using old/broken X.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
|
|
@ -2409,7 +2409,7 @@ cmd_getc(void)
|
||||||
/* characters already read in */
|
/* characters already read in */
|
||||||
if (CHARS_READ()) {
|
if (CHARS_READ()) {
|
||||||
RETURN_CHAR();
|
RETURN_CHAR();
|
||||||
} else if (paused == 1) {
|
} else if (paused == 1 && cmd_fd == -1) {
|
||||||
const char *done = " -- Task Finished, ESC to exit";
|
const char *done = " -- Task Finished, ESC to exit";
|
||||||
|
|
||||||
append_to_title(done);
|
append_to_title(done);
|
||||||
|
|
|
@ -429,9 +429,9 @@ change_font(int init, const char *fontname)
|
||||||
|
|
||||||
fw = TermWin.font->min_bounds.width;
|
fw = TermWin.font->min_bounds.width;
|
||||||
#ifdef MULTI_CHARSET
|
#ifdef MULTI_CHARSET
|
||||||
fh = (MAX(TermWin.font->ascent, TermWin.mfont->ascent)
|
fh = (MAX((encoding_method == LATIN1 ? 0 : TermWin.mfont->ascent), TermWin.font->ascent)
|
||||||
+ MAX(TermWin.font->descent, TermWin.mfont->descent)
|
+ MAX((encoding_method == LATIN1 ? 0 : TermWin.mfont->descent), TermWin.font->descent)
|
||||||
+ rs_line_space);
|
+ rs_line_space);
|
||||||
#else
|
#else
|
||||||
fh = TermWin.font->ascent + TermWin.font->descent + rs_line_space;
|
fh = TermWin.font->ascent + TermWin.font->descent + rs_line_space;
|
||||||
#endif
|
#endif
|
||||||
|
|
14
src/screen.c
14
src/screen.c
|
@ -94,13 +94,11 @@ unsigned char refresh_all = 0;
|
||||||
|
|
||||||
#ifdef MULTI_CHARSET
|
#ifdef MULTI_CHARSET
|
||||||
static short multi_byte = 0;
|
static short multi_byte = 0;
|
||||||
static enum {
|
static short lost_multi = 0;
|
||||||
EUCJ, EUCKR = EUCJ, GB = EUCJ, SJIS, BIG5, LATIN1
|
|
||||||
} encoding_method = LATIN1;
|
|
||||||
static enum {
|
static enum {
|
||||||
SBYTE, WBYTE
|
SBYTE, WBYTE
|
||||||
} chstat = SBYTE;
|
} chstat = SBYTE;
|
||||||
static short lost_multi = 0;
|
encoding_t encoding_method = LATIN1;
|
||||||
|
|
||||||
#define RESET_CHSTAT if (chstat == WBYTE) chstat = SBYTE, lost_multi = 1
|
#define RESET_CHSTAT if (chstat == WBYTE) chstat = SBYTE, lost_multi = 1
|
||||||
#else
|
#else
|
||||||
|
@ -1897,8 +1895,8 @@ scr_refresh(int type)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MULTI_CHARSET
|
#ifdef MULTI_CHARSET
|
||||||
ascent = MAX(TermWin.mfont->ascent, TermWin.font->ascent);
|
ascent = MAX((encoding_method == LATIN1 ? 0 : TermWin.mfont->ascent), TermWin.font->ascent);
|
||||||
descent = MAX(TermWin.mfont->descent, TermWin.font->descent);
|
descent = MAX((encoding_method == LATIN1 ? 0 : TermWin.mfont->descent), TermWin.font->descent);
|
||||||
#else
|
#else
|
||||||
ascent = TermWin.font->ascent;
|
ascent = TermWin.font->ascent;
|
||||||
descent = TermWin.font->descent;
|
descent = TermWin.font->descent;
|
||||||
|
@ -3212,7 +3210,7 @@ selection_send(XSelectionRequestEvent * rq)
|
||||||
(unsigned char *) target_list,
|
(unsigned char *) target_list,
|
||||||
(sizeof(target_list) / sizeof(target_list[0])));
|
(sizeof(target_list) / sizeof(target_list[0])));
|
||||||
ev.xselection.property = rq->property;
|
ev.xselection.property = rq->property;
|
||||||
#ifdef MULTI_CHARSET
|
#if defined(MULTI_CHARSET) && defined(HAVE_X11_XMU_ATOMS_H)
|
||||||
} else if (rq->target == XA_STRING || rq->target == XA_TEXT(Xdisplay) || rq->target == XA_COMPOUND_TEXT(Xdisplay)) {
|
} else if (rq->target == XA_STRING || rq->target == XA_TEXT(Xdisplay) || rq->target == XA_COMPOUND_TEXT(Xdisplay)) {
|
||||||
XTextProperty xtextp;
|
XTextProperty xtextp;
|
||||||
char *l[1];
|
char *l[1];
|
||||||
|
@ -3325,7 +3323,7 @@ void xim_get_position(XPoint *pos)
|
||||||
}
|
}
|
||||||
pos->y = (Height2Pixel(screen.row)
|
pos->y = (Height2Pixel(screen.row)
|
||||||
# ifdef MULTI_CHARSET
|
# ifdef MULTI_CHARSET
|
||||||
+ MAX(TermWin.mfont->ascent, TermWin.font->ascent)
|
+ MAX((encoding_method == LATIN1 ? 0 : TermWin.mfont->ascent), TermWin.font->ascent)
|
||||||
# else
|
# else
|
||||||
+ TermWin.font->ascent
|
+ TermWin.font->ascent
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -160,6 +160,9 @@ typedef enum {
|
||||||
SELECTION_CONT,
|
SELECTION_CONT,
|
||||||
SELECTION_DONE
|
SELECTION_DONE
|
||||||
} selection_op_t;
|
} selection_op_t;
|
||||||
|
typedef enum {
|
||||||
|
LATIN1 = 0, EUCJ, EUCKR = EUCJ, GB = EUCJ, SJIS, BIG5
|
||||||
|
} encoding_t;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
short row, col;
|
short row, col;
|
||||||
} row_col_t;
|
} row_col_t;
|
||||||
|
@ -224,6 +227,9 @@ typedef struct {
|
||||||
extern unsigned int colorfgbg;
|
extern unsigned int colorfgbg;
|
||||||
#endif
|
#endif
|
||||||
extern unsigned char refresh_all;
|
extern unsigned char refresh_all;
|
||||||
|
#ifdef MULTI_CHARSET
|
||||||
|
extern encoding_t encoding_method;
|
||||||
|
#endif
|
||||||
|
|
||||||
/************ Function Prototypes ************/
|
/************ Function Prototypes ************/
|
||||||
_XFUNCPROTOBEGIN
|
_XFUNCPROTOBEGIN
|
||||||
|
|
Loading…
Reference in New Issue