Fixes from Bill Allombert at Debian:

fl_ prefix for filename functions in fltk1.
Turns off visible_focus() (really click-to-focus on buttons) in fltk1.
Rotated code works for fonts where fontstruct->per_char is NULL.
This commit is contained in:
Bill Spitzak
2005-09-19 04:37:51 +00:00
parent 1ac5675242
commit 7664787676
2 changed files with 14 additions and 12 deletions

View File

@ -121,18 +121,19 @@ XRotLoadFont(Display *dpy, XFontStruct* fontstruct, int dir)
for (ichar = min_char; ichar <= max_char; ichar++) {
index = ichar-fontstruct->min_char_or_byte2;
XCharStruct* charstruct;
if (fontstruct->per_char)
charstruct = fontstruct->per_char+index;
else
charstruct = &fontstruct->min_bounds;
/* per char dimensions ... */
ascent = rotfont->per_char[ichar].ascent =
fontstruct->per_char[index].ascent;
descent = rotfont->per_char[ichar].descent =
fontstruct->per_char[index].descent;
lbearing = rotfont->per_char[ichar].lbearing =
fontstruct->per_char[index].lbearing;
rbearing = rotfont->per_char[ichar].rbearing =
fontstruct->per_char[index].rbearing;
rotfont->per_char[ichar].width =
fontstruct->per_char[index].width;
ascent = rotfont->per_char[ichar].ascent = charstruct->ascent;
descent = rotfont->per_char[ichar].descent = charstruct->descent;
lbearing = rotfont->per_char[ichar].lbearing = charstruct->lbearing;
rbearing = rotfont->per_char[ichar].rbearing = charstruct->rbearing;
rotfont->per_char[ichar].width = charstruct->width;
/* some space chars have zero body, but a bitmap can't have ... */
if (!ascent && !descent)

3
main.C
View File

@ -238,6 +238,7 @@ static void initialize() {
#else
Root->cursor((Fl_Cursor)cursor, CURSOR_FG_SLOT, CURSOR_BG_SLOT);
#endif
Fl::visible_focus(0);
#ifdef TITLE_FONT
Fl::set_font(TITLE_FONT_SLOT, TITLE_FONT);
@ -369,7 +370,7 @@ static void color_setup(Fl_Color slot, const char* arg, ulong value) {
#endif
int main(int argc, char** argv) {
program_name = filename_name(argv[0]);
program_name = fl_filename_name(argv[0]);
int i; if (Fl::args(argc, argv, i, arg) < argc) Fl::error(
"options are:\n"
" -d[isplay] host:#.#\tX display & screen to use\n"