From 83a1203c3ba05d2425b55ea5d5330567f14e9a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 15 Mar 2018 16:52:53 +0100 Subject: macOS: Group stray input context function with other input context functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I9be3c170c20aca8a7d3c8bb81b7b019cd555b3f1 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qnsview.mm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/plugins/platforms/cocoa/qnsview.mm') diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 6165771d5c..2030bad4d3 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -124,6 +124,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet") // Private interface @interface QT_MANGLE_NAMESPACE(QNSView) () - (BOOL)isTransparentForUserInput; +- (void)textInputContextKeyboardSelectionDidChangeNotification:(NSNotification *)textInputContextKeyboardSelectionDidChangeNotification; @end @implementation QT_MANGLE_NAMESPACE(QNSView) { @@ -297,15 +298,6 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet") return focusWindow; } -- (void)textInputContextKeyboardSelectionDidChangeNotification : (NSNotification *) textInputContextKeyboardSelectionDidChangeNotification -{ - Q_UNUSED(textInputContextKeyboardSelectionDidChangeNotification) - if (([NSApp keyWindow] == [self window]) && [[self window] firstResponder] == self) { - QCocoaInputContext *ic = qobject_cast(QCocoaIntegration::instance()->inputContext()); - ic->updateLocale(); - } -} - - (void)viewDidHide { if (!m_platformWindow->isExposed()) @@ -1842,6 +1834,15 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent) return @[NSUnderlineColorAttributeName, NSUnderlineStyleAttributeName]; } +- (void)textInputContextKeyboardSelectionDidChangeNotification:(NSNotification *)textInputContextKeyboardSelectionDidChangeNotification +{ + Q_UNUSED(textInputContextKeyboardSelectionDidChangeNotification) + if (([NSApp keyWindow] == self.window) && self.window.firstResponder == self) { + QCocoaInputContext *ic = qobject_cast(QCocoaIntegration::instance()->inputContext()); + ic->updateLocale(); + } +} + -(void)registerDragTypes { QMacAutoReleasePool pool; -- cgit v1.2.3