Mercurial > hg > xemacs-beta
comparison src/redisplay.c @ 5047:07dcc7000bbf
put width before height consistently, fix a real bug found in the process
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-02-20 Ben Wing <ben@xemacs.org>
* EmacsFrame.c (EmacsFrameRecomputeCellSize):
* faces.c (default_face_font_info):
* faces.c (default_face_width_and_height):
* faces.c (Fface_list):
* faces.h:
* frame-gtk.c (gtk_set_initial_frame_size):
* frame-gtk.c (gtk_set_frame_size):
* frame-gtk.c (gtk_recompute_cell_sizes):
* frame.c:
* frame.c (frame_conversion_internal_1):
* frame.c (change_frame_size_1):
* frame.c (change_frame_size):
* glyphs-msw.c (mswindows_combo_box_instantiate):
* glyphs-widget.c (widget_instantiate):
* glyphs-widget.c (tree_view_query_geometry):
* glyphs-widget.c (Fwidget_logical_to_character_width):
* glyphs-widget.c (Fwidget_logical_to_character_height):
* indent.c (vmotion_pixels):
* redisplay-output.c (get_cursor_size_and_location):
* redisplay-xlike-inc.c (XLIKE_output_eol_cursor):
* redisplay-xlike-inc.c (XLIKE_flash):
* redisplay.c (calculate_baseline):
* redisplay.c (start_with_point_on_display_line):
* redisplay.c (glyph_to_pixel_translation):
* redisplay.c (pixel_to_glyph_translation):
* window.c (margin_width_internal):
* window.c (frame_size_valid_p):
* window.c (frame_pixsize_valid_p):
* window.c (check_frame_size):
* window.c (set_window_pixsize):
* window.c (window_pixel_height_to_char_height):
* window.c (window_char_height_to_pixel_height):
* window.c (window_displayed_height):
* window.c (window_pixel_width_to_char_width):
* window.c (window_char_width_to_pixel_width):
* window.c (change_window_height):
* window.c (window_scroll):
* window.h:
IMPORTANT: Aidan and Carbon Repo, please pay attention and fix
appropriately!
Rename: default_face_height_and_width -> default_face_width_and_height
and reverse width/height arguments.
Reverse width/height arguments to the following functions:
-- default_face_font_info
-- default_face_height_and_width (see above)
-- check_frame_size
-- frame_size_valid_p (made into a static function)
Fix a redisplay bug where args to default_face_height_and_width
were in the wrong order.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sat, 20 Feb 2010 18:56:01 -0600 |
parents | d0c14ea98592 |
children | 548f1f47eb82 |
comparison
equal
deleted
inserted
replaced
5046:d4f666cda5e6 | 5047:07dcc7000bbf |
---|---|
922 { | 922 { |
923 int default_font_ascent, default_font_descent, default_font_height; | 923 int default_font_ascent, default_font_descent, default_font_height; |
924 int scaled_default_font_ascent, scaled_default_font_descent; | 924 int scaled_default_font_ascent, scaled_default_font_descent; |
925 | 925 |
926 default_face_font_info (data->window, &default_font_ascent, | 926 default_face_font_info (data->window, &default_font_ascent, |
927 &default_font_descent, &default_font_height, | 927 &default_font_descent, 0, &default_font_height, |
928 0, 0); | 928 0); |
929 | 929 |
930 scaled_default_font_ascent = data->max_pixmap_height * | 930 scaled_default_font_ascent = data->max_pixmap_height * |
931 default_font_ascent / default_font_height; | 931 default_font_ascent / default_font_height; |
932 | 932 |
933 data->new_ascent = max (data->new_ascent, scaled_default_font_ascent); | 933 data->new_ascent = max (data->new_ascent, scaled_default_font_ascent); |
8314 (cur_elt + new_line) - Dynarr_length (w->line_start_cache) + 1; | 8314 (cur_elt + new_line) - Dynarr_length (w->line_start_cache) + 1; |
8315 Lisp_Object window; | 8315 Lisp_Object window; |
8316 int defheight; | 8316 int defheight; |
8317 | 8317 |
8318 window = wrap_window (w); | 8318 window = wrap_window (w); |
8319 default_face_height_and_width (window, &defheight, 0); | 8319 default_face_width_and_height (window, 0, &defheight); |
8320 | 8320 |
8321 cur_elt = Dynarr_length (w->line_start_cache) - 1; | 8321 cur_elt = Dynarr_length (w->line_start_cache) - 1; |
8322 | 8322 |
8323 pixpos -= (adjustment * defheight); | 8323 pixpos -= (adjustment * defheight); |
8324 if (pixpos < WINDOW_TEXT_TOP (w)) | 8324 if (pixpos < WINDOW_TEXT_TOP (w)) |
8619 int num_disp_lines, modeline; | 8619 int num_disp_lines, modeline; |
8620 Lisp_Object window; | 8620 Lisp_Object window; |
8621 int defheight, defwidth; | 8621 int defheight, defwidth; |
8622 | 8622 |
8623 window = wrap_window (w); | 8623 window = wrap_window (w); |
8624 default_face_height_and_width (window, &defheight, &defwidth); | 8624 default_face_width_and_height (window, &defwidth, &defheight); |
8625 | 8625 |
8626 /* If we get a bogus value indicating somewhere above or to the left of | 8626 /* If we get a bogus value indicating somewhere above or to the left of |
8627 the window, use the first window line or character position | 8627 the window, use the first window line or character position |
8628 instead. */ | 8628 instead. */ |
8629 if (char_y < 0) | 8629 if (char_y < 0) |
9288 int adj_area = y_coord - (dl->ypos + dl->descent); | 9288 int adj_area = y_coord - (dl->ypos + dl->descent); |
9289 Lisp_Object lwin; | 9289 Lisp_Object lwin; |
9290 int defheight; | 9290 int defheight; |
9291 | 9291 |
9292 lwin = wrap_window (*w); | 9292 lwin = wrap_window (*w); |
9293 default_face_height_and_width (lwin, 0, &defheight); | 9293 default_face_width_and_height (lwin, 0, &defheight); |
9294 | 9294 |
9295 *row += (adj_area / defheight); | 9295 *row += (adj_area / defheight); |
9296 } | 9296 } |
9297 } | 9297 } |
9298 | 9298 |