comparison src/ChangeLog @ 5043:d0c14ea98592

various frame-geometry fixes -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-02-15 Ben Wing <ben@xemacs.org> * EmacsFrame.c: * EmacsFrame.c (EmacsFrameResize): * console-msw-impl.h: * console-msw-impl.h (struct mswindows_frame): * console-msw-impl.h (FRAME_MSWINDOWS_TARGET_RECT): * device-tty.c: * device-tty.c (tty_asynch_device_change): * event-msw.c: * event-msw.c (mswindows_wnd_proc): * faces.c (Fface_list): * faces.h: * frame-gtk.c: * frame-gtk.c (gtk_set_initial_frame_size): * frame-gtk.c (gtk_set_frame_size): * frame-msw.c: * frame-msw.c (mswindows_init_frame_1): * frame-msw.c (mswindows_set_frame_size): * frame-msw.c (mswindows_size_frame_internal): * frame-msw.c (msprinter_init_frame_3): * frame.c: * frame.c (enum): * frame.c (Fmake_frame): * frame.c (adjust_frame_size): * frame.c (store_minibuf_frame_prop): * frame.c (Fframe_property): * frame.c (Fframe_properties): * frame.c (Fframe_displayable_pixel_height): * frame.c (Fframe_displayable_pixel_width): * frame.c (internal_set_frame_size): * frame.c (Fset_frame_height): * frame.c (Fset_frame_pixel_height): * frame.c (Fset_frame_displayable_pixel_height): * frame.c (Fset_frame_width): * frame.c (Fset_frame_pixel_width): * frame.c (Fset_frame_displayable_pixel_width): * frame.c (Fset_frame_size): * frame.c (Fset_frame_pixel_size): * frame.c (Fset_frame_displayable_pixel_size): * frame.c (frame_conversion_internal_1): * frame.c (get_frame_displayable_pixel_size): * frame.c (change_frame_size_1): * frame.c (change_frame_size): * frame.c (generate_title_string): * frame.h: * gtk-xemacs.c: * gtk-xemacs.c (gtk_xemacs_size_request): * gtk-xemacs.c (gtk_xemacs_size_allocate): * gtk-xemacs.c (gtk_xemacs_paint): * gutter.c: * gutter.c (update_gutter_geometry): * redisplay.c (end_hold_frame_size_changes): * redisplay.c (redisplay_frame): * toolbar.c: * toolbar.c (update_frame_toolbars_geometry): * window.c: * window.c (frame_pixsize_valid_p): * window.c (check_frame_size): Various fixes to frame geometry to make it a bit easier to understand and fix some bugs. 1. IMPORTANT: Some renamings. Will need to be applied carefully to the carbon repository, in the following order: -- pixel_to_char_size -> pixel_to_frame_unit_size -- char_to_pixel_size -> frame_unit_to_pixel_size -- pixel_to_real_char_size -> pixel_to_char_size -- char_to_real_pixel_size -> char_to_pixel_size -- Reverse second and third arguments of change_frame_size() and change_frame_size_1() to try to make functions consistent in putting width before height. -- Eliminate old round_size_to_char, because it didn't really do anything differently from round_size_to_real_char() -- round_size_to_real_char -> round_size_to_char; any places that called the old round_size_to_char should just call the new one. 2. IMPORTANT FOR CARBON: The set_frame_size() method is now passed sizes in "frame units", like all other frame-sizing functions, rather than some hacked-up combination of char-cell units and total pixel size. This only affects window systems that use "pixelated geometry", and I'm not sure if Carbon is one of them. MS Windows is pixelated, X and GTK are not. For pixelated-geometry systems, the size in set_frame_size() is in displayable pixels rather than total pixels and needs to be converted appropriately; take a look at the changes made to mswindows_set_frame_size() method if necessary. 3. Add a big long comment in frame.c describing how frame geometry works. 4. Remove MS Windows-specific character height and width fields, duplicative and unused. 5. frame-displayable-pixel-* and set-frame-displayable-pixel-* didn't use to work on MS Windows, but they do now. 6. In general, clean up the handling of "pixelated geometry" so that fewer functions have to worry about this. This is really an abomination that should be removed entirely but that will have to happen later. Fix some buggy code in frame_conversion_internal() that happened to "work" because it was countered by oppositely buggy code in change_frame_size(). 7. Clean up some frame-size code in toolbar.c and use functions already provided in frame.c instead of rolling its own. 8. Fix check_frame_size() in window.c, which formerly didn't take pixelated geometry into account.
author Ben Wing <ben@xemacs.org>
date Mon, 15 Feb 2010 22:14:11 -0600
parents f395ee7ad844
children e84a30b0e4a2
comparison
equal deleted inserted replaced
5042:f395ee7ad844 5043:d0c14ea98592
1 2010-02-15 Ben Wing <ben@xemacs.org>
2
3 * EmacsFrame.c:
4 * EmacsFrame.c (EmacsFrameResize):
5 * console-msw-impl.h:
6 * console-msw-impl.h (struct mswindows_frame):
7 * console-msw-impl.h (FRAME_MSWINDOWS_TARGET_RECT):
8 * device-tty.c:
9 * device-tty.c (tty_asynch_device_change):
10 * event-msw.c:
11 * event-msw.c (mswindows_wnd_proc):
12 * faces.c (Fface_list):
13 * faces.h:
14 * frame-gtk.c:
15 * frame-gtk.c (gtk_set_initial_frame_size):
16 * frame-gtk.c (gtk_set_frame_size):
17 * frame-msw.c:
18 * frame-msw.c (mswindows_init_frame_1):
19 * frame-msw.c (mswindows_set_frame_size):
20 * frame-msw.c (mswindows_size_frame_internal):
21 * frame-msw.c (msprinter_init_frame_3):
22 * frame.c:
23 * frame.c (enum):
24 * frame.c (Fmake_frame):
25 * frame.c (adjust_frame_size):
26 * frame.c (store_minibuf_frame_prop):
27 * frame.c (Fframe_property):
28 * frame.c (Fframe_properties):
29 * frame.c (Fframe_displayable_pixel_height):
30 * frame.c (Fframe_displayable_pixel_width):
31 * frame.c (internal_set_frame_size):
32 * frame.c (Fset_frame_height):
33 * frame.c (Fset_frame_pixel_height):
34 * frame.c (Fset_frame_displayable_pixel_height):
35 * frame.c (Fset_frame_width):
36 * frame.c (Fset_frame_pixel_width):
37 * frame.c (Fset_frame_displayable_pixel_width):
38 * frame.c (Fset_frame_size):
39 * frame.c (Fset_frame_pixel_size):
40 * frame.c (Fset_frame_displayable_pixel_size):
41 * frame.c (frame_conversion_internal_1):
42 * frame.c (get_frame_displayable_pixel_size):
43 * frame.c (change_frame_size_1):
44 * frame.c (change_frame_size):
45 * frame.c (generate_title_string):
46 * frame.h:
47 * gtk-xemacs.c:
48 * gtk-xemacs.c (gtk_xemacs_size_request):
49 * gtk-xemacs.c (gtk_xemacs_size_allocate):
50 * gtk-xemacs.c (gtk_xemacs_paint):
51 * gutter.c:
52 * gutter.c (update_gutter_geometry):
53 * redisplay.c (end_hold_frame_size_changes):
54 * redisplay.c (redisplay_frame):
55 * toolbar.c:
56 * toolbar.c (update_frame_toolbars_geometry):
57 * window.c:
58 * window.c (frame_pixsize_valid_p):
59 * window.c (check_frame_size):
60 Various fixes to frame geometry to make it a bit easier to understand
61 and fix some bugs.
62
63 1. IMPORTANT: Some renamings. Will need to be applied carefully to
64 the carbon repository, in the following order:
65
66 -- pixel_to_char_size -> pixel_to_frame_unit_size
67 -- char_to_pixel_size -> frame_unit_to_pixel_size
68 -- pixel_to_real_char_size -> pixel_to_char_size
69 -- char_to_real_pixel_size -> char_to_pixel_size
70 -- Reverse second and third arguments of change_frame_size() and
71 change_frame_size_1() to try to make functions consistent in
72 putting width before height.
73 -- Eliminate old round_size_to_char, because it didn't really
74 do anything differently from round_size_to_real_char()
75 -- round_size_to_real_char -> round_size_to_char; any places that
76 called the old round_size_to_char should just call the new one.
77
78 2. IMPORTANT FOR CARBON: The set_frame_size() method is now passed
79 sizes in "frame units", like all other frame-sizing functions,
80 rather than some hacked-up combination of char-cell units and
81 total pixel size. This only affects window systems that use
82 "pixelated geometry", and I'm not sure if Carbon is one of them.
83 MS Windows is pixelated, X and GTK are not. For pixelated-geometry
84 systems, the size in set_frame_size() is in displayable pixels
85 rather than total pixels and needs to be converted appropriately;
86 take a look at the changes made to mswindows_set_frame_size()
87 method if necessary.
88
89 3. Add a big long comment in frame.c describing how frame geometry
90 works.
91
92 4. Remove MS Windows-specific character height and width fields,
93 duplicative and unused.
94
95 5. frame-displayable-pixel-* and set-frame-displayable-pixel-*
96 didn't use to work on MS Windows, but they do now.
97
98 6. In general, clean up the handling of "pixelated geometry" so
99 that fewer functions have to worry about this. This is really
100 an abomination that should be removed entirely but that will
101 have to happen later. Fix some buggy code in
102 frame_conversion_internal() that happened to "work" because it
103 was countered by oppositely buggy code in change_frame_size().
104
105 7. Clean up some frame-size code in toolbar.c and use functions
106 already provided in frame.c instead of rolling its own.
107
108 8. Fix check_frame_size() in window.c, which formerly didn't take
109 pixelated geometry into account.
110
111
1 2010-02-15 Ben Wing <ben@xemacs.org> 112 2010-02-15 Ben Wing <ben@xemacs.org>
2 113
3 * mc-alloc.c: 114 * mc-alloc.c:
4 * mc-alloc.c (mc_realloc_1): 115 * mc-alloc.c (mc_realloc_1):
5 * mc-alloc.c (set_dirty_bit): 116 * mc-alloc.c (set_dirty_bit):