diff options
| author | Steven Tamm | 2004-10-06 15:38:53 +0000 |
|---|---|---|
| committer | Steven Tamm | 2004-10-06 15:38:53 +0000 |
| commit | bf06c82f4b0fba280db8130b801aa5a455ff7f63 (patch) | |
| tree | d8ebe9da728642ec6a4e54f5d164d9d27eafe9e9 /src | |
| parent | 811120105c9f33a56f7bb6d0e0ce9f82379cb723 (diff) | |
| download | emacs-bf06c82f4b0fba280db8130b801aa5a455ff7f63.tar.gz emacs-bf06c82f4b0fba280db8130b801aa5a455ff7f63.zip | |
macfns.c (mac_get_window_bounds): Add extern.
(x_real_positions): Use mac_get_window_bounds.
macmenu.c (update_submenu_strings): Apply 2004-09-07 change for
xmenu.c (YAILOM).
macterm.c [!MAC_OSX]: Include Windows.h.
(front_emacs_window): Rename from mac_front_window. All uses
changed. Return the frontmost non-tooltip emacs window.
(mac_get_window_bounds): New function.
(x_calc_absolute_position): Use the difference of width and height
between the inner and outer window.
(x_set_offset): Specify window position by the coordinae of the
outer window. Adjust the position if the title bar is completely
outside the screen.
(app_is_suspended, app_sleep_time): Remove unused variables.
(do_app_resume, do_app_suspend): Remove their contents because
window-activate/deactivate events will do the job.
(do_zoom_window): Remove unused variables. Make compliant to the
standard way of zooming. Set f->left_pos and f->top_pos.
(XTread_socket): Don't use argument `expected'. Don't use
FrontWindow to determine the clicked window. Exclude unprocessed
mouseUp cases in the early stage. Add parentheses to fix operator
precedence.
(XTread_socket) [TARGET_API_MAC_CARBON]: Don't specify drag area.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 29 | ||||
| -rw-r--r-- | src/macfns.c | 33 | ||||
| -rw-r--r-- | src/macmenu.c | 4 | ||||
| -rw-r--r-- | src/macterm.c | 310 |
4 files changed, 216 insertions, 160 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b7ff8d45c25..99be23b4df8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,32 @@ | |||
| 1 | 2004-10-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * macfns.c (mac_get_window_bounds): Add extern. | ||
| 4 | (x_real_positions): Use mac_get_window_bounds. | ||
| 5 | |||
| 6 | * macmenu.c (update_submenu_strings): Apply 2004-09-07 change for | ||
| 7 | xmenu.c (YAILOM). | ||
| 8 | |||
| 9 | * macterm.c [!MAC_OSX]: Include Windows.h. | ||
| 10 | (front_emacs_window): Rename from mac_front_window. All uses | ||
| 11 | changed. Return the frontmost non-tooltip emacs window. | ||
| 12 | (mac_get_window_bounds): New function. | ||
| 13 | (x_calc_absolute_position): Use the difference of width and height | ||
| 14 | between the inner and outer window. | ||
| 15 | (x_set_offset): Specify window position by the coordinae of the | ||
| 16 | outer window. Adjust the position if the title bar is completely | ||
| 17 | outside the screen. | ||
| 18 | (app_is_suspended, app_sleep_time): Remove unused variables. | ||
| 19 | (do_app_resume, do_app_suspend): Remove their contents because | ||
| 20 | window-activate/deactivate events will do the job. | ||
| 21 | (do_zoom_window): Remove unused variables. Make compliant to the | ||
| 22 | standard way of zooming. Set f->left_pos and f->top_pos. | ||
| 23 | (XTread_socket): Don't use argument `expected'. Don't use | ||
| 24 | FrontWindow to determine the clicked window. Exclude unprocessed | ||
| 25 | mouseUp cases in the early stage. Add parentheses to fix operator | ||
| 26 | precedence. | ||
| 27 | (XTread_socket) [TARGET_API_MAC_CARBON]: Don't specify drag area. | ||
| 28 | |||
| 29 | |||
| 1 | 2004-10-05 Jan Dj,Ad(Brv. <jan.h.d@swipnet.se> | 30 | 2004-10-05 Jan Dj,Ad(Brv. <jan.h.d@swipnet.se> |
| 2 | 31 | ||
| 3 | * config.in: Regenerate. | 32 | * config.in: Regenerate. |
diff --git a/src/macfns.c b/src/macfns.c index 3b09b344a55..f7594e9c6c2 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -312,6 +312,9 @@ static Lisp_Object x_default_scroll_bar_color_parameter P_ ((struct frame *, | |||
| 312 | Lisp_Object, | 312 | Lisp_Object, |
| 313 | char *, char *, | 313 | char *, char *, |
| 314 | int)); | 314 | int)); |
| 315 | |||
| 316 | extern void mac_get_window_bounds P_ ((struct frame *, Rect *, Rect *)); | ||
| 317 | |||
| 315 | /* Store the screen positions of frame F into XPTR and YPTR. | 318 | /* Store the screen positions of frame F into XPTR and YPTR. |
| 316 | These are the positions of the containing window manager window, | 319 | These are the positions of the containing window manager window, |
| 317 | not Emacs's own window. */ | 320 | not Emacs's own window. */ |
| @@ -321,33 +324,15 @@ x_real_positions (f, xptr, yptr) | |||
| 321 | FRAME_PTR f; | 324 | FRAME_PTR f; |
| 322 | int *xptr, *yptr; | 325 | int *xptr, *yptr; |
| 323 | { | 326 | { |
| 324 | Point pt; | 327 | Rect inner, outer; |
| 325 | GrafPtr oldport; | ||
| 326 | 328 | ||
| 327 | GetPort (&oldport); | 329 | mac_get_window_bounds (f, &inner, &outer); |
| 328 | SetPortWindowPort (FRAME_MAC_WINDOW (f)); | ||
| 329 | 330 | ||
| 330 | #if TARGET_API_MAC_CARBON | 331 | f->x_pixels_diff = inner.left - outer.left; |
| 331 | { | 332 | f->y_pixels_diff = inner.top - outer.top; |
| 332 | Rect r; | ||
| 333 | 333 | ||
| 334 | GetWindowPortBounds (FRAME_MAC_WINDOW (f), &r); | 334 | *xptr = outer.left; |
| 335 | SetPt (&pt, r.left, r.top); | 335 | *yptr = outer.top; |
| 336 | } | ||
| 337 | #else /* not TARGET_API_MAC_CARBON */ | ||
| 338 | SetPt (&pt, | ||
| 339 | FRAME_MAC_WINDOW (f)->portRect.left, | ||
| 340 | FRAME_MAC_WINDOW (f)->portRect.top); | ||
| 341 | #endif /* not TARGET_API_MAC_CARBON */ | ||
| 342 | LocalToGlobal (&pt); | ||
| 343 | SetPort (oldport); | ||
| 344 | |||
| 345 | /* MAC has no frame pixel diff. */ | ||
| 346 | f->x_pixels_diff = 0; | ||
| 347 | f->y_pixels_diff = 0; | ||
| 348 | |||
| 349 | *xptr = pt.h; | ||
| 350 | *yptr = pt.v; | ||
| 351 | } | 336 | } |
| 352 | 337 | ||
| 353 | 338 | ||
diff --git a/src/macmenu.c b/src/macmenu.c index 740bda261d8..007fab15eab 100644 --- a/src/macmenu.c +++ b/src/macmenu.c | |||
| @@ -1322,7 +1322,7 @@ update_submenu_strings (first_wv) | |||
| 1322 | 1322 | ||
| 1323 | for (wv = first_wv; wv; wv = wv->next) | 1323 | for (wv = first_wv; wv; wv = wv->next) |
| 1324 | { | 1324 | { |
| 1325 | if (wv->lname && ! NILP (wv->lname)) | 1325 | if (STRINGP (wv->lname)) |
| 1326 | { | 1326 | { |
| 1327 | wv->name = SDATA (wv->lname); | 1327 | wv->name = SDATA (wv->lname); |
| 1328 | 1328 | ||
| @@ -1336,7 +1336,7 @@ update_submenu_strings (first_wv) | |||
| 1336 | } | 1336 | } |
| 1337 | } | 1337 | } |
| 1338 | 1338 | ||
| 1339 | if (wv->lkey && ! NILP (wv->lkey)) | 1339 | if (STRINGP (wv->lkey)) |
| 1340 | wv->key = SDATA (wv->lkey); | 1340 | wv->key = SDATA (wv->lkey); |
| 1341 | 1341 | ||
| 1342 | if (wv->contents) | 1342 | if (wv->contents) |
diff --git a/src/macterm.c b/src/macterm.c index 0177d57fec8..0587c5d15ba 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -50,6 +50,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 50 | #include <TextUtils.h> | 50 | #include <TextUtils.h> |
| 51 | #include <LowMem.h> | 51 | #include <LowMem.h> |
| 52 | #include <Controls.h> | 52 | #include <Controls.h> |
| 53 | #include <Windows.h> | ||
| 53 | #if defined (__MRC__) || (__MSL__ >= 0x6000) | 54 | #if defined (__MRC__) || (__MSL__ >= 0x6000) |
| 54 | #include <ControlDefinitions.h> | 55 | #include <ControlDefinitions.h> |
| 55 | #endif | 56 | #endif |
| @@ -3887,18 +3888,21 @@ remember_mouse_glyph (f1, gx, gy) | |||
| 3887 | 3888 | ||
| 3888 | 3889 | ||
| 3889 | static WindowPtr | 3890 | static WindowPtr |
| 3890 | mac_front_window () | 3891 | front_emacs_window () |
| 3891 | { | 3892 | { |
| 3892 | #if TARGET_API_MAC_CARBON | 3893 | #if TARGET_API_MAC_CARBON |
| 3893 | return GetFrontWindowOfClass (kDocumentWindowClass, true); | 3894 | WindowPtr wp = GetFrontWindowOfClass (kDocumentWindowClass, true); |
| 3895 | |||
| 3896 | while (wp && !is_emacs_window (wp)) | ||
| 3897 | wp = GetNextWindowOfClass (wp, kDocumentWindowClass, true); | ||
| 3894 | #else | 3898 | #else |
| 3895 | WindowPtr front_window = FrontWindow (); | 3899 | WindowPtr wp = FrontWindow (); |
| 3896 | 3900 | ||
| 3897 | if (tip_window && front_window == tip_window) | 3901 | while (wp && (wp == tip_window || !is_emacs_window (wp))) |
| 3898 | return GetNextWindow (front_window); | 3902 | wp = GetNextWindow (wp); |
| 3899 | else | ||
| 3900 | return front_window; | ||
| 3901 | #endif | 3903 | #endif |
| 3904 | |||
| 3905 | return wp; | ||
| 3902 | } | 3906 | } |
| 3903 | 3907 | ||
| 3904 | #define mac_window_to_frame(wp) (((mac_output *) GetWRefCon (wp))->mFP) | 3908 | #define mac_window_to_frame(wp) (((mac_output *) GetWRefCon (wp))->mFP) |
| @@ -3934,7 +3938,7 @@ XTmouse_position (fp, insist, bar_window, part, x, y, time) | |||
| 3934 | { | 3938 | { |
| 3935 | Point mouse_pos; | 3939 | Point mouse_pos; |
| 3936 | int ignore1, ignore2; | 3940 | int ignore1, ignore2; |
| 3937 | WindowPtr wp = mac_front_window (); | 3941 | WindowPtr wp = front_emacs_window (); |
| 3938 | struct frame *f; | 3942 | struct frame *f; |
| 3939 | Lisp_Object frame, tail; | 3943 | Lisp_Object frame, tail; |
| 3940 | 3944 | ||
| @@ -4551,7 +4555,7 @@ x_scroll_bar_report_motion (fp, bar_window, part, x, y, time) | |||
| 4551 | unsigned long *time; | 4555 | unsigned long *time; |
| 4552 | { | 4556 | { |
| 4553 | struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar); | 4557 | struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar); |
| 4554 | WindowPtr wp = mac_front_window (); | 4558 | WindowPtr wp = front_emacs_window (); |
| 4555 | Point mouse_pos; | 4559 | Point mouse_pos; |
| 4556 | struct frame *f = mac_window_to_frame (wp); | 4560 | struct frame *f = mac_window_to_frame (wp); |
| 4557 | int win_y, top_range; | 4561 | int win_y, top_range; |
| @@ -5036,6 +5040,26 @@ xim_close_dpy (dpyinfo) | |||
| 5036 | */ | 5040 | */ |
| 5037 | 5041 | ||
| 5038 | 5042 | ||
| 5043 | void | ||
| 5044 | mac_get_window_bounds (f, inner, outer) | ||
| 5045 | struct frame *f; | ||
| 5046 | Rect *inner, *outer; | ||
| 5047 | { | ||
| 5048 | #if TARGET_API_MAC_CARBON | ||
| 5049 | GetWindowBounds (FRAME_MAC_WINDOW (f), kWindowContentRgn, inner); | ||
| 5050 | GetWindowBounds (FRAME_MAC_WINDOW (f), kWindowStructureRgn, outer); | ||
| 5051 | #else /* not TARGET_API_MAC_CARBON */ | ||
| 5052 | RgnHandle region = NewRgn (); | ||
| 5053 | |||
| 5054 | GetWindowRegion (FRAME_MAC_WINDOW (f), kWindowContentRgn, region); | ||
| 5055 | *inner = (*region)->rgnBBox; | ||
| 5056 | GetWindowRegion (FRAME_MAC_WINDOW (f), kWindowStructureRgn, region); | ||
| 5057 | *outer = (*region)->rgnBBox; | ||
| 5058 | DisposeRgn (region); | ||
| 5059 | #endif /* not TARGET_API_MAC_CARBON */ | ||
| 5060 | } | ||
| 5061 | |||
| 5062 | |||
| 5039 | /* Calculate the absolute position in frame F | 5063 | /* Calculate the absolute position in frame F |
| 5040 | from its current recorded position values and gravity. */ | 5064 | from its current recorded position values and gravity. */ |
| 5041 | 5065 | ||
| @@ -5043,47 +5067,36 @@ void | |||
| 5043 | x_calc_absolute_position (f) | 5067 | x_calc_absolute_position (f) |
| 5044 | struct frame *f; | 5068 | struct frame *f; |
| 5045 | { | 5069 | { |
| 5046 | Point pt; | 5070 | int width_diff = 0, height_diff = 0; |
| 5047 | int flags = f->size_hint_flags; | 5071 | int flags = f->size_hint_flags; |
| 5072 | Rect inner, outer; | ||
| 5048 | 5073 | ||
| 5049 | pt.h = pt.v = 0; | 5074 | /* We have nothing to do if the current position |
| 5075 | is already for the top-left corner. */ | ||
| 5076 | if (! ((flags & XNegative) || (flags & YNegative))) | ||
| 5077 | return; | ||
| 5050 | 5078 | ||
| 5051 | /* Find the position of the outside upper-left corner of | 5079 | /* Find the offsets of the outside upper-left corner of |
| 5052 | the inner window, with respect to the outer window. */ | 5080 | the inner window, with respect to the outer window. */ |
| 5053 | if (f->output_data.mac->parent_desc != FRAME_MAC_DISPLAY_INFO (f)->root_window) | 5081 | mac_get_window_bounds (f, &inner, &outer); |
| 5054 | { | ||
| 5055 | GrafPtr savePort; | ||
| 5056 | GetPort (&savePort); | ||
| 5057 | |||
| 5058 | SetPortWindowPort (FRAME_MAC_WINDOW (f)); | ||
| 5059 | 5082 | ||
| 5060 | #if TARGET_API_MAC_CARBON | 5083 | width_diff = (outer.right - outer.left) - (inner.right - inner.left); |
| 5061 | { | 5084 | height_diff = (outer.bottom - outer.top) - (inner.bottom - inner.top); |
| 5062 | Rect r; | ||
| 5063 | |||
| 5064 | GetWindowPortBounds (FRAME_MAC_WINDOW (f), &r); | ||
| 5065 | SetPt(&pt, r.left, r.top); | ||
| 5066 | } | ||
| 5067 | #else /* not TARGET_API_MAC_CARBON */ | ||
| 5068 | SetPt(&pt, FRAME_MAC_WINDOW (f)->portRect.left, FRAME_MAC_WINDOW (f)->portRect.top); | ||
| 5069 | #endif /* not TARGET_API_MAC_CARBON */ | ||
| 5070 | LocalToGlobal (&pt); | ||
| 5071 | SetPort (savePort); | ||
| 5072 | } | ||
| 5073 | 5085 | ||
| 5074 | /* Treat negative positions as relative to the leftmost bottommost | 5086 | /* Treat negative positions as relative to the leftmost bottommost |
| 5075 | position that fits on the screen. */ | 5087 | position that fits on the screen. */ |
| 5076 | if (flags & XNegative) | 5088 | if (flags & XNegative) |
| 5077 | f->left_pos = (FRAME_MAC_DISPLAY_INFO (f)->width | 5089 | f->left_pos = (FRAME_MAC_DISPLAY_INFO (f)->width |
| 5078 | - 2 * f->border_width - pt.h | 5090 | - width_diff |
| 5079 | - FRAME_PIXEL_WIDTH (f) | 5091 | - FRAME_PIXEL_WIDTH (f) |
| 5080 | + f->left_pos); | 5092 | + f->left_pos); |
| 5081 | /* NTEMACS_TODO: Subtract menubar height? */ | 5093 | |
| 5082 | if (flags & YNegative) | 5094 | if (flags & YNegative) |
| 5083 | f->top_pos = (FRAME_MAC_DISPLAY_INFO (f)->height | 5095 | f->top_pos = (FRAME_MAC_DISPLAY_INFO (f)->height |
| 5084 | - 2 * f->border_width - pt.v | 5096 | - height_diff |
| 5085 | - FRAME_PIXEL_HEIGHT (f) | 5097 | - FRAME_PIXEL_HEIGHT (f) |
| 5086 | + f->top_pos); | 5098 | + f->top_pos); |
| 5099 | |||
| 5087 | /* The left_pos and top_pos | 5100 | /* The left_pos and top_pos |
| 5088 | are now relative to the top and left screen edges, | 5101 | are now relative to the top and left screen edges, |
| 5089 | so the flags should correspond. */ | 5102 | so the flags should correspond. */ |
| @@ -5102,8 +5115,6 @@ x_set_offset (f, xoff, yoff, change_gravity) | |||
| 5102 | register int xoff, yoff; | 5115 | register int xoff, yoff; |
| 5103 | int change_gravity; | 5116 | int change_gravity; |
| 5104 | { | 5117 | { |
| 5105 | int modified_top, modified_left; | ||
| 5106 | |||
| 5107 | if (change_gravity > 0) | 5118 | if (change_gravity > 0) |
| 5108 | { | 5119 | { |
| 5109 | f->top_pos = yoff; | 5120 | f->top_pos = yoff; |
| @@ -5120,11 +5131,55 @@ x_set_offset (f, xoff, yoff, change_gravity) | |||
| 5120 | BLOCK_INPUT; | 5131 | BLOCK_INPUT; |
| 5121 | x_wm_set_size_hint (f, (long) 0, 0); | 5132 | x_wm_set_size_hint (f, (long) 0, 0); |
| 5122 | 5133 | ||
| 5123 | modified_left = f->left_pos; | 5134 | #if TARGET_API_MAC_CARBON |
| 5124 | modified_top = f->top_pos; | 5135 | MoveWindowStructure (FRAME_MAC_WINDOW (f), f->left_pos, f->top_pos); |
| 5125 | 5136 | /* If the title bar is completely outside the screen, adjust the | |
| 5126 | MoveWindow (FRAME_MAC_WINDOW (f), modified_left + 6, | 5137 | position. */ |
| 5127 | modified_top + 42, false); | 5138 | ConstrainWindowToScreen (FRAME_MAC_WINDOW (f), kWindowTitleBarRgn, |
| 5139 | kWindowConstrainMoveRegardlessOfFit | ||
| 5140 | | kWindowConstrainAllowPartial, NULL, NULL); | ||
| 5141 | x_real_positions (f, &f->left_pos, &f->top_pos); | ||
| 5142 | #else | ||
| 5143 | { | ||
| 5144 | Rect inner, outer, screen_rect, dummy; | ||
| 5145 | RgnHandle region = NewRgn (); | ||
| 5146 | |||
| 5147 | mac_get_window_bounds (f, &inner, &outer); | ||
| 5148 | f->x_pixels_diff = inner.left - outer.left; | ||
| 5149 | f->y_pixels_diff = inner.top - outer.top; | ||
| 5150 | MoveWindow (FRAME_MAC_WINDOW (f), f->left_pos + f->x_pixels_diff, | ||
| 5151 | f->top_pos + f->y_pixels_diff, false); | ||
| 5152 | |||
| 5153 | /* If the title bar is completely outside the screen, adjust the | ||
| 5154 | position. The variable `outer' holds the title bar rectangle. | ||
| 5155 | The variable `inner' holds slightly smaller one than `outer', | ||
| 5156 | so that the calculation of overlapping may not become too | ||
| 5157 | strict. */ | ||
| 5158 | GetWindowRegion (FRAME_MAC_WINDOW (f), kWindowTitleBarRgn, region); | ||
| 5159 | outer = (*region)->rgnBBox; | ||
| 5160 | DisposeRgn (region); | ||
| 5161 | inner = outer; | ||
| 5162 | InsetRect (&inner, 8, 8); | ||
| 5163 | screen_rect = qd.screenBits.bounds; | ||
| 5164 | screen_rect.top += GetMBarHeight (); | ||
| 5165 | |||
| 5166 | if (!SectRect (&inner, &screen_rect, &dummy)) | ||
| 5167 | { | ||
| 5168 | if (inner.right <= screen_rect.left) | ||
| 5169 | f->left_pos = screen_rect.left; | ||
| 5170 | else if (inner.left >= screen_rect.right) | ||
| 5171 | f->left_pos = screen_rect.right - (outer.right - outer.left); | ||
| 5172 | |||
| 5173 | if (inner.bottom <= screen_rect.top) | ||
| 5174 | f->top_pos = screen_rect.top; | ||
| 5175 | else if (inner.top >= screen_rect.bottom) | ||
| 5176 | f->top_pos = screen_rect.bottom - (outer.bottom - outer.top); | ||
| 5177 | |||
| 5178 | MoveWindow (FRAME_MAC_WINDOW (f), f->left_pos + f->x_pixels_diff, | ||
| 5179 | f->top_pos + f->y_pixels_diff, false); | ||
| 5180 | } | ||
| 5181 | } | ||
| 5182 | #endif | ||
| 5128 | 5183 | ||
| 5129 | UNBLOCK_INPUT; | 5184 | UNBLOCK_INPUT; |
| 5130 | } | 5185 | } |
| @@ -6900,6 +6955,7 @@ x_find_ccl_program (fontp) | |||
| 6900 | /* true when cannot handle any Mac OS events */ | 6955 | /* true when cannot handle any Mac OS events */ |
| 6901 | static int handling_window_update = 0; | 6956 | static int handling_window_update = 0; |
| 6902 | 6957 | ||
| 6958 | #if 0 | ||
| 6903 | /* the flag appl_is_suspended is used both for determining the sleep | 6959 | /* the flag appl_is_suspended is used both for determining the sleep |
| 6904 | time to be passed to WaitNextEvent and whether the cursor should be | 6960 | time to be passed to WaitNextEvent and whether the cursor should be |
| 6905 | drawn when updating the display. The cursor is turned off when | 6961 | drawn when updating the display. The cursor is turned off when |
| @@ -6909,6 +6965,7 @@ static int handling_window_update = 0; | |||
| 6909 | suspended. */ | 6965 | suspended. */ |
| 6910 | static Boolean app_is_suspended = false; | 6966 | static Boolean app_is_suspended = false; |
| 6911 | static long app_sleep_time = WNE_SLEEP_AT_RESUME; | 6967 | static long app_sleep_time = WNE_SLEEP_AT_RESUME; |
| 6968 | #endif | ||
| 6912 | 6969 | ||
| 6913 | #define EXTRA_STACK_ALLOC (256 * 1024) | 6970 | #define EXTRA_STACK_ALLOC (256 * 1024) |
| 6914 | 6971 | ||
| @@ -7235,11 +7292,13 @@ is_emacs_window (WindowPtr win) | |||
| 7235 | static void | 7292 | static void |
| 7236 | do_app_resume () | 7293 | do_app_resume () |
| 7237 | { | 7294 | { |
| 7295 | /* Window-activate events will do the job. */ | ||
| 7296 | #if 0 | ||
| 7238 | WindowPtr wp; | 7297 | WindowPtr wp; |
| 7239 | struct frame *f; | 7298 | struct frame *f; |
| 7240 | 7299 | ||
| 7241 | wp = mac_front_window (); | 7300 | wp = front_emacs_window (); |
| 7242 | if (is_emacs_window (wp)) | 7301 | if (wp) |
| 7243 | { | 7302 | { |
| 7244 | f = mac_window_to_frame (wp); | 7303 | f = mac_window_to_frame (wp); |
| 7245 | 7304 | ||
| @@ -7252,16 +7311,19 @@ do_app_resume () | |||
| 7252 | 7311 | ||
| 7253 | app_is_suspended = false; | 7312 | app_is_suspended = false; |
| 7254 | app_sleep_time = WNE_SLEEP_AT_RESUME; | 7313 | app_sleep_time = WNE_SLEEP_AT_RESUME; |
| 7314 | #endif | ||
| 7255 | } | 7315 | } |
| 7256 | 7316 | ||
| 7257 | static void | 7317 | static void |
| 7258 | do_app_suspend () | 7318 | do_app_suspend () |
| 7259 | { | 7319 | { |
| 7320 | /* Window-deactivate events will do the job. */ | ||
| 7321 | #if 0 | ||
| 7260 | WindowPtr wp; | 7322 | WindowPtr wp; |
| 7261 | struct frame *f; | 7323 | struct frame *f; |
| 7262 | 7324 | ||
| 7263 | wp = mac_front_window (); | 7325 | wp = front_emacs_window (); |
| 7264 | if (is_emacs_window (wp)) | 7326 | if (wp) |
| 7265 | { | 7327 | { |
| 7266 | f = mac_window_to_frame (wp); | 7328 | f = mac_window_to_frame (wp); |
| 7267 | 7329 | ||
| @@ -7274,6 +7336,7 @@ do_app_suspend () | |||
| 7274 | 7336 | ||
| 7275 | app_is_suspended = true; | 7337 | app_is_suspended = true; |
| 7276 | app_sleep_time = WNE_SLEEP_AT_SUSPEND; | 7338 | app_sleep_time = WNE_SLEEP_AT_SUSPEND; |
| 7339 | #endif | ||
| 7277 | } | 7340 | } |
| 7278 | 7341 | ||
| 7279 | 7342 | ||
| @@ -7282,10 +7345,10 @@ do_mouse_moved (mouse_pos, f) | |||
| 7282 | Point mouse_pos; | 7345 | Point mouse_pos; |
| 7283 | FRAME_PTR *f; | 7346 | FRAME_PTR *f; |
| 7284 | { | 7347 | { |
| 7285 | WindowPtr wp = mac_front_window (); | 7348 | WindowPtr wp = front_emacs_window (); |
| 7286 | struct x_display_info *dpyinfo; | 7349 | struct x_display_info *dpyinfo; |
| 7287 | 7350 | ||
| 7288 | if (is_emacs_window (wp)) | 7351 | if (wp) |
| 7289 | { | 7352 | { |
| 7290 | *f = mac_window_to_frame (wp); | 7353 | *f = mac_window_to_frame (wp); |
| 7291 | dpyinfo = FRAME_MAC_DISPLAY_INFO (*f); | 7354 | dpyinfo = FRAME_MAC_DISPLAY_INFO (*f); |
| @@ -7347,7 +7410,7 @@ do_menu_choice (SInt32 menu_choice) | |||
| 7347 | 7410 | ||
| 7348 | default: | 7411 | default: |
| 7349 | { | 7412 | { |
| 7350 | struct frame *f = mac_window_to_frame (mac_front_window ()); | 7413 | struct frame *f = mac_window_to_frame (front_emacs_window ()); |
| 7351 | MenuHandle menu = GetMenuHandle (menu_id); | 7414 | MenuHandle menu = GetMenuHandle (menu_id); |
| 7352 | if (menu) | 7415 | if (menu) |
| 7353 | { | 7416 | { |
| @@ -7400,41 +7463,43 @@ do_zoom_window (WindowPtr w, int zoom_in_or_out) | |||
| 7400 | GrafPtr save_port; | 7463 | GrafPtr save_port; |
| 7401 | Rect zoom_rect, port_rect; | 7464 | Rect zoom_rect, port_rect; |
| 7402 | Point top_left; | 7465 | Point top_left; |
| 7403 | int w_title_height, columns, rows, width, height, dummy, x, y; | 7466 | int w_title_height, columns, rows; |
| 7404 | struct frame *f = mac_window_to_frame (w); | 7467 | struct frame *f = mac_window_to_frame (w); |
| 7405 | 7468 | ||
| 7406 | GetPort (&save_port); | ||
| 7407 | |||
| 7408 | SetPortWindowPort (w); | ||
| 7409 | |||
| 7410 | /* Clear window to avoid flicker. */ | ||
| 7411 | #if TARGET_API_MAC_CARBON | 7469 | #if TARGET_API_MAC_CARBON |
| 7412 | { | 7470 | { |
| 7413 | Rect r; | 7471 | Point standard_size; |
| 7414 | BitMap bm; | ||
| 7415 | 7472 | ||
| 7416 | GetWindowPortBounds (w, &r); | 7473 | standard_size.h = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS); |
| 7417 | EraseRect (&r); | 7474 | standard_size.v = FRAME_MAC_DISPLAY_INFO (f)->height; |
| 7418 | 7475 | ||
| 7419 | if (zoom_in_or_out == inZoomOut) | 7476 | if (IsWindowInStandardState (w, &standard_size, &zoom_rect)) |
| 7477 | zoom_in_or_out = inZoomIn; | ||
| 7478 | else | ||
| 7420 | { | 7479 | { |
| 7421 | /* calculate height of window's title bar (hard card it for now). */ | 7480 | /* Adjust the standard size according to character boundaries. */ |
| 7422 | w_title_height = 20 + GetMBarHeight (); | 7481 | |
| 7423 | 7482 | columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, zoom_rect.right - zoom_rect.left); | |
| 7424 | /* get maximum height of window into zoom_rect.bottom - | 7483 | rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, zoom_rect.bottom - zoom_rect.top); |
| 7425 | zoom_rect.top */ | 7484 | standard_size.h = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, columns); |
| 7426 | GetQDGlobalsScreenBits (&bm); | 7485 | standard_size.v = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows); |
| 7427 | zoom_rect = bm.bounds; | 7486 | GetWindowBounds (w, kWindowContentRgn, &port_rect); |
| 7428 | zoom_rect.top += w_title_height; | 7487 | if (IsWindowInStandardState (w, &standard_size, &zoom_rect) |
| 7429 | InsetRect (&zoom_rect, 8, 4); /* not too tight */ | 7488 | && port_rect.left == zoom_rect.left |
| 7430 | 7489 | && port_rect.top == zoom_rect.top) | |
| 7431 | zoom_rect.right = zoom_rect.left | 7490 | zoom_in_or_out = inZoomIn; |
| 7432 | + FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS); | 7491 | else |
| 7433 | 7492 | zoom_in_or_out = inZoomOut; | |
| 7434 | SetWindowStandardState (w, &zoom_rect); | ||
| 7435 | } | 7493 | } |
| 7494 | |||
| 7495 | ZoomWindowIdeal (w, zoom_in_or_out, &standard_size); | ||
| 7436 | } | 7496 | } |
| 7437 | #else /* not TARGET_API_MAC_CARBON */ | 7497 | #else /* not TARGET_API_MAC_CARBON */ |
| 7498 | GetPort (&save_port); | ||
| 7499 | |||
| 7500 | SetPortWindowPort (w); | ||
| 7501 | |||
| 7502 | /* Clear window to avoid flicker. */ | ||
| 7438 | EraseRect (&(w->portRect)); | 7503 | EraseRect (&(w->portRect)); |
| 7439 | if (zoom_in_or_out == inZoomOut) | 7504 | if (zoom_in_or_out == inZoomOut) |
| 7440 | { | 7505 | { |
| @@ -7453,12 +7518,19 @@ do_zoom_window (WindowPtr w, int zoom_in_or_out) | |||
| 7453 | zoom_rect.right = zoom_rect.left | 7518 | zoom_rect.right = zoom_rect.left |
| 7454 | + FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS); | 7519 | + FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS); |
| 7455 | 7520 | ||
| 7521 | /* Adjust the standard size according to character boundaries. */ | ||
| 7522 | rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, zoom_rect.bottom - zoom_rect.top); | ||
| 7523 | zoom_rect.bottom = | ||
| 7524 | zoom_rect.top + FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows); | ||
| 7525 | |||
| 7456 | (**((WStateDataHandle) ((WindowPeek) w)->dataHandle)).stdState | 7526 | (**((WStateDataHandle) ((WindowPeek) w)->dataHandle)).stdState |
| 7457 | = zoom_rect; | 7527 | = zoom_rect; |
| 7458 | } | 7528 | } |
| 7459 | #endif /* not TARGET_API_MAC_CARBON */ | ||
| 7460 | 7529 | ||
| 7461 | ZoomWindow (w, zoom_in_or_out, w == mac_front_window ()); | 7530 | ZoomWindow (w, zoom_in_or_out, w == front_emacs_window ()); |
| 7531 | |||
| 7532 | SetPort (save_port); | ||
| 7533 | #endif /* not TARGET_API_MAC_CARBON */ | ||
| 7462 | 7534 | ||
| 7463 | /* retrieve window size and update application values */ | 7535 | /* retrieve window size and update application values */ |
| 7464 | #if TARGET_API_MAC_CARBON | 7536 | #if TARGET_API_MAC_CARBON |
| @@ -7469,8 +7541,7 @@ do_zoom_window (WindowPtr w, int zoom_in_or_out) | |||
| 7469 | rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, port_rect.bottom - port_rect.top); | 7541 | rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, port_rect.bottom - port_rect.top); |
| 7470 | columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, port_rect.right - port_rect.left); | 7542 | columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, port_rect.right - port_rect.left); |
| 7471 | x_set_window_size (f, 0, columns, rows); | 7543 | x_set_window_size (f, 0, columns, rows); |
| 7472 | 7544 | x_real_positions (f, &f->left_pos, &f->top_pos); | |
| 7473 | SetPort (save_port); | ||
| 7474 | } | 7545 | } |
| 7475 | 7546 | ||
| 7476 | /* Initialize Drag And Drop to allow files to be dropped onto emacs frames */ | 7547 | /* Initialize Drag And Drop to allow files to be dropped onto emacs frames */ |
| @@ -8020,19 +8091,15 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8020 | if (NILP (Fboundp (Qmac_ready_for_drag_n_drop))) | 8091 | if (NILP (Fboundp (Qmac_ready_for_drag_n_drop))) |
| 8021 | event_mask -= highLevelEventMask; | 8092 | event_mask -= highLevelEventMask; |
| 8022 | 8093 | ||
| 8023 | while (WaitNextEvent (event_mask, &er, | 8094 | while (WaitNextEvent (event_mask, &er, 0L, NULL)) |
| 8024 | (expected ? app_sleep_time : 0L), NULL)) | 8095 | #else /* USE_CARBON_EVENTS */ |
| 8025 | #else | 8096 | while (!ReceiveNextEvent (0, NULL, kEventDurationNoWait, |
| 8026 | while (!ReceiveNextEvent (0, NULL, | ||
| 8027 | (expected ? TicksToEventTime (app_sleep_time) : 0), | ||
| 8028 | kEventRemoveFromQueue, &eventRef)) | 8097 | kEventRemoveFromQueue, &eventRef)) |
| 8029 | #endif /* !USE_CARBON_EVENTS */ | 8098 | #endif /* USE_CARBON_EVENTS */ |
| 8030 | { | 8099 | { |
| 8031 | int do_help = 0; | 8100 | int do_help = 0; |
| 8032 | struct frame *f; | 8101 | struct frame *f; |
| 8033 | 8102 | ||
| 8034 | expected = 0; | ||
| 8035 | |||
| 8036 | /* It is necessary to set this (additional) argument slot of an | 8103 | /* It is necessary to set this (additional) argument slot of an |
| 8037 | event to nil because keyboard.c protects incompletely | 8104 | event to nil because keyboard.c protects incompletely |
| 8038 | processed event from being garbage collected by placing them | 8105 | processed event from being garbage collected by placing them |
| @@ -8055,13 +8122,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8055 | NULL, &window_ptr); | 8122 | NULL, &window_ptr); |
| 8056 | f = mac_window_to_frame (window_ptr); | 8123 | f = mac_window_to_frame (window_ptr); |
| 8057 | if (f && !f->async_iconified) | 8124 | if (f && !f->async_iconified) |
| 8058 | { | 8125 | x_real_positions (f, &f->left_pos, &f->top_pos); |
| 8059 | int x, y; | ||
| 8060 | |||
| 8061 | x_real_positions (f, &x, &y); | ||
| 8062 | f->left_pos = x; | ||
| 8063 | f->top_pos = y; | ||
| 8064 | } | ||
| 8065 | SendEventToEventTarget (eventRef, toolbox_dispatcher); | 8126 | SendEventToEventTarget (eventRef, toolbox_dispatcher); |
| 8066 | } | 8127 | } |
| 8067 | break; | 8128 | break; |
| @@ -8070,7 +8131,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8070 | { | 8131 | { |
| 8071 | SInt32 delta; | 8132 | SInt32 delta; |
| 8072 | Point point; | 8133 | Point point; |
| 8073 | WindowPtr window_ptr = mac_front_window (); | 8134 | WindowPtr window_ptr = front_emacs_window (); |
| 8074 | 8135 | ||
| 8075 | if (!IsValidWindowPtr (window_ptr)) | 8136 | if (!IsValidWindowPtr (window_ptr)) |
| 8076 | { | 8137 | { |
| @@ -8132,33 +8193,28 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8132 | } | 8193 | } |
| 8133 | else | 8194 | else |
| 8134 | { | 8195 | { |
| 8135 | window_ptr = FrontWindow (); | 8196 | part_code = FindWindow (er.where, &window_ptr); |
| 8136 | if (tip_window && window_ptr == tip_window) | 8197 | if (tip_window && window_ptr == tip_window) |
| 8137 | { | 8198 | { |
| 8138 | HideWindow (tip_window); | 8199 | HideWindow (tip_window); |
| 8139 | window_ptr = FrontWindow (); | 8200 | part_code = FindWindow (er.where, &window_ptr); |
| 8140 | } | 8201 | } |
| 8141 | |||
| 8142 | if (!is_emacs_window (window_ptr)) | ||
| 8143 | break; | ||
| 8144 | |||
| 8145 | part_code = FindWindow (er.where, &window_ptr); | ||
| 8146 | } | 8202 | } |
| 8147 | 8203 | ||
| 8204 | if (er.what != mouseDown && part_code != inContent) | ||
| 8205 | break; | ||
| 8206 | |||
| 8148 | switch (part_code) | 8207 | switch (part_code) |
| 8149 | { | 8208 | { |
| 8150 | case inMenuBar: | 8209 | case inMenuBar: |
| 8151 | if (er.what == mouseDown) | 8210 | f = mac_window_to_frame (front_emacs_window ()); |
| 8152 | { | 8211 | saved_menu_event_location = er.where; |
| 8153 | f = mac_window_to_frame (mac_front_window ()); | 8212 | inev.kind = MENU_BAR_ACTIVATE_EVENT; |
| 8154 | saved_menu_event_location = er.where; | 8213 | XSETFRAME (inev.frame_or_window, f); |
| 8155 | inev.kind = MENU_BAR_ACTIVATE_EVENT; | ||
| 8156 | XSETFRAME (inev.frame_or_window, f); | ||
| 8157 | } | ||
| 8158 | break; | 8214 | break; |
| 8159 | 8215 | ||
| 8160 | case inContent: | 8216 | case inContent: |
| 8161 | if (window_ptr != mac_front_window ()) | 8217 | if (window_ptr != front_emacs_window ()) |
| 8162 | SelectWindow (window_ptr); | 8218 | SelectWindow (window_ptr); |
| 8163 | else | 8219 | else |
| 8164 | { | 8220 | { |
| @@ -8255,7 +8311,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8255 | } | 8311 | } |
| 8256 | else | 8312 | else |
| 8257 | { | 8313 | { |
| 8258 | if (dpyinfo->grabbed & (1 << inev.code) == 0) | 8314 | if ((dpyinfo->grabbed & (1 << inev.code)) == 0) |
| 8259 | /* If a button is released though it was not | 8315 | /* If a button is released though it was not |
| 8260 | previously pressed, that would be because | 8316 | previously pressed, that would be because |
| 8261 | of multi-button emulation. */ | 8317 | of multi-button emulation. */ |
| @@ -8278,27 +8334,16 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8278 | 8334 | ||
| 8279 | case inDrag: | 8335 | case inDrag: |
| 8280 | #if TARGET_API_MAC_CARBON | 8336 | #if TARGET_API_MAC_CARBON |
| 8281 | if (er.what == mouseDown) | 8337 | DragWindow (window_ptr, er.where, NULL); |
| 8282 | { | ||
| 8283 | BitMap bm; | ||
| 8284 | |||
| 8285 | GetQDGlobalsScreenBits (&bm); | ||
| 8286 | DragWindow (window_ptr, er.where, &bm.bounds); | ||
| 8287 | } | ||
| 8288 | #else /* not TARGET_API_MAC_CARBON */ | 8338 | #else /* not TARGET_API_MAC_CARBON */ |
| 8289 | DragWindow (window_ptr, er.where, &qd.screenBits.bounds); | 8339 | DragWindow (window_ptr, er.where, &qd.screenBits.bounds); |
| 8290 | #endif /* not TARGET_API_MAC_CARBON */ | 8340 | #endif /* not TARGET_API_MAC_CARBON */ |
| 8291 | /* Update the frame parameters. */ | 8341 | /* Update the frame parameters. */ |
| 8292 | { | 8342 | { |
| 8293 | struct frame *f = mac_window_to_frame (window_ptr); | 8343 | struct frame *f = mac_window_to_frame (window_ptr); |
| 8344 | |||
| 8294 | if (f && !f->async_iconified) | 8345 | if (f && !f->async_iconified) |
| 8295 | { | 8346 | x_real_positions (f, &f->left_pos, &f->top_pos); |
| 8296 | int x, y; | ||
| 8297 | |||
| 8298 | x_real_positions (f, &x, &y); | ||
| 8299 | f->left_pos = x; | ||
| 8300 | f->top_pos = y; | ||
| 8301 | } | ||
| 8302 | } | 8347 | } |
| 8303 | break; | 8348 | break; |
| 8304 | 8349 | ||
| @@ -8313,11 +8358,8 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8313 | 8358 | ||
| 8314 | /* window resize handling added --ben */ | 8359 | /* window resize handling added --ben */ |
| 8315 | case inGrow: | 8360 | case inGrow: |
| 8316 | if (er.what == mouseDown) | 8361 | do_grow_window (window_ptr, &er); |
| 8317 | { | 8362 | break; |
| 8318 | do_grow_window(window_ptr, &er); | ||
| 8319 | break; | ||
| 8320 | } | ||
| 8321 | 8363 | ||
| 8322 | /* window zoom handling added --ben */ | 8364 | /* window zoom handling added --ben */ |
| 8323 | case inZoomIn: | 8365 | case inZoomIn: |
| @@ -8460,7 +8502,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8460 | #endif | 8502 | #endif |
| 8461 | 8503 | ||
| 8462 | #if TARGET_API_MAC_CARBON | 8504 | #if TARGET_API_MAC_CARBON |
| 8463 | if (!IsValidWindowPtr (mac_front_window ())) | 8505 | if (!IsValidWindowPtr (front_emacs_window ())) |
| 8464 | { | 8506 | { |
| 8465 | SysBeep (1); | 8507 | SysBeep (1); |
| 8466 | break; | 8508 | break; |
| @@ -8564,7 +8606,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8564 | inev.modifiers = mac_to_emacs_modifiers (er.modifiers); | 8606 | inev.modifiers = mac_to_emacs_modifiers (er.modifiers); |
| 8565 | #endif | 8607 | #endif |
| 8566 | XSETFRAME (inev.frame_or_window, | 8608 | XSETFRAME (inev.frame_or_window, |
| 8567 | mac_window_to_frame (mac_front_window ())); | 8609 | mac_window_to_frame (front_emacs_window ())); |
| 8568 | inev.timestamp = er.when * (1000 / 60); /* ticks to milliseconds */ | 8610 | inev.timestamp = er.when * (1000 / 60); /* ticks to milliseconds */ |
| 8569 | break; | 8611 | break; |
| 8570 | 8612 | ||
| @@ -8581,16 +8623,16 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8581 | WindowPtr wp; | 8623 | WindowPtr wp; |
| 8582 | Lisp_Object frame; | 8624 | Lisp_Object frame; |
| 8583 | 8625 | ||
| 8584 | wp = mac_front_window (); | 8626 | wp = front_emacs_window (); |
| 8585 | 8627 | ||
| 8586 | if (!wp) | 8628 | if (!wp) |
| 8587 | { | 8629 | { |
| 8588 | struct frame *f = XFRAME (XCAR (Vframe_list)); | 8630 | struct frame *f = XFRAME (XCAR (Vframe_list)); |
| 8589 | CollapseWindow (FRAME_MAC_WINDOW (f), false); | 8631 | CollapseWindow (FRAME_MAC_WINDOW (f), false); |
| 8590 | wp = mac_front_window (); | 8632 | wp = front_emacs_window (); |
| 8591 | } | 8633 | } |
| 8592 | 8634 | ||
| 8593 | if (wp && is_emacs_window (wp)) | 8635 | if (wp) |
| 8594 | f = mac_window_to_frame (wp); | 8636 | f = mac_window_to_frame (wp); |
| 8595 | 8637 | ||
| 8596 | inev.kind = DRAG_N_DROP_EVENT; | 8638 | inev.kind = DRAG_N_DROP_EVENT; |
| @@ -9047,7 +9089,7 @@ mac_check_for_quit_char () | |||
| 9047 | e.arg = Qnil; | 9089 | e.arg = Qnil; |
| 9048 | e.modifiers = NULL; | 9090 | e.modifiers = NULL; |
| 9049 | e.timestamp = EventTimeToTicks (GetEventTime (event)) * (1000/60); | 9091 | e.timestamp = EventTimeToTicks (GetEventTime (event)) * (1000/60); |
| 9050 | XSETFRAME (e.frame_or_window, mac_window_to_frame (mac_front_window ())); | 9092 | XSETFRAME (e.frame_or_window, mac_window_to_frame (front_emacs_window ())); |
| 9051 | /* Remove event from queue to prevent looping. */ | 9093 | /* Remove event from queue to prevent looping. */ |
| 9052 | RemoveEventFromQueue (GetMainEventQueue (), event); | 9094 | RemoveEventFromQueue (GetMainEventQueue (), event); |
| 9053 | ReleaseEvent (event); | 9095 | ReleaseEvent (event); |