From 5aea3fb50a600edfb6320f1a3bd669b81dee63bf Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Wed, 12 Mar 2014 21:16:47 +0700 Subject: [PATCH] =?UTF-8?q?Do=20not=20use=20=E2=80=98autorecalculatesKeyVi?= =?UTF-8?q?ewLoop=E2=80=99=20for=20chooser=20windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead we manually call recalculatesKeyViewLoop on the window. This is because the auto-recalculation messes up. First time the window is brought up, it works fine, but the second time, nextValidKeyView will return ‘nil’ for the last view (causing the key view loop to not be a loop). --- Frameworks/OakFilterList/src/OakChooser.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Frameworks/OakFilterList/src/OakChooser.mm b/Frameworks/OakFilterList/src/OakChooser.mm index 0b775ca1..b9af7714 100644 --- a/Frameworks/OakFilterList/src/OakChooser.mm +++ b/Frameworks/OakFilterList/src/OakChooser.mm @@ -100,10 +100,9 @@ NSMutableAttributedString* CreateAttributedStringWithMarkedUpRanges (std::string [_window setContentBorderThickness:23 forEdge:NSMinYEdge]; [[_window standardWindowButton:NSWindowMiniaturizeButton] setHidden:YES]; [[_window standardWindowButton:NSWindowZoomButton] setHidden:YES]; - _window.autorecalculatesKeyViewLoop = YES; - _window.delegate = self; - _window.level = NSFloatingWindowLevel; - _window.releasedWhenClosed = NO; + _window.delegate = self; + _window.level = NSFloatingWindowLevel; + _window.releasedWhenClosed = NO; } return self; } @@ -125,6 +124,7 @@ NSMutableAttributedString* CreateAttributedStringWithMarkedUpRanges (std::string - (void)showWindow:(id)sender { + [_window recalculateKeyViewLoop]; [_window makeKeyAndOrderFront:self]; [_window makeFirstResponder:_searchField]; }