Revert "qnsview_drag: only ignore key modifier while dragging 'within the application'"
This reverts commit 4332cb313469de1525afe3cddd792d7bc7e08a14. The original idea of distinguishing between context (outside/within application) is not working anymore - it's always outside (except the moment when a mouse pressed inside the window, which is immediately followed by 'outside application' context). So in fact we never ignore key modifiers. Fixes: QTBUG-132091 Pick-to: 6.8 Change-Id: I560a48ccf8f8ee1a55f812be6af18b1dd7e25c78 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 7740ac36d27740ff9204cc2626f58620b7e214cb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
cc2213ab27
commit
c39a944e74
@ -128,7 +128,6 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSViewMenuHelper);
|
||||
// Text
|
||||
QString m_composingText;
|
||||
QPointer<QObject> m_composingFocusObject;
|
||||
NSDraggingContext m_lastSeenContext;
|
||||
}
|
||||
|
||||
@synthesize colorSpace = m_colorSpace;
|
||||
@ -159,7 +158,6 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSViewMenuHelper);
|
||||
m_lastKeyDead = false;
|
||||
m_sendKeyEvent = false;
|
||||
m_currentlyInterpretedKeyEvent = nil;
|
||||
m_lastSeenContext = NSDraggingContextWithinApplication;
|
||||
|
||||
self.menuHelper = [[[QNSViewMenuHelper alloc] initWithView:self] autorelease];
|
||||
}
|
||||
|
@ -45,8 +45,8 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin
|
||||
- (NSDragOperation)draggingSession:(NSDraggingSession *)session sourceOperationMaskForDraggingContext:(NSDraggingContext)context
|
||||
{
|
||||
Q_UNUSED(session);
|
||||
Q_UNUSED(context);
|
||||
|
||||
m_lastSeenContext = context;
|
||||
QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();
|
||||
return qt_mac_mapDropActions(nativeDrag->currentDrag()->supportedActions());
|
||||
}
|
||||
@ -61,11 +61,8 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin
|
||||
//
|
||||
// Since Qt already takes care of tracking the keyboard modifiers, we
|
||||
// don't need (or want) Cocoa to filter anything. Instead, we'll let
|
||||
// the application do the actual filtering. But only while dragging
|
||||
// within application, otherwise ignored modifiers may end up in a
|
||||
// wrong drop operation executed.
|
||||
|
||||
return m_lastSeenContext == NSDraggingContextWithinApplication;
|
||||
// the application do the actual filtering.
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)wantsPeriodicDraggingUpdates
|
||||
@ -253,8 +250,6 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin
|
||||
Q_UNUSED(screenPoint);
|
||||
Q_UNUSED(operation);
|
||||
|
||||
m_lastSeenContext = NSDraggingContextWithinApplication;
|
||||
|
||||
if (!m_platformWindow)
|
||||
return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user