diff options
| author | Po Lu | 2022-06-18 12:03:18 +0000 |
|---|---|---|
| committer | Po Lu | 2022-06-18 12:04:08 +0000 |
| commit | d7265d58f8dbab8049be4be0fa3f474e7fef7be6 (patch) | |
| tree | 3f5dfdd26e2368d369b4195b2fdac1f8c753f91a /src | |
| parent | 606275e91ec57cccabeb4ac2feb93753f734cb00 (diff) | |
| download | emacs-d7265d58f8dbab8049be4be0fa3f474e7fef7be6.tar.gz emacs-d7265d58f8dbab8049be4be0fa3f474e7fef7be6.zip | |
Remove unnecessary clearing of internal border on Haiku
* src/haikuterm.c (haiku_new_font): Don't clear internal border.
Diffstat (limited to 'src')
| -rw-r--r-- | src/haikuterm.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/haikuterm.c b/src/haikuterm.c index 365b23cd92c..a90955ebe73 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c | |||
| @@ -286,11 +286,16 @@ haiku_clear_frame (struct frame *f) | |||
| 286 | static Lisp_Object | 286 | static Lisp_Object |
| 287 | haiku_new_font (struct frame *f, Lisp_Object font_object, int fontset) | 287 | haiku_new_font (struct frame *f, Lisp_Object font_object, int fontset) |
| 288 | { | 288 | { |
| 289 | struct font *font = XFONT_OBJECT (font_object); | 289 | struct font *font; |
| 290 | int ascent, descent, unit; | ||
| 291 | |||
| 292 | font = XFONT_OBJECT (font_object); | ||
| 293 | |||
| 290 | if (fontset < 0) | 294 | if (fontset < 0) |
| 291 | fontset = fontset_from_font (font_object); | 295 | fontset = fontset_from_font (font_object); |
| 292 | 296 | ||
| 293 | FRAME_FONTSET (f) = fontset; | 297 | FRAME_FONTSET (f) = fontset; |
| 298 | |||
| 294 | if (FRAME_FONT (f) == font) | 299 | if (FRAME_FONT (f) == font) |
| 295 | return font_object; | 300 | return font_object; |
| 296 | 301 | ||
| @@ -298,12 +303,11 @@ haiku_new_font (struct frame *f, Lisp_Object font_object, int fontset) | |||
| 298 | FRAME_BASELINE_OFFSET (f) = font->baseline_offset; | 303 | FRAME_BASELINE_OFFSET (f) = font->baseline_offset; |
| 299 | FRAME_COLUMN_WIDTH (f) = font->average_width; | 304 | FRAME_COLUMN_WIDTH (f) = font->average_width; |
| 300 | 305 | ||
| 301 | int ascent, descent; | ||
| 302 | get_font_ascent_descent (font, &ascent, &descent); | 306 | get_font_ascent_descent (font, &ascent, &descent); |
| 303 | FRAME_LINE_HEIGHT (f) = ascent + descent; | 307 | FRAME_LINE_HEIGHT (f) = ascent + descent; |
| 304 | FRAME_TAB_BAR_HEIGHT (f) = FRAME_TAB_BAR_LINES (f) * FRAME_LINE_HEIGHT (f); | 308 | FRAME_TAB_BAR_HEIGHT (f) = FRAME_TAB_BAR_LINES (f) * FRAME_LINE_HEIGHT (f); |
| 305 | 309 | ||
| 306 | int unit = FRAME_COLUMN_WIDTH (f); | 310 | unit = FRAME_COLUMN_WIDTH (f); |
| 307 | if (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0) | 311 | if (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0) |
| 308 | FRAME_CONFIG_SCROLL_BAR_COLS (f) | 312 | FRAME_CONFIG_SCROLL_BAR_COLS (f) |
| 309 | = (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) + unit - 1) / unit; | 313 | = (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) + unit - 1) / unit; |
| @@ -311,13 +315,10 @@ haiku_new_font (struct frame *f, Lisp_Object font_object, int fontset) | |||
| 311 | FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + unit - 1) / unit; | 315 | FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + unit - 1) / unit; |
| 312 | 316 | ||
| 313 | if (FRAME_HAIKU_WINDOW (f) && !FRAME_TOOLTIP_P (f)) | 317 | if (FRAME_HAIKU_WINDOW (f) && !FRAME_TOOLTIP_P (f)) |
| 314 | { | 318 | adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f), |
| 315 | adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f), | 319 | FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), |
| 316 | FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), | 320 | 3, false, Qfont); |
| 317 | 3, false, Qfont); | ||
| 318 | 321 | ||
| 319 | haiku_clear_under_internal_border (f); | ||
| 320 | } | ||
| 321 | return font_object; | 322 | return font_object; |
| 322 | } | 323 | } |
| 323 | 324 | ||