Cocoa: Mouse enter events on window activation.
This patch tells the window system that it should create a mouse enter event if a window was activated when the mouse was inside. This wasn't working and was a regression. Task-number: QTBUG-35109 [ChangeLog][Cocoa] Fix enterEvent not being called on activate. Change-Id: I4e4662b4a4c58dafa8d0a2c09458ab88f678d243 Reviewed-by: Liang Qi <liang.qi@digia.com>
This commit is contained in:
parent
923d498029
commit
5361513ec8
@ -93,6 +93,8 @@ QT_END_NAMESPACE
|
||||
- (BOOL)hasMask;
|
||||
- (BOOL)isOpaque;
|
||||
|
||||
- (void)convertFromScreen:(NSPoint)mouseLocation toWindowPoint:(QPointF *)qtWindowPoint andScreenPoint:(QPointF *)qtScreenPoint;
|
||||
|
||||
- (void)resetMouseButtons;
|
||||
|
||||
- (void)handleMouseEvent:(NSEvent *)theEvent;
|
||||
|
@ -53,6 +53,7 @@
|
||||
|
||||
- (id)initWithQCocoaWindow: (QCocoaWindow *) cocoaWindow;
|
||||
|
||||
- (void)windowDidBecomeKey:(NSNotification *)notification;
|
||||
- (void)windowDidResize:(NSNotification *)notification;
|
||||
- (void)windowDidMove:(NSNotification *)notification;
|
||||
- (void)windowWillMove:(NSNotification *)notification;
|
||||
|
@ -56,6 +56,17 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)windowDidBecomeKey:(NSNotification *)notification
|
||||
{
|
||||
Q_UNUSED(notification);
|
||||
if (m_cocoaWindow->m_windowUnderMouse) {
|
||||
QPointF windowPoint;
|
||||
QPointF screenPoint;
|
||||
[m_cocoaWindow->m_qtView convertFromScreen:[NSEvent mouseLocation] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
|
||||
QWindowSystemInterface::handleEnterEvent(m_cocoaWindow->m_enterLeaveTargetWindow, windowPoint, screenPoint);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)windowDidResize:(NSNotification *)notification
|
||||
{
|
||||
Q_UNUSED(notification);
|
||||
|
Loading…
Reference in New Issue
Block a user