+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
{
Point mouse_pos;
- GetMouse (&mouse_pos);
- LocalToGlobal (&mouse_pos);
+ GetGlobalMouse (&mouse_pos);
err = SetEventParameter (event, kEventParamMouseLocation, typeQDPoint,
sizeof (Point), &mouse_pos);
}
}
if (err == noErr)
{
- CGRect bounds = CGRectMake (0, 0, 0, 0);
+ CGRect bounds = CGRectZero;
while (ndisps-- > 0)
bounds = CGRectUnion (bounds, CGDisplayBounds (displays[ndisps]));
}
#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;