summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2014-10-30 17:00:03 +0100
committerMorten Johan Sørvig <morten.sorvig@digia.com>2014-11-05 08:45:04 +0100
commit63c7ceaf1b352efa4c6d5a6be96819d6e013e2a4 (patch)
tree9f00ce2c5bfd10ca1b9894ea825d4a9ebd044d78
parent7146cbed6e3a42389593b775bf4a26f05b4b8d82 (diff)
Revert "OS X - unified toolbar and AA_NativeWindows"
Will be fixed in a different way. This reverts commit ae5f3df59b37e0ce8aaef27dc1e02f40def340ae. Change-Id: Ie706396667a5b6c9003bb92a018d88346a180e65 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index de30972393..09368fa25e 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -676,23 +676,7 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
m_platformWindow->m_forwardWindow = 0;
}
- NSPoint globalPos = [NSEvent mouseLocation];
-
- if ([self.window parentWindow]
- && (theEvent.type == NSLeftMouseDragged || theEvent.type == NSLeftMouseUp)) {
- // QToolBar can be implemented as a child window on top of its main window
- // (with a borderless NSWindow). If an option "unified toolbar" set on the main window,
- // it's possible to drag such a window using this toolbar.
- // While handling mouse drag events, QToolBar moves the window (QWidget::move).
- // In such a combination [NSEvent mouseLocation] is very different from the
- // real event location and as a result a window will move chaotically.
- NSPoint winPoint = [theEvent locationInWindow];
- NSRect tmpRect = NSMakeRect(winPoint.x, winPoint.y, 1., 1.);
- tmpRect = [[theEvent window] convertRectToScreen:tmpRect];
- globalPos = tmpRect.origin;
- }
-
- [targetView convertFromScreen:globalPos toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint];
+ [targetView convertFromScreen:[NSEvent mouseLocation] toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint];
ulong timestamp = [theEvent timestamp] * 1000;
QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();