[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.
This commit is contained in:
YAMAMOTO Mitsuharu 2007-04-12 08:12:00 +00:00
parent f82bd023a6
commit 2a953eae53
2 changed files with 25 additions and 9 deletions

View file

@ -1,3 +1,14 @@
2007-04-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* mac.c (xrm_get_preference_database, Fmac_get_preference)
[TARGET_API_MAC_CARBON]: Use CFPreferencesAppSynchronize.
* macterm.c [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.
2007-04-10 Chong Yidong <cyd@stupidchicken.com>
* xdisp.c (note_mode_line_or_margin_highlight): Don't decrement

View file

@ -10533,8 +10533,7 @@ mac_post_mouse_moved_event ()
{
Point mouse_pos;
GetMouse (&mouse_pos);
LocalToGlobal (&mouse_pos);
GetGlobalMouse (&mouse_pos);
err = SetEventParameter (event, kEventParamMouseLocation, typeQDPoint,
sizeof (Point), &mouse_pos);
}
@ -11554,7 +11553,7 @@ mac_initialize_display_info ()
}
if (err == noErr)
{
CGRect bounds = CGRectMake (0, 0, 0, 0);
CGRect bounds = CGRectZero;
while (ndisps-- > 0)
bounds = CGRectUnion (bounds, CGDisplayBounds (displays[ndisps]));
@ -11569,15 +11568,21 @@ mac_initialize_display_info ()
}
#else
{
GDHandle main_device_handle = LMGetMainDevice();
GDHandle gdh = GetMainDevice ();
Rect rect = (**gdh).gdRect;
dpyinfo->color_p = TestDeviceAttribute (main_device_handle, gdDevType);
dpyinfo->color_p = TestDeviceAttribute (gdh, gdDevType);
for (dpyinfo->n_planes = 32; dpyinfo->n_planes > 0; dpyinfo->n_planes >>= 1)
if (HasDepth (main_device_handle, dpyinfo->n_planes,
gdDevType, dpyinfo->color_p))
if (HasDepth (gdh, dpyinfo->n_planes, gdDevType, dpyinfo->color_p))
break;
dpyinfo->height = (**main_device_handle).gdRect.bottom;
dpyinfo->width = (**main_device_handle).gdRect.right;
for (gdh = GetDeviceList (); gdh; gdh = GetNextDevice (gdh))
if (TestDeviceAttribute (gdh, screenDevice)
&& TestDeviceAttribute (gdh, screenActive))
UnionRect (&rect, &(**gdh).gdRect, &rect);
dpyinfo->height = rect.bottom - rect.top;
dpyinfo->width = rect.right - rect.left;
}
#endif
dpyinfo->grabbed = 0;