Last active
December 11, 2015 05:39
-
-
Save muesli/4553941 to your computer and use it in GitHub Desktop.
QTBUG-27634-revert.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm | |
index 63bbd29..646053a 100644 | |
--- a/src/gui/kernel/qcocoaview_mac.mm | |
+++ b/src/gui/kernel/qcocoaview_mac.mm | |
@@ -502,7 +502,7 @@ static int qCocoaViewCount = 0; | |
// and not just the one on top. Therefore, to we cannot use qwidget | |
// as native widget for this case. Instead, we let qt_mac_handleMouseEvent | |
// resolve it (last argument set to 0): | |
- qt_mac_handleMouseEvent(nsmoveEvent, QEvent::MouseMove, Qt::NoButton, 0, true); | |
+ qt_mac_handleMouseEvent(nsmoveEvent, QEvent::MouseMove, Qt::NoButton, 0); | |
} | |
- (void)mouseExited:(NSEvent *)event | |
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm | |
index f1db0e3..4e9d557 100644 | |
--- a/src/gui/kernel/qt_cocoa_helpers_mac.mm | |
+++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm | |
@@ -1174,7 +1174,7 @@ static inline void qt_mac_checkEnterLeaveForNativeWidgets(QWidget *maybeEnterWid | |
} | |
} | |
-bool qt_mac_handleMouseEvent(NSEvent *event, QEvent::Type eventType, Qt::MouseButton button, QWidget *nativeWidget, bool fakeEvent) | |
+bool qt_mac_handleMouseEvent(NSEvent *event, QEvent::Type eventType, Qt::MouseButton button, QWidget *nativeWidget) | |
{ | |
// Give the Input Manager a chance to process the mouse events. | |
NSInputManager *currentIManager = [NSInputManager currentInputManager]; | |
@@ -1222,8 +1222,6 @@ bool qt_mac_handleMouseEvent(NSEvent *event, QEvent::Type eventType, Qt::MouseBu | |
if (GetEventParameter(carbonEvent, kEventParamMouseChord, typeUInt32, 0, | |
sizeof(mac_buttons), 0, &mac_buttons) == noErr) | |
buttons = qt_mac_get_buttons(mac_buttons); | |
- if (fakeEvent && buttons == 0) | |
- buttons = qt_mac_get_buttons(QApplication::mouseButtons()); | |
} | |
// Send enter/leave events for the cases when QApplicationPrivate::sendMouseEvent do not: | |
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac_p.h b/src/gui/kernel/qt_cocoa_helpers_mac_p.h | |
index 17f1769..e7d07b7 100644 | |
--- a/src/gui/kernel/qt_cocoa_helpers_mac_p.h | |
+++ b/src/gui/kernel/qt_cocoa_helpers_mac_p.h | |
@@ -181,7 +181,7 @@ Qt::DropActions qt_mac_mapNSDragOperations(NSDragOperation nsActions); | |
QWidget *qt_mac_getTargetForKeyEvent(QWidget *widgetThatReceivedEvent); | |
QWidget *qt_mac_getTargetForMouseEvent(NSEvent *event, QEvent::Type eventType, | |
QPoint &returnLocalPoint, QPoint &returnGlobalPoint, QWidget *nativeWidget, QWidget **returnWidgetUnderMouse); | |
-bool qt_mac_handleMouseEvent(NSEvent *event, QEvent::Type eventType, Qt::MouseButton button, QWidget *nativeWidget, bool fakeEvent = false); | |
+bool qt_mac_handleMouseEvent(NSEvent *event, QEvent::Type eventType, Qt::MouseButton button, QWidget *nativeWidget); | |
void qt_mac_handleNonClientAreaMouseEvent(NSWindow *window, NSEvent *event); | |
#endif | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment