diff options
| author | YAMAMOTO Mitsuharu | 2007-04-12 08:12:00 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2007-04-12 08:12:00 +0000 |
| commit | 2a953eae53032799b0d87f4533fd6111261c4e4b (patch) | |
| tree | 2bbfc0496721562bb279b0938014862083800774 | |
| parent | f82bd023a6d95e228555a635833b5307996e3141 (diff) | |
| download | emacs-2a953eae53032799b0d87f4533fd6111261c4e4b.tar.gz emacs-2a953eae53032799b0d87f4533fd6111261c4e4b.zip | |
[TARGET_API_MAC_CARBON] (mac_post_mouse_moved_event):
Use GetGlobalMouse instead of GetMouse and LocalToGlobal.
(mac_initialize_display_info) [MAC_OSX]: Use CGRectZero.
(mac_initialize_display_info) [!MAC_OSX]: dpyinfo->height and
dpyinfo->width are those of whole screen.
| -rw-r--r-- | src/ChangeLog | 11 | ||||
| -rw-r--r-- | src/macterm.c | 23 |
2 files changed, 25 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index cfe86dabd96..44e4f873223 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2007-04-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * mac.c (xrm_get_preference_database, Fmac_get_preference) | ||
| 4 | [TARGET_API_MAC_CARBON]: Use CFPreferencesAppSynchronize. | ||
| 5 | |||
| 6 | * macterm.c [TARGET_API_MAC_CARBON] (mac_post_mouse_moved_event): | ||
| 7 | Use GetGlobalMouse instead of GetMouse and LocalToGlobal. | ||
| 8 | (mac_initialize_display_info) [MAC_OSX]: Use CGRectZero. | ||
| 9 | (mac_initialize_display_info) [!MAC_OSX]: dpyinfo->height and | ||
| 10 | dpyinfo->width are those of whole screen. | ||
| 11 | |||
| 1 | 2007-04-10 Chong Yidong <cyd@stupidchicken.com> | 12 | 2007-04-10 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 13 | ||
| 3 | * xdisp.c (note_mode_line_or_margin_highlight): Don't decrement | 14 | * xdisp.c (note_mode_line_or_margin_highlight): Don't decrement |
diff --git a/src/macterm.c b/src/macterm.c index e377d352476..9d190a3e4f6 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -10533,8 +10533,7 @@ mac_post_mouse_moved_event () | |||
| 10533 | { | 10533 | { |
| 10534 | Point mouse_pos; | 10534 | Point mouse_pos; |
| 10535 | 10535 | ||
| 10536 | GetMouse (&mouse_pos); | 10536 | GetGlobalMouse (&mouse_pos); |
| 10537 | LocalToGlobal (&mouse_pos); | ||
| 10538 | err = SetEventParameter (event, kEventParamMouseLocation, typeQDPoint, | 10537 | err = SetEventParameter (event, kEventParamMouseLocation, typeQDPoint, |
| 10539 | sizeof (Point), &mouse_pos); | 10538 | sizeof (Point), &mouse_pos); |
| 10540 | } | 10539 | } |
| @@ -11554,7 +11553,7 @@ mac_initialize_display_info () | |||
| 11554 | } | 11553 | } |
| 11555 | if (err == noErr) | 11554 | if (err == noErr) |
| 11556 | { | 11555 | { |
| 11557 | CGRect bounds = CGRectMake (0, 0, 0, 0); | 11556 | CGRect bounds = CGRectZero; |
| 11558 | 11557 | ||
| 11559 | while (ndisps-- > 0) | 11558 | while (ndisps-- > 0) |
| 11560 | bounds = CGRectUnion (bounds, CGDisplayBounds (displays[ndisps])); | 11559 | bounds = CGRectUnion (bounds, CGDisplayBounds (displays[ndisps])); |
| @@ -11569,15 +11568,21 @@ mac_initialize_display_info () | |||
| 11569 | } | 11568 | } |
| 11570 | #else | 11569 | #else |
| 11571 | { | 11570 | { |
| 11572 | GDHandle main_device_handle = LMGetMainDevice(); | 11571 | GDHandle gdh = GetMainDevice (); |
| 11572 | Rect rect = (**gdh).gdRect; | ||
| 11573 | 11573 | ||
| 11574 | dpyinfo->color_p = TestDeviceAttribute (main_device_handle, gdDevType); | 11574 | dpyinfo->color_p = TestDeviceAttribute (gdh, gdDevType); |
| 11575 | for (dpyinfo->n_planes = 32; dpyinfo->n_planes > 0; dpyinfo->n_planes >>= 1) | 11575 | for (dpyinfo->n_planes = 32; dpyinfo->n_planes > 0; dpyinfo->n_planes >>= 1) |
| 11576 | if (HasDepth (main_device_handle, dpyinfo->n_planes, | 11576 | if (HasDepth (gdh, dpyinfo->n_planes, gdDevType, dpyinfo->color_p)) |
| 11577 | gdDevType, dpyinfo->color_p)) | ||
| 11578 | break; | 11577 | break; |
| 11579 | dpyinfo->height = (**main_device_handle).gdRect.bottom; | 11578 | |
| 11580 | dpyinfo->width = (**main_device_handle).gdRect.right; | 11579 | for (gdh = GetDeviceList (); gdh; gdh = GetNextDevice (gdh)) |
| 11580 | if (TestDeviceAttribute (gdh, screenDevice) | ||
| 11581 | && TestDeviceAttribute (gdh, screenActive)) | ||
| 11582 | UnionRect (&rect, &(**gdh).gdRect, &rect); | ||
| 11583 | |||
| 11584 | dpyinfo->height = rect.bottom - rect.top; | ||
| 11585 | dpyinfo->width = rect.right - rect.left; | ||
| 11581 | } | 11586 | } |
| 11582 | #endif | 11587 | #endif |
| 11583 | dpyinfo->grabbed = 0; | 11588 | dpyinfo->grabbed = 0; |