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/macfns.c | |
| 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/macfns.c')
| -rw-r--r-- | src/macfns.c | 33 |
1 files changed, 9 insertions, 24 deletions
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 | ||