diff options
author | Alan Third <alan@idiocy.org> | 2021-01-03 16:15:18 +0000 |
---|---|---|
committer | Alan Third <alan@idiocy.org> | 2021-01-03 16:23:06 +0000 |
commit | ad2567fb1efced752352096f345c69f88e1ff405 (patch) | |
tree | 46c1437370d1bb079be4253c83649f308b8e5225 /src/nsfns.m | |
parent | 825b4ec338e82869dc656c7041ab2483b6c22479 (diff) | |
download | emacs-ad2567fb1efced752352096f345c69f88e1ff405.tar.gz emacs-ad2567fb1efced752352096f345c69f88e1ff405.tar.bz2 emacs-ad2567fb1efced752352096f345c69f88e1ff405.zip |
Fix child frame restacking on NS (bug#41422)
* src/nsfns.m (Fns_frame_restack): Use new restackWindow method.
* src/nsterm.m ([EmacsWindow orderFront:]):
([EmacsWindow makeKeyAndOrderFront:]):
(nswindow_orderedIndex_sort):
([EmacsWindow orderBack:]):
([EmacsWindow restackWindow:above:]): Override superclass methods to
handle child windows the way we want.
Diffstat (limited to 'src/nsfns.m')
-rw-r--r-- | src/nsfns.m | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nsfns.m b/src/nsfns.m index ee2daea0723..ae114f83e4d 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -1485,14 +1485,14 @@ Some window managers may refuse to restack windows. */) if (FRAME_NS_VIEW (f1) && FRAME_NS_VIEW (f2)) { - NSWindow *window = [FRAME_NS_VIEW (f1) window]; - NSInteger window2 = [[FRAME_NS_VIEW (f2) window] windowNumber]; - NSWindowOrderingMode flag = NILP (above) ? NSWindowBelow : NSWindowAbove; + EmacsWindow *window = (EmacsWindow *)[FRAME_NS_VIEW (f1) window]; + NSWindow *window2 = [FRAME_NS_VIEW (f2) window]; + BOOL flag = !NILP (above); - [window orderWindow: flag - relativeTo: window2]; - - return Qt; + if ([window restackWindow:window2 above:!NILP (above)]) + return Qt; + else + return Qnil; } else { |