comparison src/macterm.c @ 83556:07774e5c3ff5

Merged from emacs@sv.gnu.org Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-619 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-620 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-621 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-622 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-623 Remove RCS keywords * emacs@sv.gnu.org/emacs--devo--0--patch-624 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-625 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-626 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-627 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-628 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-629 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-630 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-631 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-632 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-633 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-634 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-635 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-636 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-637 Remove RCS keywords * emacs@sv.gnu.org/emacs--devo--0--patch-638 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-639 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-640 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-641 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-642 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-643 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-644 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-645 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-646 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-647 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-648 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-649 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-197 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-198 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-199 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-200 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-201 Update from CVS: lisp/nnweb.el (nnweb-google-parse-1): Update parser. * emacs@sv.gnu.org/gnus--rel--5.10--patch-202 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-596
author Karoly Lorentey <karoly@lorentey.hu>
date Sat, 24 Feb 2007 19:26:54 +0000
parents b8d9a391daf3 d14fbfc5dd8e
children 738ce3540ffb
comparison
equal deleted inserted replaced
83555:053bf1a38bfa 83556:07774e5c3ff5
1914 XTread_socket calls XPending. Removing XFlush improves 1914 XTread_socket calls XPending. Removing XFlush improves
1915 performance. */ 1915 performance. */
1916 1916
1917 #define XFlush(DISPLAY) (void) 0 1917 #define XFlush(DISPLAY) (void) 0
1918 1918
1919 1919 #if USE_CG_DRAWING
1920 /* Return the struct mac_display_info corresponding to DPY. There's 1920 static void
1921 only one. */ 1921 mac_flush_display_optional (f)
1922 1922 struct frame *f;
1923 struct mac_display_info * 1923 {
1924 mac_display_info_for_display (dpy) 1924 BLOCK_INPUT;
1925 Display *dpy; 1925 mac_prepare_for_quickdraw (f);
1926 { 1926 UNBLOCK_INPUT;
1927 return &one_mac_display_info; 1927 }
1928 } 1928 #endif
1929
1930
1931 1929
1932 /*********************************************************************** 1930 /***********************************************************************
1933 Starting and ending an update 1931 Starting and ending an update
1934 ***********************************************************************/ 1932 ***********************************************************************/
1935 1933
4647 static void construct_scroll_bar_click P_ ((struct scroll_bar *, int, 4645 static void construct_scroll_bar_click P_ ((struct scroll_bar *, int,
4648 struct input_event *)); 4646 struct input_event *));
4649 static OSStatus get_control_part_bounds P_ ((ControlHandle, ControlPartCode, 4647 static OSStatus get_control_part_bounds P_ ((ControlHandle, ControlPartCode,
4650 Rect *)); 4648 Rect *));
4651 static void x_scroll_bar_handle_press P_ ((struct scroll_bar *, 4649 static void x_scroll_bar_handle_press P_ ((struct scroll_bar *,
4652 ControlPartCode, 4650 ControlPartCode, Point,
4653 struct input_event *)); 4651 struct input_event *));
4654 static void x_scroll_bar_handle_release P_ ((struct scroll_bar *, 4652 static void x_scroll_bar_handle_release P_ ((struct scroll_bar *,
4655 struct input_event *)); 4653 struct input_event *));
4656 static void x_scroll_bar_handle_drag P_ ((WindowPtr, struct scroll_bar *, 4654 static void x_scroll_bar_handle_drag P_ ((WindowPtr, struct scroll_bar *,
4657 Point, struct input_event *)); 4655 Point, struct input_event *));
4760 4758
4761 return err; 4759 return err;
4762 } 4760 }
4763 4761
4764 static void 4762 static void
4765 x_scroll_bar_handle_press (bar, part_code, bufp) 4763 x_scroll_bar_handle_press (bar, part_code, mouse_pos, bufp)
4766 struct scroll_bar *bar; 4764 struct scroll_bar *bar;
4767 ControlPartCode part_code; 4765 ControlPartCode part_code;
4766 Point mouse_pos;
4768 struct input_event *bufp; 4767 struct input_event *bufp;
4769 { 4768 {
4770 int part = control_part_code_to_scroll_bar_part (part_code); 4769 int part = control_part_code_to_scroll_bar_part (part_code);
4771 4770
4772 if (part < 0) 4771 if (part < 0)
4775 if (part != scroll_bar_handle) 4774 if (part != scroll_bar_handle)
4776 { 4775 {
4777 construct_scroll_bar_click (bar, part, bufp); 4776 construct_scroll_bar_click (bar, part, bufp);
4778 HiliteControl (SCROLL_BAR_CONTROL_HANDLE (bar), part_code); 4777 HiliteControl (SCROLL_BAR_CONTROL_HANDLE (bar), part_code);
4779 set_scroll_bar_timer (SCROLL_BAR_FIRST_DELAY); 4778 set_scroll_bar_timer (SCROLL_BAR_FIRST_DELAY);
4779 bar->dragging = Qnil;
4780 }
4781 else
4782 {
4783 Rect r;
4784
4785 get_control_part_bounds (SCROLL_BAR_CONTROL_HANDLE (bar),
4786 kControlIndicatorPart, &r);
4787 XSETINT (bar->dragging, - (mouse_pos.v - r.top) - 1);
4780 } 4788 }
4781 4789
4782 last_scroll_bar_part = part; 4790 last_scroll_bar_part = part;
4783 bar->dragging = Qnil;
4784 tracked_scroll_bar = bar; 4791 tracked_scroll_bar = bar;
4785 } 4792 }
4786 4793
4787 static void 4794 static void
4788 x_scroll_bar_handle_release (bar, bufp) 4795 x_scroll_bar_handle_release (bar, bufp)
4789 struct scroll_bar *bar; 4796 struct scroll_bar *bar;
4790 struct input_event *bufp; 4797 struct input_event *bufp;
4791 { 4798 {
4792 if (last_scroll_bar_part != scroll_bar_handle 4799 if (last_scroll_bar_part != scroll_bar_handle
4793 || !GC_NILP (bar->dragging)) 4800 || (INTEGERP (bar->dragging) && XINT (bar->dragging) >= 0))
4794 construct_scroll_bar_click (bar, scroll_bar_end_scroll, bufp); 4801 construct_scroll_bar_click (bar, scroll_bar_end_scroll, bufp);
4795 4802
4796 HiliteControl (SCROLL_BAR_CONTROL_HANDLE (bar), 0); 4803 HiliteControl (SCROLL_BAR_CONTROL_HANDLE (bar), 0);
4797 set_scroll_bar_timer (kEventDurationForever); 4804 set_scroll_bar_timer (kEventDurationForever);
4798 4805
4816 Rect r; 4823 Rect r;
4817 4824
4818 get_control_part_bounds (SCROLL_BAR_CONTROL_HANDLE (bar), 4825 get_control_part_bounds (SCROLL_BAR_CONTROL_HANDLE (bar),
4819 kControlIndicatorPart, &r); 4826 kControlIndicatorPart, &r);
4820 4827
4821 if (GC_NILP (bar->dragging)) 4828 if (INTEGERP (bar->dragging) && XINT (bar->dragging) < 0)
4822 XSETINT (bar->dragging, mouse_pos.v - r.top); 4829 XSETINT (bar->dragging, - (XINT (bar->dragging) + 1));
4823 4830
4824 top = mouse_pos.v - XINT (bar->dragging) - XINT (bar->track_top); 4831 top = mouse_pos.v - XINT (bar->dragging) - XINT (bar->track_top);
4825 top_range = (XINT (bar->track_height) - (r.bottom - r.top)) * 4832 top_range = XINT (bar->track_height) - XINT (bar->min_handle);
4826 (1.0 + (float) GetControlViewSize (ch) / GetControl32BitMaximum (ch))
4827 + .5;
4828 4833
4829 if (top < 0) 4834 if (top < 0)
4830 top = 0; 4835 top = 0;
4831 if (top > top_range) 4836 if (top > top_range)
4832 top = top_range; 4837 top = top_range;
4889 int value, viewsize, maximum; 4894 int value, viewsize, maximum;
4890 4895
4891 if (XINT (bar->track_height) == 0) 4896 if (XINT (bar->track_height) == 0)
4892 return; 4897 return;
4893 4898
4894 if (whole == 0) 4899 if (whole <= portion)
4895 value = 0, viewsize = 1, maximum = 0; 4900 value = 0, viewsize = 1, maximum = 0;
4896 else 4901 else
4897 { 4902 {
4898 value = position; 4903 float scale;
4899 viewsize = portion; 4904
4900 maximum = max (0, whole - portion); 4905 maximum = XINT (bar->track_height) - XINT (bar->min_handle);
4906 scale = (float) maximum / (whole - portion);
4907 value = position * scale + 0.5f;
4908 viewsize = (int) (portion * scale + 0.5f) + XINT (bar->min_handle);
4901 } 4909 }
4902 4910
4903 BLOCK_INPUT; 4911 BLOCK_INPUT;
4904 4912
4905 if (GetControlViewSize (ch) != viewsize 4913 if (GetControlViewSize (ch) != viewsize
4976 XSETINT (bar->end, 0); 4984 XSETINT (bar->end, 0);
4977 bar->dragging = Qnil; 4985 bar->dragging = Qnil;
4978 #ifdef USE_TOOLKIT_SCROLL_BARS 4986 #ifdef USE_TOOLKIT_SCROLL_BARS
4979 bar->track_top = Qnil; 4987 bar->track_top = Qnil;
4980 bar->track_height = Qnil; 4988 bar->track_height = Qnil;
4989 bar->min_handle = Qnil;
4981 #endif 4990 #endif
4982 4991
4983 /* Add bar to its frame's list of scroll bars. */ 4992 /* Add bar to its frame's list of scroll bars. */
4984 bar->next = FRAME_SCROLL_BARS (f); 4993 bar->next = FRAME_SCROLL_BARS (f);
4985 bar->prev = Qnil; 4994 bar->prev = Qnil;
5196 XSETINT (bar->width, sb_width); 5205 XSETINT (bar->width, sb_width);
5197 XSETINT (bar->height, height); 5206 XSETINT (bar->height, height);
5198 #ifdef USE_TOOLKIT_SCROLL_BARS 5207 #ifdef USE_TOOLKIT_SCROLL_BARS
5199 bar->track_top = Qnil; 5208 bar->track_top = Qnil;
5200 bar->track_height = Qnil; 5209 bar->track_height = Qnil;
5210 bar->min_handle = Qnil;
5201 #endif 5211 #endif
5202 } 5212 }
5203 5213
5204 UNBLOCK_INPUT; 5214 UNBLOCK_INPUT;
5205 } 5215 }
5209 { 5219 {
5210 if (sb_width >= disp_height) 5220 if (sb_width >= disp_height)
5211 { 5221 {
5212 XSETINT (bar->track_top, 0); 5222 XSETINT (bar->track_top, 0);
5213 XSETINT (bar->track_height, 0); 5223 XSETINT (bar->track_height, 0);
5224 XSETINT (bar->min_handle, 0);
5214 } 5225 }
5215 else 5226 else
5216 { 5227 {
5217 ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar); 5228 ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar);
5218 Rect r0, r1; 5229 Rect r0, r1;
5219 5230
5220 BLOCK_INPUT; 5231 BLOCK_INPUT;
5221 5232
5222 SetControl32BitMinimum (ch, 0); 5233 SetControl32BitMinimum (ch, 0);
5223 SetControl32BitMaximum (ch, 1); 5234 SetControl32BitMaximum (ch, 1 << 30);
5224 SetControlViewSize (ch, 1); 5235 SetControlViewSize (ch, 1);
5225 5236
5226 /* Move the scroll bar thumb to the top. */ 5237 /* Move the scroll bar thumb to the top. */
5227 SetControl32BitValue (ch, 0); 5238 SetControl32BitValue (ch, 0);
5228 get_control_part_bounds (ch, kControlIndicatorPart, &r0); 5239 get_control_part_bounds (ch, kControlIndicatorPart, &r0);
5229 5240
5230 /* Move the scroll bar thumb to the bottom. */ 5241 /* Move the scroll bar thumb to the bottom. */
5231 SetControl32BitValue (ch, 1); 5242 SetControl32BitValue (ch, 1 << 30);
5232 get_control_part_bounds (ch, kControlIndicatorPart, &r1); 5243 get_control_part_bounds (ch, kControlIndicatorPart, &r1);
5233 5244
5234 UnionRect (&r0, &r1, &r0); 5245 UnionRect (&r0, &r1, &r0);
5235 XSETINT (bar->track_top, r0.top); 5246 XSETINT (bar->track_top, r0.top);
5236 XSETINT (bar->track_height, r0.bottom - r0.top); 5247 XSETINT (bar->track_height, r0.bottom - r0.top);
5248 XSETINT (bar->min_handle, r1.bottom - r1.top);
5237 5249
5238 /* Don't show the scroll bar if its height is not enough to 5250 /* Don't show the scroll bar if its height is not enough to
5239 display the scroll bar thumb. */ 5251 display the scroll bar thumb. */
5240 if (r0.bottom - r0.top > 0) 5252 if (r0.bottom - r0.top > 0)
5241 ShowControl (ch); 5253 ShowControl (ch);
8789 #endif /* ! TARGET_API_MAC_CARBON */ 8801 #endif /* ! TARGET_API_MAC_CARBON */
8790 8802
8791 #define M_APPLE 234 8803 #define M_APPLE 234
8792 #define I_ABOUT 1 8804 #define I_ABOUT 1
8793 8805
8794 #define WINDOW_RESOURCE 128
8795 #define TERM_WINDOW_RESOURCE 129
8796
8797 #define DEFAULT_NUM_COLS 80 8806 #define DEFAULT_NUM_COLS 80
8798 8807
8799 #define MIN_DOC_SIZE 64 8808 #define MIN_DOC_SIZE 64
8800 #define MAX_DOC_SIZE 32767 8809 #define MAX_DOC_SIZE 32767
8801 8810
10118 break; 10127 break;
10119 10128
10120 case kEventTextInputUnicodeForKeyEvent: 10129 case kEventTextInputUnicodeForKeyEvent:
10121 { 10130 {
10122 EventRef kbd_event; 10131 EventRef kbd_event;
10123 UInt32 actual_size, modifiers, mapped_modifiers; 10132 UInt32 actual_size, modifiers;
10124 10133
10125 err = GetEventParameter (event, kEventParamTextInputSendKeyboardEvent, 10134 err = GetEventParameter (event, kEventParamTextInputSendKeyboardEvent,
10126 typeEventRef, NULL, sizeof (EventRef), NULL, 10135 typeEventRef, NULL, sizeof (EventRef), NULL,
10127 &kbd_event); 10136 &kbd_event);
10128 if (err == noErr) 10137 if (err == noErr)
10755 else 10764 else
10756 bar = (struct scroll_bar *) GetControlReference (ch); 10765 bar = (struct scroll_bar *) GetControlReference (ch);
10757 #ifdef USE_TOOLKIT_SCROLL_BARS 10766 #ifdef USE_TOOLKIT_SCROLL_BARS
10758 /* Make the "Ctrl-Mouse-2 splits window" work 10767 /* Make the "Ctrl-Mouse-2 splits window" work
10759 for toolkit scroll bars. */ 10768 for toolkit scroll bars. */
10760 if (er.modifiers & controlKey) 10769 if (inev.modifiers & ctrl_modifier)
10761 x_scroll_bar_handle_click (bar, control_part_code, 10770 x_scroll_bar_handle_click (bar, control_part_code,
10762 &er, &inev); 10771 &er, &inev);
10763 else if (er.what == mouseDown) 10772 else if (er.what == mouseDown)
10764 x_scroll_bar_handle_press (bar, control_part_code, 10773 x_scroll_bar_handle_press (bar, control_part_code,
10765 &inev); 10774 mouse_loc, &inev);
10766 else 10775 else
10767 x_scroll_bar_handle_release (bar, &inev); 10776 x_scroll_bar_handle_release (bar, &inev);
10768 #else /* not USE_TOOLKIT_SCROLL_BARS */ 10777 #else /* not USE_TOOLKIT_SCROLL_BARS */
10769 x_scroll_bar_handle_click (bar, control_part_code, 10778 x_scroll_bar_handle_click (bar, control_part_code,
10770 &er, &inev); 10779 &er, &inev);
10823 ButtonPress. */ 10832 ButtonPress. */
10824 if (f != 0) 10833 if (f != 0)
10825 f->mouse_moved = 0; 10834 f->mouse_moved = 0;
10826 10835
10827 #ifdef USE_TOOLKIT_SCROLL_BARS 10836 #ifdef USE_TOOLKIT_SCROLL_BARS
10828 if (inev.kind == MOUSE_CLICK_EVENT) 10837 if (inev.kind == MOUSE_CLICK_EVENT
10838 || (inev.kind == SCROLL_BAR_CLICK_EVENT
10839 && (inev.modifiers & ctrl_modifier)))
10829 #endif 10840 #endif
10830 switch (er.what) 10841 switch (er.what)
10831 { 10842 {
10832 case mouseDown: 10843 case mouseDown:
10833 inev.modifiers |= down_modifier; 10844 inev.modifiers |= down_modifier;
11163 else if (mapped_modifiers) 11174 else if (mapped_modifiers)
11164 { 11175 {
11165 /* translate the keycode back to determine the 11176 /* translate the keycode back to determine the
11166 original key */ 11177 original key */
11167 #ifdef MAC_OSX 11178 #ifdef MAC_OSX
11179 UCKeyboardLayout *uchr_ptr = NULL;
11180 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
11181 OSStatus err;
11182 KeyboardLayoutRef layout;
11183
11184 err = KLGetCurrentKeyboardLayout (&layout);
11185 if (err == noErr)
11186 KLGetKeyboardLayoutProperty (layout, kKLuchrData,
11187 (const void **) &uchr_ptr);
11188 #else
11168 static SInt16 last_key_layout_id = 0; 11189 static SInt16 last_key_layout_id = 0;
11169 static Handle uchr_handle = (Handle)-1; 11190 static Handle uchr_handle = (Handle)-1;
11170 SInt16 current_key_layout_id = 11191 SInt16 current_key_layout_id =
11171 GetScriptVariable (current_key_script, smScriptKeys); 11192 GetScriptVariable (current_key_script, smScriptKeys);
11172 11193
11174 || last_key_layout_id != current_key_layout_id) 11195 || last_key_layout_id != current_key_layout_id)
11175 { 11196 {
11176 uchr_handle = GetResource ('uchr', current_key_layout_id); 11197 uchr_handle = GetResource ('uchr', current_key_layout_id);
11177 last_key_layout_id = current_key_layout_id; 11198 last_key_layout_id = current_key_layout_id;
11178 } 11199 }
11179
11180 if (uchr_handle) 11200 if (uchr_handle)
11201 uchr_ptr = (UCKeyboardLayout *)*uchr_handle;
11202 #endif
11203
11204 if (uchr_ptr)
11181 { 11205 {
11182 OSStatus status; 11206 OSStatus status;
11183 UInt16 key_action = er.what - keyDown; 11207 UInt16 key_action = er.what - keyDown;
11184 UInt32 modifier_key_state = 11208 UInt32 modifier_key_state =
11185 (modifiers & ~mapped_modifiers) >> 8; 11209 (modifiers & ~mapped_modifiers) >> 8;
11186 UInt32 keyboard_type = LMGetKbdType (); 11210 UInt32 keyboard_type = LMGetKbdType ();
11187 SInt32 dead_key_state = 0; 11211 SInt32 dead_key_state = 0;
11188 UniChar code; 11212 UniChar code;
11189 UniCharCount actual_length; 11213 UniCharCount actual_length;
11190 11214
11191 status = UCKeyTranslate ((UCKeyboardLayout *)*uchr_handle, 11215 status = UCKeyTranslate (uchr_ptr,
11192 keycode, key_action, 11216 keycode, key_action,
11193 modifier_key_state, 11217 modifier_key_state,
11194 keyboard_type, 11218 keyboard_type,
11195 kUCKeyTranslateNoDeadKeysMask, 11219 kUCKeyTranslateNoDeadKeysMask,
11196 &dead_key_state, 11220 &dead_key_state,
11638 bzero (dpyinfo, sizeof (*dpyinfo)); 11662 bzero (dpyinfo, sizeof (*dpyinfo));
11639 } 11663 }
11640 } 11664 }
11641 11665
11642 11666
11643 #ifdef MAC_OSX
11644 void
11645 MakeMeTheFrontProcess ()
11646 {
11647 ProcessSerialNumber psn;
11648 OSErr err;
11649
11650 err = GetCurrentProcess (&psn);
11651 if (err == noErr)
11652 (void) SetFrontProcess (&psn);
11653 }
11654 #endif /* MAC_OSX */
11655
11656 static void 11667 static void
11657 init_menu_bar () 11668 init_menu_bar ()
11658 { 11669 {
11659 #ifdef MAC_OSX 11670 #ifdef MAC_OSX
11660 OSStatus err; 11671 OSStatus err;
11715 x_after_update_window_line, 11726 x_after_update_window_line,
11716 x_update_window_begin, 11727 x_update_window_begin,
11717 x_update_window_end, 11728 x_update_window_end,
11718 x_cursor_to, 11729 x_cursor_to,
11719 x_flush, 11730 x_flush,
11731 #if USE_CG_DRAWING
11732 mac_flush_display_optional,
11733 #else
11720 0, /* flush_display_optional */ 11734 0, /* flush_display_optional */
11735 #endif
11721 x_clear_window_mouse_face, 11736 x_clear_window_mouse_face,
11722 x_get_glyph_overhangs, 11737 x_get_glyph_overhangs,
11723 x_fix_overlapping_area, 11738 x_fix_overlapping_area,
11724 x_draw_fringe_bitmap, 11739 x_draw_fringe_bitmap,
11725 #if USE_CG_DRAWING 11740 #if USE_CG_DRAWING
11802 init_coercion_handler (); 11817 init_coercion_handler ();
11803 11818
11804 init_apple_event_handler (); 11819 init_apple_event_handler ();
11805 11820
11806 if (!inhibit_window_system) 11821 if (!inhibit_window_system)
11807 MakeMeTheFrontProcess (); 11822 {
11823 static const ProcessSerialNumber psn = {0, kCurrentProcess};
11824
11825 SetFrontProcess (&psn);
11826 }
11808 #endif 11827 #endif
11809 #endif 11828 #endif
11810 11829
11811 #if USE_CG_DRAWING 11830 #if USE_CG_DRAWING
11812 init_cg_color (); 11831 init_cg_color ();