aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Third2017-04-22 10:42:35 +0100
committerAlan Third2017-04-22 10:42:35 +0100
commit401e41df0c6aee6c071a26e0b89f16c70375fc2d (patch)
tree9c64b8dc2b43c6d4f5bc360dd21135aab7e2eb39
parentd812d20fbc3e1eff0f10443baed801adda9031cd (diff)
downloademacs-401e41df0c6aee6c071a26e0b89f16c70375fc2d.tar.gz
emacs-401e41df0c6aee6c071a26e0b89f16c70375fc2d.zip
Fix GNUstep build
* src/nsfns.m (Fns_frame_z_list_order): Rewrite for GNUstep compatibility. * src/nsmenu.m (update_frame_tool_bar): Remove unused variable.
-rw-r--r--src/nsfns.m27
-rw-r--r--src/nsmenu.m1
2 files changed, 12 insertions, 16 deletions
diff --git a/src/nsfns.m b/src/nsfns.m
index 3a37df95759..cbe0ffb8580 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1456,27 +1456,24 @@ return the child frames of that frame in Z (stacking) order.
1456Frames are listed from topmost (first) to bottommost (last). */) 1456Frames are listed from topmost (first) to bottommost (last). */)
1457 (Lisp_Object terminal) 1457 (Lisp_Object terminal)
1458{ 1458{
1459 NSArray *list = [NSApp orderedWindows];
1460 Lisp_Object frames = Qnil; 1459 Lisp_Object frames = Qnil;
1460 NSWindow *parent = nil;
1461 1461
1462 if (FRAMEP (terminal) && FRAME_LIVE_P (XFRAME (terminal))) 1462 if (FRAMEP (terminal) && FRAME_LIVE_P (XFRAME (terminal)))
1463 { 1463 parent = [FRAME_NS_VIEW (XFRAME (terminal)) window];
1464 /* Filter LIST to just those that are ancestors of TERMINAL. */ 1464 else if (!NILP (terminal))
1465 NSWindow *win = [FRAME_NS_VIEW (XFRAME (terminal)) window]; 1465 return Qnil;
1466
1467 NSPredicate *ancestor_pred =
1468 [NSPredicate predicateWithBlock:^BOOL(id candidate, NSDictionary *bind) {
1469 return ns_window_is_ancestor (win, [(NSWindow *)candidate parentWindow]);
1470 }];
1471
1472 list = [[NSApp orderedWindows] filteredArrayUsingPredicate: ancestor_pred];
1473 }
1474 1466
1475 for (NSWindow *win in [list reverseObjectEnumerator]) 1467 for (NSWindow *win in [[NSApp orderedWindows] reverseObjectEnumerator])
1476 { 1468 {
1477 Lisp_Object frame; 1469 Lisp_Object frame;
1478 XSETFRAME (frame, ((EmacsView *)[win delegate])->emacsframe); 1470
1479 frames = Fcons(frame, frames); 1471 /* Check against [win parentWindow] so that it doesn't match itself. */
1472 if (parent == nil || ns_window_is_ancestor (parent, [win parentWindow]))
1473 {
1474 XSETFRAME (frame, ((EmacsView *)[win delegate])->emacsframe);
1475 frames = Fcons(frame, frames);
1476 }
1480 } 1477 }
1481 1478
1482 return frames; 1479 return frames;
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 1262c9cb4d6..8dc6ea1d344 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -1012,7 +1012,6 @@ update_frame_tool_bar (struct frame *f)
1012{ 1012{
1013 int i, k = 0; 1013 int i, k = 0;
1014 EmacsView *view = FRAME_NS_VIEW (f); 1014 EmacsView *view = FRAME_NS_VIEW (f);
1015 NSWindow *window = [view window];
1016 EmacsToolbar *toolbar = [view toolbar]; 1015 EmacsToolbar *toolbar = [view toolbar];
1017 int oldh; 1016 int oldh;
1018 1017