diff options
Diffstat (limited to 'src/nsfns.m')
| -rw-r--r-- | src/nsfns.m | 47 |
1 files changed, 19 insertions, 28 deletions
diff --git a/src/nsfns.m b/src/nsfns.m index 1efadf0cb98..7a22ac547c3 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -93,8 +93,6 @@ EmacsTooltip *ns_tooltip; | |||
| 93 | /* Need forward declaration here to preserve organizational integrity of file */ | 93 | /* Need forward declaration here to preserve organizational integrity of file */ |
| 94 | Lisp_Object Fx_open_connection (Lisp_Object, Lisp_Object, Lisp_Object); | 94 | Lisp_Object Fx_open_connection (Lisp_Object, Lisp_Object, Lisp_Object); |
| 95 | 95 | ||
| 96 | extern BOOL ns_in_resize; | ||
| 97 | |||
| 98 | /* Static variables to handle applescript execution. */ | 96 | /* Static variables to handle applescript execution. */ |
| 99 | static Lisp_Object as_script, *as_result; | 97 | static Lisp_Object as_script, *as_result; |
| 100 | static int as_status; | 98 | static int as_status; |
| @@ -433,9 +431,6 @@ x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | |||
| 433 | NSView *view = FRAME_NS_VIEW (f); | 431 | NSView *view = FRAME_NS_VIEW (f); |
| 434 | NSTRACE (x_set_icon_name); | 432 | NSTRACE (x_set_icon_name); |
| 435 | 433 | ||
| 436 | if (ns_in_resize) | ||
| 437 | return; | ||
| 438 | |||
| 439 | /* see if it's changed */ | 434 | /* see if it's changed */ |
| 440 | if (STRINGP (arg)) | 435 | if (STRINGP (arg)) |
| 441 | { | 436 | { |
| @@ -511,9 +506,6 @@ ns_set_name (struct frame *f, Lisp_Object name, int explicit) | |||
| 511 | { | 506 | { |
| 512 | NSTRACE (ns_set_name); | 507 | NSTRACE (ns_set_name); |
| 513 | 508 | ||
| 514 | if (ns_in_resize) | ||
| 515 | return; | ||
| 516 | |||
| 517 | /* Make sure that requests from lisp code override requests from | 509 | /* Make sure that requests from lisp code override requests from |
| 518 | Emacs redisplay code. */ | 510 | Emacs redisplay code. */ |
| 519 | if (explicit) | 511 | if (explicit) |
| @@ -612,7 +604,7 @@ ns_set_name_as_filename (struct frame *f) | |||
| 612 | NSString *str; | 604 | NSString *str; |
| 613 | NSTRACE (ns_set_name_as_filename); | 605 | NSTRACE (ns_set_name_as_filename); |
| 614 | 606 | ||
| 615 | if (f->explicit_name || ! NILP (f->title) || ns_in_resize) | 607 | if (f->explicit_name || ! NILP (f->title)) |
| 616 | return; | 608 | return; |
| 617 | 609 | ||
| 618 | block_input (); | 610 | block_input (); |
| @@ -1346,6 +1338,8 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 1346 | RES_TYPE_NUMBER); | 1338 | RES_TYPE_NUMBER); |
| 1347 | x_default_parameter (f, parms, Qalpha, Qnil, | 1339 | x_default_parameter (f, parms, Qalpha, Qnil, |
| 1348 | "alpha", "Alpha", RES_TYPE_NUMBER); | 1340 | "alpha", "Alpha", RES_TYPE_NUMBER); |
| 1341 | x_default_parameter (f, parms, Qfullscreen, Qnil, | ||
| 1342 | "fullscreen", "Fullscreen", RES_TYPE_SYMBOL); | ||
| 1349 | 1343 | ||
| 1350 | width = FRAME_COLS (f); | 1344 | width = FRAME_COLS (f); |
| 1351 | height = FRAME_LINES (f); | 1345 | height = FRAME_LINES (f); |
| @@ -1955,32 +1949,29 @@ DEFUN ("ns-list-services", Fns_list_services, Sns_list_services, 0, 0, 0, | |||
| 1955 | 1949 | ||
| 1956 | check_ns (); | 1950 | check_ns (); |
| 1957 | svcs = [[NSMenu alloc] initWithTitle: @"Services"]; | 1951 | svcs = [[NSMenu alloc] initWithTitle: @"Services"]; |
| 1958 | [NSApp setServicesMenu: svcs]; /* this and next rebuild on <10.4 */ | 1952 | [NSApp setServicesMenu: svcs]; |
| 1959 | [NSApp registerServicesMenuSendTypes: ns_send_types | 1953 | [NSApp registerServicesMenuSendTypes: ns_send_types |
| 1960 | returnTypes: ns_return_types]; | 1954 | returnTypes: ns_return_types]; |
| 1961 | 1955 | ||
| 1962 | /* On Tiger, services menu updating was made lazier (waits for user to | 1956 | /* On Tiger, services menu updating was made lazier (waits for user to |
| 1963 | actually click on the menu), so we have to force things along: */ | 1957 | actually click on the menu), so we have to force things along: */ |
| 1964 | #ifdef NS_IMPL_COCOA | 1958 | #ifdef NS_IMPL_COCOA |
| 1965 | if (NSAppKitVersionNumber >= 744.0) | 1959 | delegate = [svcs delegate]; |
| 1960 | if (delegate != nil) | ||
| 1966 | { | 1961 | { |
| 1967 | delegate = [svcs delegate]; | 1962 | if ([delegate respondsToSelector: @selector (menuNeedsUpdate:)]) |
| 1968 | if (delegate != nil) | 1963 | [delegate menuNeedsUpdate: svcs]; |
| 1964 | if ([delegate respondsToSelector: | ||
| 1965 | @selector (menu:updateItem:atIndex:shouldCancel:)]) | ||
| 1969 | { | 1966 | { |
| 1970 | if ([delegate respondsToSelector: @selector (menuNeedsUpdate:)]) | 1967 | int i, len = [delegate numberOfItemsInMenu: svcs]; |
| 1971 | [delegate menuNeedsUpdate: svcs]; | 1968 | for (i =0; i<len; i++) |
| 1972 | if ([delegate respondsToSelector: | 1969 | [svcs addItemWithTitle: @"" action: NULL keyEquivalent: @""]; |
| 1973 | @selector (menu:updateItem:atIndex:shouldCancel:)]) | 1970 | for (i =0; i<len; i++) |
| 1974 | { | 1971 | if (![delegate menu: svcs |
| 1975 | int i, len = [delegate numberOfItemsInMenu: svcs]; | 1972 | updateItem: (NSMenuItem *)[svcs itemAtIndex: i] |
| 1976 | for (i =0; i<len; i++) | 1973 | atIndex: i shouldCancel: NO]) |
| 1977 | [svcs addItemWithTitle: @"" action: NULL keyEquivalent: @""]; | 1974 | break; |
| 1978 | for (i =0; i<len; i++) | ||
| 1979 | if (![delegate menu: svcs | ||
| 1980 | updateItem: (NSMenuItem *)[svcs itemAtIndex: i] | ||
| 1981 | atIndex: i shouldCancel: NO]) | ||
| 1982 | break; | ||
| 1983 | } | ||
| 1984 | } | 1975 | } |
| 1985 | } | 1976 | } |
| 1986 | #endif | 1977 | #endif |
| @@ -2081,7 +2072,7 @@ ns_do_applescript (Lisp_Object script, Lisp_Object *result) | |||
| 2081 | *result = Qt; | 2072 | *result = Qt; |
| 2082 | // script returned an AppleScript result | 2073 | // script returned an AppleScript result |
| 2083 | if ((typeUnicodeText == [returnDescriptor descriptorType]) || | 2074 | if ((typeUnicodeText == [returnDescriptor descriptorType]) || |
| 2084 | #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 | 2075 | #if defined (NS_IMPL_COCOA) |
| 2085 | (typeUTF16ExternalRepresentation | 2076 | (typeUTF16ExternalRepresentation |
| 2086 | == [returnDescriptor descriptorType]) || | 2077 | == [returnDescriptor descriptorType]) || |
| 2087 | #endif | 2078 | #endif |