diff options
Diffstat (limited to 'src/macterm.c')
| -rw-r--r-- | src/macterm.c | 516 |
1 files changed, 169 insertions, 347 deletions
diff --git a/src/macterm.c b/src/macterm.c index 7c946a9fd3f..5696f13e5a0 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -77,7 +77,6 @@ Boston, MA 02110-1301, USA. */ | |||
| 77 | #include "termhooks.h" | 77 | #include "termhooks.h" |
| 78 | #include "termopts.h" | 78 | #include "termopts.h" |
| 79 | #include "termchar.h" | 79 | #include "termchar.h" |
| 80 | #include "gnu.h" | ||
| 81 | #include "disptab.h" | 80 | #include "disptab.h" |
| 82 | #include "buffer.h" | 81 | #include "buffer.h" |
| 83 | #include "window.h" | 82 | #include "window.h" |
| @@ -215,7 +214,6 @@ QDGlobals qd; /* QuickDraw global information structure. */ | |||
| 215 | 214 | ||
| 216 | struct mac_display_info *mac_display_info_for_display (Display *); | 215 | struct mac_display_info *mac_display_info_for_display (Display *); |
| 217 | static void x_update_window_end P_ ((struct window *, int, int)); | 216 | static void x_update_window_end P_ ((struct window *, int, int)); |
| 218 | static int x_io_error_quitter P_ ((Display *)); | ||
| 219 | int x_catch_errors P_ ((Display *)); | 217 | int x_catch_errors P_ ((Display *)); |
| 220 | void x_uncatch_errors P_ ((Display *, int)); | 218 | void x_uncatch_errors P_ ((Display *, int)); |
| 221 | void x_lower_frame P_ ((struct frame *)); | 219 | void x_lower_frame P_ ((struct frame *)); |
| @@ -1510,11 +1508,8 @@ XCreateGC (display, window, mask, xgcv) | |||
| 1510 | { | 1508 | { |
| 1511 | GC gc = xmalloc (sizeof (*gc)); | 1509 | GC gc = xmalloc (sizeof (*gc)); |
| 1512 | 1510 | ||
| 1513 | if (gc) | 1511 | bzero (gc, sizeof (*gc)); |
| 1514 | { | 1512 | XChangeGC (display, gc, mask, xgcv); |
| 1515 | bzero (gc, sizeof (*gc)); | ||
| 1516 | XChangeGC (display, gc, mask, xgcv); | ||
| 1517 | } | ||
| 1518 | 1513 | ||
| 1519 | return gc; | 1514 | return gc; |
| 1520 | } | 1515 | } |
| @@ -1697,14 +1692,6 @@ XSetWindowBackground (display, w, color) | |||
| 1697 | #endif | 1692 | #endif |
| 1698 | } | 1693 | } |
| 1699 | 1694 | ||
| 1700 | /* x_sync is a no-op on Mac. */ | ||
| 1701 | void | ||
| 1702 | x_sync (f) | ||
| 1703 | void *f; | ||
| 1704 | { | ||
| 1705 | } | ||
| 1706 | |||
| 1707 | |||
| 1708 | /* Flush display of frame F, or of all frames if F is null. */ | 1695 | /* Flush display of frame F, or of all frames if F is null. */ |
| 1709 | 1696 | ||
| 1710 | static void | 1697 | static void |
| @@ -2080,7 +2067,6 @@ mac_define_fringe_bitmap (which, bits, h, wd) | |||
| 2080 | unsigned short *bits; | 2067 | unsigned short *bits; |
| 2081 | int h, wd; | 2068 | int h, wd; |
| 2082 | { | 2069 | { |
| 2083 | unsigned short *mask_bits; | ||
| 2084 | int i; | 2070 | int i; |
| 2085 | CGDataProviderRef provider; | 2071 | CGDataProviderRef provider; |
| 2086 | 2072 | ||
| @@ -2171,21 +2157,17 @@ x_per_char_metric (font, char2b) | |||
| 2171 | if (*row == NULL) | 2157 | if (*row == NULL) |
| 2172 | { | 2158 | { |
| 2173 | *row = xmalloc (sizeof (XCharStructRow)); | 2159 | *row = xmalloc (sizeof (XCharStructRow)); |
| 2174 | if (*row) | 2160 | bzero (*row, sizeof (XCharStructRow)); |
| 2175 | bzero (*row, sizeof (XCharStructRow)); | ||
| 2176 | } | 2161 | } |
| 2177 | if (*row) | 2162 | pcm = (*row)->per_char + char2b->byte2; |
| 2163 | if (!XCHARSTRUCTROW_CHAR_VALID_P (*row, char2b->byte2)) | ||
| 2178 | { | 2164 | { |
| 2179 | pcm = (*row)->per_char + char2b->byte2; | 2165 | BLOCK_INPUT; |
| 2180 | if (!XCHARSTRUCTROW_CHAR_VALID_P (*row, char2b->byte2)) | 2166 | mac_query_char_extents (font->mac_style, |
| 2181 | { | 2167 | (char2b->byte1 << 8) + char2b->byte2, |
| 2182 | BLOCK_INPUT; | 2168 | NULL, NULL, pcm, NULL); |
| 2183 | mac_query_char_extents (font->mac_style, | 2169 | UNBLOCK_INPUT; |
| 2184 | (char2b->byte1 << 8) + char2b->byte2, | 2170 | XCHARSTRUCTROW_SET_CHAR_VALID (*row, char2b->byte2); |
| 2185 | NULL, NULL, pcm, NULL); | ||
| 2186 | UNBLOCK_INPUT; | ||
| 2187 | XCHARSTRUCTROW_SET_CHAR_VALID (*row, char2b->byte2); | ||
| 2188 | } | ||
| 2189 | } | 2171 | } |
| 2190 | } | 2172 | } |
| 2191 | else | 2173 | else |
| @@ -2366,7 +2348,6 @@ static void x_setup_relief_colors P_ ((struct glyph_string *)); | |||
| 2366 | static void x_draw_image_glyph_string P_ ((struct glyph_string *)); | 2348 | static void x_draw_image_glyph_string P_ ((struct glyph_string *)); |
| 2367 | static void x_draw_image_relief P_ ((struct glyph_string *)); | 2349 | static void x_draw_image_relief P_ ((struct glyph_string *)); |
| 2368 | static void x_draw_image_foreground P_ ((struct glyph_string *)); | 2350 | static void x_draw_image_foreground P_ ((struct glyph_string *)); |
| 2369 | static void x_draw_image_foreground_1 P_ ((struct glyph_string *, Pixmap)); | ||
| 2370 | static void x_clear_glyph_string_rect P_ ((struct glyph_string *, int, | 2351 | static void x_clear_glyph_string_rect P_ ((struct glyph_string *, int, |
| 2371 | int, int, int)); | 2352 | int, int, int)); |
| 2372 | static void x_draw_relief_rect P_ ((struct frame *, int, int, int, int, | 2353 | static void x_draw_relief_rect P_ ((struct frame *, int, int, int, int, |
| @@ -2567,34 +2548,36 @@ static void | |||
| 2567 | mac_compute_glyph_string_overhangs (s) | 2548 | mac_compute_glyph_string_overhangs (s) |
| 2568 | struct glyph_string *s; | 2549 | struct glyph_string *s; |
| 2569 | { | 2550 | { |
| 2570 | if (s->cmp == NULL | 2551 | if (!(s->cmp == NULL |
| 2571 | && s->first_glyph->type == CHAR_GLYPH) | 2552 | && s->first_glyph->type == CHAR_GLYPH)) |
| 2572 | if (!s->two_byte_p | 2553 | return; |
| 2554 | |||
| 2555 | if (!s->two_byte_p | ||
| 2573 | #if USE_ATSUI | 2556 | #if USE_ATSUI |
| 2574 | || s->font->mac_style | 2557 | || s->font->mac_style |
| 2575 | #endif | 2558 | #endif |
| 2576 | ) | 2559 | ) |
| 2577 | { | 2560 | { |
| 2578 | XCharStruct cs; | 2561 | XCharStruct cs; |
| 2579 | 2562 | ||
| 2580 | mac_text_extents_16 (s->font, s->char2b, s->nchars, &cs); | 2563 | mac_text_extents_16 (s->font, s->char2b, s->nchars, &cs); |
| 2581 | s->right_overhang = cs.rbearing > cs.width ? cs.rbearing - cs.width : 0; | 2564 | s->right_overhang = cs.rbearing > cs.width ? cs.rbearing - cs.width : 0; |
| 2582 | s->left_overhang = cs.lbearing < 0 ? -cs.lbearing : 0; | 2565 | s->left_overhang = cs.lbearing < 0 ? -cs.lbearing : 0; |
| 2583 | } | 2566 | } |
| 2584 | else | 2567 | else |
| 2585 | { | 2568 | { |
| 2586 | Rect r; | 2569 | Rect r; |
| 2587 | MacFontStruct *font = s->font; | 2570 | MacFontStruct *font = s->font; |
| 2588 | 2571 | ||
| 2589 | TextFont (font->mac_fontnum); | 2572 | TextFont (font->mac_fontnum); |
| 2590 | TextSize (font->mac_fontsize); | 2573 | TextSize (font->mac_fontsize); |
| 2591 | TextFace (font->mac_fontface); | 2574 | TextFace (font->mac_fontface); |
| 2592 | 2575 | ||
| 2593 | QDTextBounds (s->nchars * 2, (char *)s->char2b, &r); | 2576 | QDTextBounds (s->nchars * 2, (char *)s->char2b, &r); |
| 2594 | 2577 | ||
| 2595 | s->right_overhang = r.right > s->width ? r.right - s->width : 0; | 2578 | s->right_overhang = r.right > s->width ? r.right - s->width : 0; |
| 2596 | s->left_overhang = r.left < 0 ? -r.left : 0; | 2579 | s->left_overhang = r.left < 0 ? -r.left : 0; |
| 2597 | } | 2580 | } |
| 2598 | } | 2581 | } |
| 2599 | 2582 | ||
| 2600 | 2583 | ||
| @@ -3430,7 +3413,6 @@ x_draw_image_glyph_string (s) | |||
| 3430 | int box_line_hwidth = abs (s->face->box_line_width); | 3413 | int box_line_hwidth = abs (s->face->box_line_width); |
| 3431 | int box_line_vwidth = max (s->face->box_line_width, 0); | 3414 | int box_line_vwidth = max (s->face->box_line_width, 0); |
| 3432 | int height; | 3415 | int height; |
| 3433 | Pixmap pixmap = 0; | ||
| 3434 | 3416 | ||
| 3435 | height = s->height - 2 * box_line_vwidth; | 3417 | height = s->height - 2 * box_line_vwidth; |
| 3436 | 3418 | ||
| @@ -4176,142 +4158,6 @@ x_frame_rehighlight (dpyinfo) | |||
| 4176 | 4158 | ||
| 4177 | 4159 | ||
| 4178 | 4160 | ||
| 4179 | /* Keyboard processing - modifier keys, vendor-specific keysyms, etc. */ | ||
| 4180 | |||
| 4181 | #if 0 /* MAC_TODO */ | ||
| 4182 | /* Initialize mode_switch_bit and modifier_meaning. */ | ||
| 4183 | static void | ||
| 4184 | x_find_modifier_meanings (dpyinfo) | ||
| 4185 | struct x_display_info *dpyinfo; | ||
| 4186 | { | ||
| 4187 | int min_code, max_code; | ||
| 4188 | KeySym *syms; | ||
| 4189 | int syms_per_code; | ||
| 4190 | XModifierKeymap *mods; | ||
| 4191 | |||
| 4192 | dpyinfo->meta_mod_mask = 0; | ||
| 4193 | dpyinfo->shift_lock_mask = 0; | ||
| 4194 | dpyinfo->alt_mod_mask = 0; | ||
| 4195 | dpyinfo->super_mod_mask = 0; | ||
| 4196 | dpyinfo->hyper_mod_mask = 0; | ||
| 4197 | |||
| 4198 | #ifdef HAVE_X11R4 | ||
| 4199 | XDisplayKeycodes (dpyinfo->display, &min_code, &max_code); | ||
| 4200 | #else | ||
| 4201 | min_code = dpyinfo->display->min_keycode; | ||
| 4202 | max_code = dpyinfo->display->max_keycode; | ||
| 4203 | #endif | ||
| 4204 | |||
| 4205 | syms = XGetKeyboardMapping (dpyinfo->display, | ||
| 4206 | min_code, max_code - min_code + 1, | ||
| 4207 | &syms_per_code); | ||
| 4208 | mods = XGetModifierMapping (dpyinfo->display); | ||
| 4209 | |||
| 4210 | /* Scan the modifier table to see which modifier bits the Meta and | ||
| 4211 | Alt keysyms are on. */ | ||
| 4212 | { | ||
| 4213 | int row, col; /* The row and column in the modifier table. */ | ||
| 4214 | |||
| 4215 | for (row = 3; row < 8; row++) | ||
| 4216 | for (col = 0; col < mods->max_keypermod; col++) | ||
| 4217 | { | ||
| 4218 | KeyCode code | ||
| 4219 | = mods->modifiermap[(row * mods->max_keypermod) + col]; | ||
| 4220 | |||
| 4221 | /* Zeroes are used for filler. Skip them. */ | ||
| 4222 | if (code == 0) | ||
| 4223 | continue; | ||
| 4224 | |||
| 4225 | /* Are any of this keycode's keysyms a meta key? */ | ||
| 4226 | { | ||
| 4227 | int code_col; | ||
| 4228 | |||
| 4229 | for (code_col = 0; code_col < syms_per_code; code_col++) | ||
| 4230 | { | ||
| 4231 | int sym = syms[((code - min_code) * syms_per_code) + code_col]; | ||
| 4232 | |||
| 4233 | switch (sym) | ||
| 4234 | { | ||
| 4235 | case XK_Meta_L: | ||
| 4236 | case XK_Meta_R: | ||
| 4237 | dpyinfo->meta_mod_mask |= (1 << row); | ||
| 4238 | break; | ||
| 4239 | |||
| 4240 | case XK_Alt_L: | ||
| 4241 | case XK_Alt_R: | ||
| 4242 | dpyinfo->alt_mod_mask |= (1 << row); | ||
| 4243 | break; | ||
| 4244 | |||
| 4245 | case XK_Hyper_L: | ||
| 4246 | case XK_Hyper_R: | ||
| 4247 | dpyinfo->hyper_mod_mask |= (1 << row); | ||
| 4248 | break; | ||
| 4249 | |||
| 4250 | case XK_Super_L: | ||
| 4251 | case XK_Super_R: | ||
| 4252 | dpyinfo->super_mod_mask |= (1 << row); | ||
| 4253 | break; | ||
| 4254 | |||
| 4255 | case XK_Shift_Lock: | ||
| 4256 | /* Ignore this if it's not on the lock modifier. */ | ||
| 4257 | if ((1 << row) == LockMask) | ||
| 4258 | dpyinfo->shift_lock_mask = LockMask; | ||
| 4259 | break; | ||
| 4260 | } | ||
| 4261 | } | ||
| 4262 | } | ||
| 4263 | } | ||
| 4264 | } | ||
| 4265 | |||
| 4266 | /* If we couldn't find any meta keys, accept any alt keys as meta keys. */ | ||
| 4267 | if (! dpyinfo->meta_mod_mask) | ||
| 4268 | { | ||
| 4269 | dpyinfo->meta_mod_mask = dpyinfo->alt_mod_mask; | ||
| 4270 | dpyinfo->alt_mod_mask = 0; | ||
| 4271 | } | ||
| 4272 | |||
| 4273 | /* If some keys are both alt and meta, | ||
| 4274 | make them just meta, not alt. */ | ||
| 4275 | if (dpyinfo->alt_mod_mask & dpyinfo->meta_mod_mask) | ||
| 4276 | { | ||
| 4277 | dpyinfo->alt_mod_mask &= ~dpyinfo->meta_mod_mask; | ||
| 4278 | } | ||
| 4279 | |||
| 4280 | XFree ((char *) syms); | ||
| 4281 | XFreeModifiermap (mods); | ||
| 4282 | } | ||
| 4283 | |||
| 4284 | #endif /* MAC_TODO */ | ||
| 4285 | |||
| 4286 | /* Convert between the modifier bits X uses and the modifier bits | ||
| 4287 | Emacs uses. */ | ||
| 4288 | |||
| 4289 | static unsigned int | ||
| 4290 | x_mac_to_emacs_modifiers (dpyinfo, state) | ||
| 4291 | struct x_display_info *dpyinfo; | ||
| 4292 | unsigned short state; | ||
| 4293 | { | ||
| 4294 | return (((state & shiftKey) ? shift_modifier : 0) | ||
| 4295 | | ((state & controlKey) ? ctrl_modifier : 0) | ||
| 4296 | | ((state & cmdKey) ? meta_modifier : 0) | ||
| 4297 | | ((state & optionKey) ? alt_modifier : 0)); | ||
| 4298 | } | ||
| 4299 | |||
| 4300 | #if 0 /* MAC_TODO */ | ||
| 4301 | static unsigned short | ||
| 4302 | x_emacs_to_x_modifiers (dpyinfo, state) | ||
| 4303 | struct x_display_info *dpyinfo; | ||
| 4304 | unsigned int state; | ||
| 4305 | { | ||
| 4306 | return ( ((state & alt_modifier) ? dpyinfo->alt_mod_mask : 0) | ||
| 4307 | | ((state & super_modifier) ? dpyinfo->super_mod_mask : 0) | ||
| 4308 | | ((state & hyper_modifier) ? dpyinfo->hyper_mod_mask : 0) | ||
| 4309 | | ((state & shift_modifier) ? ShiftMask : 0) | ||
| 4310 | | ((state & ctrl_modifier) ? ControlMask : 0) | ||
| 4311 | | ((state & meta_modifier) ? dpyinfo->meta_mod_mask : 0)); | ||
| 4312 | } | ||
| 4313 | #endif /* MAC_TODO */ | ||
| 4314 | |||
| 4315 | /* Convert a keysym to its name. */ | 4161 | /* Convert a keysym to its name. */ |
| 4316 | 4162 | ||
| 4317 | char * | 4163 | char * |
| @@ -5102,41 +4948,43 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5102 | 4948 | ||
| 5103 | #ifdef USE_TOOLKIT_SCROLL_BARS | 4949 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 5104 | if (NILP (bar->track_top)) | 4950 | if (NILP (bar->track_top)) |
| 5105 | if (sb_width >= disp_height) | 4951 | { |
| 5106 | { | 4952 | if (sb_width >= disp_height) |
| 5107 | XSETINT (bar->track_top, 0); | 4953 | { |
| 5108 | XSETINT (bar->track_height, 0); | 4954 | XSETINT (bar->track_top, 0); |
| 5109 | } | 4955 | XSETINT (bar->track_height, 0); |
| 5110 | else | 4956 | } |
| 5111 | { | 4957 | else |
| 5112 | ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar); | 4958 | { |
| 5113 | Rect r0, r1; | 4959 | ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar); |
| 4960 | Rect r0, r1; | ||
| 5114 | 4961 | ||
| 5115 | BLOCK_INPUT; | 4962 | BLOCK_INPUT; |
| 5116 | 4963 | ||
| 5117 | SetControl32BitMinimum (ch, 0); | 4964 | SetControl32BitMinimum (ch, 0); |
| 5118 | SetControl32BitMaximum (ch, 1); | 4965 | SetControl32BitMaximum (ch, 1); |
| 5119 | SetControlViewSize (ch, 1); | 4966 | SetControlViewSize (ch, 1); |
| 5120 | 4967 | ||
| 5121 | /* Move the scroll bar thumb to the top. */ | 4968 | /* Move the scroll bar thumb to the top. */ |
| 5122 | SetControl32BitValue (ch, 0); | 4969 | SetControl32BitValue (ch, 0); |
| 5123 | get_control_part_bounds (ch, kControlIndicatorPart, &r0); | 4970 | get_control_part_bounds (ch, kControlIndicatorPart, &r0); |
| 5124 | 4971 | ||
| 5125 | /* Move the scroll bar thumb to the bottom. */ | 4972 | /* Move the scroll bar thumb to the bottom. */ |
| 5126 | SetControl32BitValue (ch, 1); | 4973 | SetControl32BitValue (ch, 1); |
| 5127 | get_control_part_bounds (ch, kControlIndicatorPart, &r1); | 4974 | get_control_part_bounds (ch, kControlIndicatorPart, &r1); |
| 5128 | 4975 | ||
| 5129 | UnionRect (&r0, &r1, &r0); | 4976 | UnionRect (&r0, &r1, &r0); |
| 5130 | XSETINT (bar->track_top, r0.top); | 4977 | XSETINT (bar->track_top, r0.top); |
| 5131 | XSETINT (bar->track_height, r0.bottom - r0.top); | 4978 | XSETINT (bar->track_height, r0.bottom - r0.top); |
| 5132 | 4979 | ||
| 5133 | /* Don't show the scroll bar if its height is not enough to | 4980 | /* Don't show the scroll bar if its height is not enough to |
| 5134 | display the scroll bar thumb. */ | 4981 | display the scroll bar thumb. */ |
| 5135 | if (r0.bottom - r0.top > 0) | 4982 | if (r0.bottom - r0.top > 0) |
| 5136 | ShowControl (ch); | 4983 | ShowControl (ch); |
| 5137 | 4984 | ||
| 5138 | UNBLOCK_INPUT; | 4985 | UNBLOCK_INPUT; |
| 5139 | } | 4986 | } |
| 4987 | } | ||
| 5140 | 4988 | ||
| 5141 | x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole); | 4989 | x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole); |
| 5142 | #else /* not USE_TOOLKIT_SCROLL_BARS */ | 4990 | #else /* not USE_TOOLKIT_SCROLL_BARS */ |
| @@ -6205,10 +6053,12 @@ mac_handle_visibility_change (f) | |||
| 6205 | struct input_event buf; | 6053 | struct input_event buf; |
| 6206 | 6054 | ||
| 6207 | if (IsWindowVisible (wp)) | 6055 | if (IsWindowVisible (wp)) |
| 6208 | if (IsWindowCollapsed (wp)) | 6056 | { |
| 6209 | iconified = 1; | 6057 | if (IsWindowCollapsed (wp)) |
| 6210 | else | 6058 | iconified = 1; |
| 6211 | visible = 1; | 6059 | else |
| 6060 | visible = 1; | ||
| 6061 | } | ||
| 6212 | 6062 | ||
| 6213 | if (!f->async_visible && visible) | 6063 | if (!f->async_visible && visible) |
| 6214 | { | 6064 | { |
| @@ -6254,9 +6104,6 @@ void | |||
| 6254 | x_make_frame_visible (f) | 6104 | x_make_frame_visible (f) |
| 6255 | struct frame *f; | 6105 | struct frame *f; |
| 6256 | { | 6106 | { |
| 6257 | Lisp_Object type; | ||
| 6258 | int original_top, original_left; | ||
| 6259 | |||
| 6260 | BLOCK_INPUT; | 6107 | BLOCK_INPUT; |
| 6261 | 6108 | ||
| 6262 | if (! FRAME_VISIBLE_P (f)) | 6109 | if (! FRAME_VISIBLE_P (f)) |
| @@ -6267,27 +6114,29 @@ x_make_frame_visible (f) | |||
| 6267 | before the window gets really visible. */ | 6114 | before the window gets really visible. */ |
| 6268 | if (! FRAME_ICONIFIED_P (f) | 6115 | if (! FRAME_ICONIFIED_P (f) |
| 6269 | && ! f->output_data.mac->asked_for_visible) | 6116 | && ! f->output_data.mac->asked_for_visible) |
| 6117 | { | ||
| 6270 | #if TARGET_API_MAC_CARBON | 6118 | #if TARGET_API_MAC_CARBON |
| 6271 | if (!(FRAME_SIZE_HINTS (f)->flags & (USPosition | PPosition))) | 6119 | if (!(FRAME_SIZE_HINTS (f)->flags & (USPosition | PPosition))) |
| 6272 | { | 6120 | { |
| 6273 | struct frame *sf = SELECTED_FRAME (); | 6121 | struct frame *sf = SELECTED_FRAME (); |
| 6274 | if (!FRAME_MAC_P (sf)) | 6122 | if (!FRAME_MAC_P (sf)) |
| 6275 | RepositionWindow (FRAME_MAC_WINDOW (f), NULL, | 6123 | RepositionWindow (FRAME_MAC_WINDOW (f), NULL, |
| 6276 | kWindowCenterOnMainScreen); | 6124 | kWindowCenterOnMainScreen); |
| 6277 | else | 6125 | else |
| 6278 | RepositionWindow (FRAME_MAC_WINDOW (f), | 6126 | RepositionWindow (FRAME_MAC_WINDOW (f), |
| 6279 | FRAME_MAC_WINDOW (sf), | 6127 | FRAME_MAC_WINDOW (sf), |
| 6280 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 | 6128 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 |
| 6281 | kWindowCascadeStartAtParentWindowScreen | 6129 | kWindowCascadeStartAtParentWindowScreen |
| 6282 | #else | 6130 | #else |
| 6283 | kWindowCascadeOnParentWindowScreen | 6131 | kWindowCascadeOnParentWindowScreen |
| 6284 | #endif | 6132 | #endif |
| 6285 | ); | 6133 | ); |
| 6286 | x_real_positions (f, &f->left_pos, &f->top_pos); | 6134 | x_real_positions (f, &f->left_pos, &f->top_pos); |
| 6287 | } | 6135 | } |
| 6288 | else | 6136 | else |
| 6289 | #endif | 6137 | #endif |
| 6290 | x_set_offset (f, f->left_pos, f->top_pos, 0); | 6138 | x_set_offset (f, f->left_pos, f->top_pos, 0); |
| 6139 | } | ||
| 6291 | 6140 | ||
| 6292 | f->output_data.mac->asked_for_visible = 1; | 6141 | f->output_data.mac->asked_for_visible = 1; |
| 6293 | 6142 | ||
| @@ -6707,12 +6556,7 @@ xlfdpat_create (pattern) | |||
| 6707 | struct xlfdpat_block *blk; | 6556 | struct xlfdpat_block *blk; |
| 6708 | 6557 | ||
| 6709 | pat = xmalloc (sizeof (struct xlfdpat)); | 6558 | pat = xmalloc (sizeof (struct xlfdpat)); |
| 6710 | if (pat == NULL) | ||
| 6711 | goto error; | ||
| 6712 | |||
| 6713 | pat->buf = xmalloc (strlen (pattern) + 1); | 6559 | pat->buf = xmalloc (strlen (pattern) + 1); |
| 6714 | if (pat->buf == NULL) | ||
| 6715 | goto error; | ||
| 6716 | 6560 | ||
| 6717 | /* Normalize the pattern string and store it to `pat->buf'. */ | 6561 | /* Normalize the pattern string and store it to `pat->buf'. */ |
| 6718 | nblocks = 0; | 6562 | nblocks = 0; |
| @@ -6730,15 +6574,17 @@ xlfdpat_create (pattern) | |||
| 6730 | else | 6574 | else |
| 6731 | { | 6575 | { |
| 6732 | if (last_char == '?') | 6576 | if (last_char == '?') |
| 6733 | if (anychar_head > pat->buf && *(anychar_head - 1) == '*') | 6577 | { |
| 6734 | /* ...*??* -> ...*?? */ | 6578 | if (anychar_head > pat->buf && *(anychar_head - 1) == '*') |
| 6735 | continue; | 6579 | /* ...*??* -> ...*?? */ |
| 6736 | else | 6580 | continue; |
| 6737 | /* ...a??* -> ...a*?? */ | 6581 | else |
| 6738 | { | 6582 | /* ...a??* -> ...a*?? */ |
| 6739 | *anychar_head++ = '*'; | 6583 | { |
| 6740 | c = '?'; | 6584 | *anychar_head++ = '*'; |
| 6741 | } | 6585 | c = '?'; |
| 6586 | } | ||
| 6587 | } | ||
| 6742 | nblocks++; | 6588 | nblocks++; |
| 6743 | } | 6589 | } |
| 6744 | else if (c == '?') | 6590 | else if (c == '?') |
| @@ -6774,8 +6620,6 @@ xlfdpat_create (pattern) | |||
| 6774 | } | 6620 | } |
| 6775 | 6621 | ||
| 6776 | pat->blocks = xmalloc (sizeof (struct xlfdpat_block) * nblocks); | 6622 | pat->blocks = xmalloc (sizeof (struct xlfdpat_block) * nblocks); |
| 6777 | if (pat->blocks == NULL) | ||
| 6778 | goto error; | ||
| 6779 | 6623 | ||
| 6780 | /* Divide the normalized pattern into blocks. */ | 6624 | /* Divide the normalized pattern into blocks. */ |
| 6781 | p = pat->buf; | 6625 | p = pat->buf; |
| @@ -7235,9 +7079,10 @@ init_font_name_table () | |||
| 7235 | Qnil, Qnil, Qnil);; | 7079 | Qnil, Qnil, Qnil);; |
| 7236 | err = ATSUFontCount (&nfonts); | 7080 | err = ATSUFontCount (&nfonts); |
| 7237 | if (err == noErr) | 7081 | if (err == noErr) |
| 7238 | font_ids = xmalloc (sizeof (ATSUFontID) * nfonts); | 7082 | { |
| 7239 | if (font_ids) | 7083 | font_ids = xmalloc (sizeof (ATSUFontID) * nfonts); |
| 7240 | err = ATSUGetFontIDs (font_ids, nfonts, NULL); | 7084 | err = ATSUGetFontIDs (font_ids, nfonts, NULL); |
| 7085 | } | ||
| 7241 | if (err == noErr) | 7086 | if (err == noErr) |
| 7242 | for (i = 0; i < nfonts; i++) | 7087 | for (i = 0; i < nfonts; i++) |
| 7243 | { | 7088 | { |
| @@ -7247,8 +7092,6 @@ init_font_name_table () | |||
| 7247 | if (err != noErr) | 7092 | if (err != noErr) |
| 7248 | continue; | 7093 | continue; |
| 7249 | name = xmalloc (name_len + 1); | 7094 | name = xmalloc (name_len + 1); |
| 7250 | if (name == NULL) | ||
| 7251 | continue; | ||
| 7252 | name[name_len] = '\0'; | 7095 | name[name_len] = '\0'; |
| 7253 | err = ATSUFindFontName (font_ids[i], kFontFamilyName, | 7096 | err = ATSUFindFontName (font_ids[i], kFontFamilyName, |
| 7254 | kFontMacintoshPlatform, kFontNoScript, | 7097 | kFontMacintoshPlatform, kFontNoScript, |
| @@ -7569,7 +7412,7 @@ mac_do_list_fonts (pattern, maxnames) | |||
| 7569 | if (xlfdpat_match (pat, font_name_table[i])) | 7412 | if (xlfdpat_match (pat, font_name_table[i])) |
| 7570 | { | 7413 | { |
| 7571 | font_list = Fcons (build_string (font_name_table[i]), font_list); | 7414 | font_list = Fcons (build_string (font_name_table[i]), font_list); |
| 7572 | if (exact || maxnames > 0 && ++n_fonts >= maxnames) | 7415 | if (exact || (maxnames > 0 && ++n_fonts >= maxnames)) |
| 7573 | break; | 7416 | break; |
| 7574 | } | 7417 | } |
| 7575 | else if (scl_val[XLFD_SCL_PIXEL_SIZE] > 0 | 7418 | else if (scl_val[XLFD_SCL_PIXEL_SIZE] > 0 |
| @@ -7578,8 +7421,6 @@ mac_do_list_fonts (pattern, maxnames) | |||
| 7578 | int former_len = ptr - font_name_table[i]; | 7421 | int former_len = ptr - font_name_table[i]; |
| 7579 | 7422 | ||
| 7580 | scaled = xmalloc (strlen (font_name_table[i]) + 20 + 1); | 7423 | scaled = xmalloc (strlen (font_name_table[i]) + 20 + 1); |
| 7581 | if (scaled == NULL) | ||
| 7582 | continue; | ||
| 7583 | memcpy (scaled, font_name_table[i], former_len); | 7424 | memcpy (scaled, font_name_table[i], former_len); |
| 7584 | sprintf (scaled + former_len, | 7425 | sprintf (scaled + former_len, |
| 7585 | "-%d-%d-72-72-m-%d-%s", | 7426 | "-%d-%d-72-72-m-%d-%s", |
| @@ -7592,7 +7433,7 @@ mac_do_list_fonts (pattern, maxnames) | |||
| 7592 | { | 7433 | { |
| 7593 | font_list = Fcons (build_string (scaled), font_list); | 7434 | font_list = Fcons (build_string (scaled), font_list); |
| 7594 | xfree (scaled); | 7435 | xfree (scaled); |
| 7595 | if (exact || maxnames > 0 && ++n_fonts >= maxnames) | 7436 | if (exact || (maxnames > 0 && ++n_fonts >= maxnames)) |
| 7596 | break; | 7437 | break; |
| 7597 | } | 7438 | } |
| 7598 | else | 7439 | else |
| @@ -7912,18 +7753,8 @@ XLoadQueryFont (Display *dpy, char *fontname) | |||
| 7912 | font->max_char_or_byte2 = 0xff; | 7753 | font->max_char_or_byte2 = 0xff; |
| 7913 | 7754 | ||
| 7914 | font->bounds.rows = xmalloc (sizeof (XCharStructRow *) * 0x100); | 7755 | font->bounds.rows = xmalloc (sizeof (XCharStructRow *) * 0x100); |
| 7915 | if (font->bounds.rows == NULL) | ||
| 7916 | { | ||
| 7917 | mac_unload_font (&one_mac_display_info, font); | ||
| 7918 | return NULL; | ||
| 7919 | } | ||
| 7920 | bzero (font->bounds.rows, sizeof (XCharStructRow *) * 0x100); | 7756 | bzero (font->bounds.rows, sizeof (XCharStructRow *) * 0x100); |
| 7921 | font->bounds.rows[0] = xmalloc (sizeof (XCharStructRow)); | 7757 | font->bounds.rows[0] = xmalloc (sizeof (XCharStructRow)); |
| 7922 | if (font->bounds.rows[0] == NULL) | ||
| 7923 | { | ||
| 7924 | mac_unload_font (&one_mac_display_info, font); | ||
| 7925 | return NULL; | ||
| 7926 | } | ||
| 7927 | bzero (font->bounds.rows[0], sizeof (XCharStructRow)); | 7758 | bzero (font->bounds.rows[0], sizeof (XCharStructRow)); |
| 7928 | 7759 | ||
| 7929 | #if USE_CG_TEXT_DRAWING | 7760 | #if USE_CG_TEXT_DRAWING |
| @@ -7945,9 +7776,10 @@ XLoadQueryFont (Display *dpy, char *fontname) | |||
| 7945 | } | 7776 | } |
| 7946 | 7777 | ||
| 7947 | if (font->cg_font) | 7778 | if (font->cg_font) |
| 7948 | font->cg_glyphs = xmalloc (sizeof (CGGlyph) * 0x100); | 7779 | { |
| 7949 | if (font->cg_glyphs) | 7780 | font->cg_glyphs = xmalloc (sizeof (CGGlyph) * 0x100); |
| 7950 | bzero (font->cg_glyphs, sizeof (CGGlyph) * 0x100); | 7781 | bzero (font->cg_glyphs, sizeof (CGGlyph) * 0x100); |
| 7782 | } | ||
| 7951 | #endif | 7783 | #endif |
| 7952 | space_bounds = font->bounds.rows[0]->per_char + 0x20; | 7784 | space_bounds = font->bounds.rows[0]->per_char + 0x20; |
| 7953 | err = mac_query_char_extents (font->mac_style, 0x20, | 7785 | err = mac_query_char_extents (font->mac_style, 0x20, |
| @@ -8093,11 +7925,6 @@ XLoadQueryFont (Display *dpy, char *fontname) | |||
| 8093 | 7925 | ||
| 8094 | font->bounds.per_char = | 7926 | font->bounds.per_char = |
| 8095 | xmalloc (sizeof (XCharStruct) * (0xff - 0x20 + 1)); | 7927 | xmalloc (sizeof (XCharStruct) * (0xff - 0x20 + 1)); |
| 8096 | if (font->bounds.per_char == NULL) | ||
| 8097 | { | ||
| 8098 | mac_unload_font (&one_mac_display_info, font); | ||
| 8099 | return NULL; | ||
| 8100 | } | ||
| 8101 | bzero (font->bounds.per_char, | 7928 | bzero (font->bounds.per_char, |
| 8102 | sizeof (XCharStruct) * (0xff - 0x20 + 1)); | 7929 | sizeof (XCharStruct) * (0xff - 0x20 + 1)); |
| 8103 | 7930 | ||
| @@ -8241,10 +8068,8 @@ x_load_font (f, fontname, size) | |||
| 8241 | 8068 | ||
| 8242 | /* Load the font and add it to the table. */ | 8069 | /* Load the font and add it to the table. */ |
| 8243 | { | 8070 | { |
| 8244 | char *full_name; | ||
| 8245 | struct MacFontStruct *font; | 8071 | struct MacFontStruct *font; |
| 8246 | struct font_info *fontp; | 8072 | struct font_info *fontp; |
| 8247 | unsigned long value; | ||
| 8248 | int i; | 8073 | int i; |
| 8249 | 8074 | ||
| 8250 | fontname = (char *) SDATA (XCAR (font_names)); | 8075 | fontname = (char *) SDATA (XCAR (font_names)); |
| @@ -8756,6 +8581,7 @@ static Boolean mac_convert_event_ref (EventRef eventRef, EventRecord *eventRec) | |||
| 8756 | 8581 | ||
| 8757 | #endif | 8582 | #endif |
| 8758 | 8583 | ||
| 8584 | #ifdef MAC_OS8 | ||
| 8759 | static void | 8585 | static void |
| 8760 | do_get_menus (void) | 8586 | do_get_menus (void) |
| 8761 | { | 8587 | { |
| @@ -8817,6 +8643,7 @@ do_check_ram_size (void) | |||
| 8817 | exit (1); | 8643 | exit (1); |
| 8818 | } | 8644 | } |
| 8819 | } | 8645 | } |
| 8646 | #endif /* MAC_OS8 */ | ||
| 8820 | 8647 | ||
| 8821 | static void | 8648 | static void |
| 8822 | do_window_update (WindowPtr win) | 8649 | do_window_update (WindowPtr win) |
| @@ -8998,42 +8825,41 @@ do_grow_window (WindowPtr w, EventRecord *e) | |||
| 8998 | static void | 8825 | static void |
| 8999 | do_zoom_window (WindowPtr w, int zoom_in_or_out) | 8826 | do_zoom_window (WindowPtr w, int zoom_in_or_out) |
| 9000 | { | 8827 | { |
| 9001 | GrafPtr save_port; | ||
| 9002 | Rect zoom_rect, port_rect; | 8828 | Rect zoom_rect, port_rect; |
| 9003 | Point top_left; | 8829 | int columns, rows, width, height; |
| 9004 | int w_title_height, columns, rows, width, height; | ||
| 9005 | struct frame *f = mac_window_to_frame (w); | 8830 | struct frame *f = mac_window_to_frame (w); |
| 9006 | struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f); | 8831 | struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f); |
| 9007 | |||
| 9008 | #if TARGET_API_MAC_CARBON | 8832 | #if TARGET_API_MAC_CARBON |
| 9009 | { | 8833 | Point standard_size; |
| 9010 | Point standard_size; | ||
| 9011 | 8834 | ||
| 9012 | standard_size.h = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS); | 8835 | standard_size.h = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS); |
| 9013 | standard_size.v = dpyinfo->height; | 8836 | standard_size.v = dpyinfo->height; |
| 9014 | 8837 | ||
| 9015 | if (IsWindowInStandardState (w, &standard_size, &zoom_rect)) | 8838 | if (IsWindowInStandardState (w, &standard_size, &zoom_rect)) |
| 9016 | zoom_in_or_out = inZoomIn; | 8839 | zoom_in_or_out = inZoomIn; |
| 9017 | else | 8840 | else |
| 9018 | { | 8841 | { |
| 9019 | /* Adjust the standard size according to character boundaries. */ | 8842 | /* Adjust the standard size according to character boundaries. */ |
| 9020 | |||
| 9021 | columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, zoom_rect.right - zoom_rect.left); | ||
| 9022 | rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, zoom_rect.bottom - zoom_rect.top); | ||
| 9023 | standard_size.h = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, columns); | ||
| 9024 | standard_size.v = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows); | ||
| 9025 | GetWindowBounds (w, kWindowContentRgn, &port_rect); | ||
| 9026 | if (IsWindowInStandardState (w, &standard_size, &zoom_rect) | ||
| 9027 | && port_rect.left == zoom_rect.left | ||
| 9028 | && port_rect.top == zoom_rect.top) | ||
| 9029 | zoom_in_or_out = inZoomIn; | ||
| 9030 | else | ||
| 9031 | zoom_in_or_out = inZoomOut; | ||
| 9032 | } | ||
| 9033 | 8843 | ||
| 9034 | ZoomWindowIdeal (w, zoom_in_or_out, &standard_size); | 8844 | columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, zoom_rect.right - zoom_rect.left); |
| 9035 | } | 8845 | rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, zoom_rect.bottom - zoom_rect.top); |
| 8846 | standard_size.h = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, columns); | ||
| 8847 | standard_size.v = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows); | ||
| 8848 | GetWindowBounds (w, kWindowContentRgn, &port_rect); | ||
| 8849 | if (IsWindowInStandardState (w, &standard_size, &zoom_rect) | ||
| 8850 | && port_rect.left == zoom_rect.left | ||
| 8851 | && port_rect.top == zoom_rect.top) | ||
| 8852 | zoom_in_or_out = inZoomIn; | ||
| 8853 | else | ||
| 8854 | zoom_in_or_out = inZoomOut; | ||
| 8855 | } | ||
| 8856 | |||
| 8857 | ZoomWindowIdeal (w, zoom_in_or_out, &standard_size); | ||
| 9036 | #else /* not TARGET_API_MAC_CARBON */ | 8858 | #else /* not TARGET_API_MAC_CARBON */ |
| 8859 | GrafPtr save_port; | ||
| 8860 | Point top_left; | ||
| 8861 | int w_title_height; | ||
| 8862 | |||
| 9037 | GetPort (&save_port); | 8863 | GetPort (&save_port); |
| 9038 | 8864 | ||
| 9039 | SetPortWindowPort (w); | 8865 | SetPortWindowPort (w); |
| @@ -9101,15 +8927,12 @@ mac_store_apple_event (class, id, desc) | |||
| 9101 | Lisp_Object class, id; | 8927 | Lisp_Object class, id; |
| 9102 | const AEDesc *desc; | 8928 | const AEDesc *desc; |
| 9103 | { | 8929 | { |
| 9104 | OSErr err = noErr; | 8930 | OSErr err; |
| 9105 | struct input_event buf; | 8931 | struct input_event buf; |
| 9106 | AEDesc *desc_copy; | 8932 | AEDesc *desc_copy; |
| 9107 | 8933 | ||
| 9108 | desc_copy = xmalloc (sizeof (AEDesc)); | 8934 | desc_copy = xmalloc (sizeof (AEDesc)); |
| 9109 | if (desc_copy == NULL) | 8935 | err = AEDuplicateDesc (desc, desc_copy); |
| 9110 | err = memFullErr; | ||
| 9111 | else | ||
| 9112 | err = AEDuplicateDesc (desc, desc_copy); | ||
| 9113 | if (err == noErr) | 8936 | if (err == noErr) |
| 9114 | { | 8937 | { |
| 9115 | EVENT_INIT (buf); | 8938 | EVENT_INIT (buf); |
| @@ -9168,26 +8991,27 @@ mac_handle_command_event (next_handler, event, data) | |||
| 9168 | mac_find_apple_event_spec (0, command.commandID, | 8991 | mac_find_apple_event_spec (0, command.commandID, |
| 9169 | &class_key, &id_key, &binding); | 8992 | &class_key, &id_key, &binding); |
| 9170 | if (!NILP (binding) && !EQ (binding, Qundefined)) | 8993 | if (!NILP (binding) && !EQ (binding, Qundefined)) |
| 9171 | if (INTEGERP (binding)) | 8994 | { |
| 9172 | return XINT (binding); | 8995 | if (INTEGERP (binding)) |
| 9173 | else | 8996 | return XINT (binding); |
| 9174 | { | 8997 | else |
| 9175 | AppleEvent apple_event; | 8998 | { |
| 9176 | UInt32 modifiers; | 8999 | AppleEvent apple_event; |
| 9177 | static EventParamName names[] = {kEventParamDirectObject, | 9000 | static EventParamName names[] = {kEventParamDirectObject, |
| 9178 | kEventParamKeyModifiers}; | 9001 | kEventParamKeyModifiers}; |
| 9179 | static EventParamType types[] = {typeHICommand, | 9002 | static EventParamType types[] = {typeHICommand, |
| 9180 | typeUInt32}; | 9003 | typeUInt32}; |
| 9181 | err = create_apple_event_from_event_ref (event, 2, names, types, | 9004 | err = create_apple_event_from_event_ref (event, 2, names, types, |
| 9182 | &apple_event); | 9005 | &apple_event); |
| 9183 | if (err == noErr) | 9006 | if (err == noErr) |
| 9184 | { | 9007 | { |
| 9185 | err = mac_store_apple_event (class_key, id_key, &apple_event); | 9008 | err = mac_store_apple_event (class_key, id_key, &apple_event); |
| 9186 | AEDisposeDesc (&apple_event); | 9009 | AEDisposeDesc (&apple_event); |
| 9187 | } | 9010 | } |
| 9188 | if (err == noErr) | 9011 | if (err == noErr) |
| 9189 | return noErr; | 9012 | return noErr; |
| 9190 | } | 9013 | } |
| 9014 | } | ||
| 9191 | 9015 | ||
| 9192 | return eventNotHandledErr; | 9016 | return eventNotHandledErr; |
| 9193 | } | 9017 | } |
| @@ -9195,7 +9019,6 @@ mac_handle_command_event (next_handler, event, data) | |||
| 9195 | static OSErr | 9019 | static OSErr |
| 9196 | init_command_handler () | 9020 | init_command_handler () |
| 9197 | { | 9021 | { |
| 9198 | OSErr err = noErr; | ||
| 9199 | EventTypeSpec specs[] = {{kEventClassCommand, kEventCommandProcess}}; | 9022 | EventTypeSpec specs[] = {{kEventClassCommand, kEventCommandProcess}}; |
| 9200 | static EventHandlerUPP handle_command_eventUPP = NULL; | 9023 | static EventHandlerUPP handle_command_eventUPP = NULL; |
| 9201 | 9024 | ||
| @@ -10071,18 +9894,18 @@ XTread_socket (sd, expected, hold_quit) | |||
| 10071 | XSETINT (inev.x, mouse_loc.h); | 9894 | XSETINT (inev.x, mouse_loc.h); |
| 10072 | XSETINT (inev.y, mouse_loc.v); | 9895 | XSETINT (inev.y, mouse_loc.v); |
| 10073 | 9896 | ||
| 10074 | if (dpyinfo->grabbed && tracked_scroll_bar | 9897 | if ((dpyinfo->grabbed && tracked_scroll_bar) |
| 10075 | || ch != 0 | 9898 | || (ch != 0 |
| 10076 | #ifndef USE_TOOLKIT_SCROLL_BARS | 9899 | #ifndef USE_TOOLKIT_SCROLL_BARS |
| 10077 | /* control_part_code becomes kControlNoPart if | 9900 | /* control_part_code becomes kControlNoPart if |
| 10078 | a progress indicator is clicked. */ | 9901 | a progress indicator is clicked. */ |
| 10079 | && control_part_code != kControlNoPart | 9902 | && control_part_code != kControlNoPart |
| 10080 | #else /* USE_TOOLKIT_SCROLL_BARS */ | 9903 | #else /* USE_TOOLKIT_SCROLL_BARS */ |
| 10081 | #ifdef MAC_OSX | 9904 | #ifdef MAC_OSX |
| 10082 | && control_kind.kind == kControlKindScrollBar | 9905 | && control_kind.kind == kControlKindScrollBar |
| 10083 | #endif /* MAC_OSX */ | 9906 | #endif /* MAC_OSX */ |
| 10084 | #endif /* USE_TOOLKIT_SCROLL_BARS */ | 9907 | #endif /* USE_TOOLKIT_SCROLL_BARS */ |
| 10085 | ) | 9908 | )) |
| 10086 | { | 9909 | { |
| 10087 | struct scroll_bar *bar; | 9910 | struct scroll_bar *bar; |
| 10088 | 9911 | ||
| @@ -10882,7 +10705,6 @@ mac_check_bundle() | |||
| 10882 | extern int inhibit_window_system; | 10705 | extern int inhibit_window_system; |
| 10883 | extern int noninteractive; | 10706 | extern int noninteractive; |
| 10884 | CFBundleRef appsBundle; | 10707 | CFBundleRef appsBundle; |
| 10885 | pid_t child; | ||
| 10886 | 10708 | ||
| 10887 | /* No need to test if already -nw*/ | 10709 | /* No need to test if already -nw*/ |
| 10888 | if (inhibit_window_system || noninteractive) | 10710 | if (inhibit_window_system || noninteractive) |