mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-31 20:02:42 +00:00
(create_text_encoding_info_alist): Move assignments
outside predicate macros. (mac_initialize_display_info) [MAC_OSX]: dpyinfo->height and dpyinfo->width are those of whole screen.
This commit is contained in:
parent
d18bee728d
commit
b51065cf2e
@ -1,3 +1,17 @@
|
||||
2007-03-26 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||
|
||||
* macfns.c (Fx_display_mm_height, Fx_display_mm_width): Scale
|
||||
whole screen size in pixels by millimeters per pixel of main display.
|
||||
|
||||
* macselect.c (get_scrap_target_type_list, x_own_selection): Move
|
||||
assignments outside predicate macros.
|
||||
(Vselection_converter_alist): Doc fix.
|
||||
|
||||
* macterm.c (create_text_encoding_info_alist): Move assignments
|
||||
outside predicate macros.
|
||||
(mac_initialize_display_info) [MAC_OSX]: dpyinfo->height and
|
||||
dpyinfo->width are those of whole screen.
|
||||
|
||||
2007-03-26 Sam Steingold <sds@gnu.org>
|
||||
|
||||
* process.c (sigchld_handler): Delay by 1ms instead of 1s to
|
||||
|
@ -7172,11 +7172,14 @@ create_text_encoding_info_alist ()
|
||||
Lisp_Object existing_info;
|
||||
|
||||
if (!(CONSP (charset_info)
|
||||
&& STRINGP (charset = XCAR (charset_info))
|
||||
&& (charset = XCAR (charset_info),
|
||||
STRINGP (charset))
|
||||
&& CONSP (XCDR (charset_info))
|
||||
&& INTEGERP (text_encoding = XCAR (XCDR (charset_info)))
|
||||
&& (text_encoding = XCAR (XCDR (charset_info)),
|
||||
INTEGERP (text_encoding))
|
||||
&& CONSP (XCDR (XCDR (charset_info)))
|
||||
&& SYMBOLP (coding_system = XCAR (XCDR (XCDR (charset_info))))))
|
||||
&& (coding_system = XCAR (XCDR (XCDR (charset_info))),
|
||||
SYMBOLP (coding_system))))
|
||||
continue;
|
||||
|
||||
existing_info = assq_no_quit (text_encoding, result);
|
||||
@ -11538,8 +11541,32 @@ mac_initialize_display_info ()
|
||||
but this may not be what is actually used. Mac OSX can do better. */
|
||||
dpyinfo->color_p = CGDisplaySamplesPerPixel (kCGDirectMainDisplay) > 1;
|
||||
dpyinfo->n_planes = CGDisplayBitsPerPixel (kCGDirectMainDisplay);
|
||||
dpyinfo->height = CGDisplayPixelsHigh (kCGDirectMainDisplay);
|
||||
dpyinfo->width = CGDisplayPixelsWide (kCGDirectMainDisplay);
|
||||
{
|
||||
CGDisplayErr err;
|
||||
CGDisplayCount ndisps;
|
||||
CGDirectDisplayID *displays;
|
||||
|
||||
err = CGGetActiveDisplayList (0, NULL, &ndisps);
|
||||
if (err == noErr)
|
||||
{
|
||||
displays = alloca (sizeof (CGDirectDisplayID) * ndisps);
|
||||
err = CGGetActiveDisplayList (ndisps, displays, &ndisps);
|
||||
}
|
||||
if (err == noErr)
|
||||
{
|
||||
CGRect bounds = CGRectMake (0, 0, 0, 0);
|
||||
|
||||
while (ndisps-- > 0)
|
||||
bounds = CGRectUnion (bounds, CGDisplayBounds (displays[ndisps]));
|
||||
dpyinfo->height = CGRectGetHeight (bounds);
|
||||
dpyinfo->width = CGRectGetWidth (bounds);
|
||||
}
|
||||
else
|
||||
{
|
||||
dpyinfo->height = CGDisplayPixelsHigh (kCGDirectMainDisplay);
|
||||
dpyinfo->width = CGDisplayPixelsWide (kCGDirectMainDisplay);
|
||||
}
|
||||
}
|
||||
#else
|
||||
{
|
||||
GDHandle main_device_handle = LMGetMainDevice();
|
||||
|
Loading…
Reference in New Issue
Block a user