winemac: Tell Wine that Cocoa brought a window forward even if a window is being dragged.
When a window is being dragged, we prevent delivery of clicks to Wine. We were also preventing telling Wine that a window had been brought forward, but this was incorrect. It prevented clicks in the title bar from activating the window.
This commit is contained in:
parent
5fe3c4b89e
commit
8ec1b4f010
|
@ -1585,6 +1585,7 @@ - (void) handleMouseButton:(NSEvent*)theEvent
|
||||||
WineWindow* window = (WineWindow*)[theEvent window];
|
WineWindow* window = (WineWindow*)[theEvent window];
|
||||||
NSEventType type = [theEvent type];
|
NSEventType type = [theEvent type];
|
||||||
WineWindow* windowBroughtForward = nil;
|
WineWindow* windowBroughtForward = nil;
|
||||||
|
BOOL process = FALSE;
|
||||||
|
|
||||||
if ([window isKindOfClass:[WineWindow class]] &&
|
if ([window isKindOfClass:[WineWindow class]] &&
|
||||||
type == NSLeftMouseDown &&
|
type == NSLeftMouseDown &&
|
||||||
|
@ -1622,7 +1623,6 @@ - (void) handleMouseButton:(NSEvent*)theEvent
|
||||||
{
|
{
|
||||||
BOOL pressed = (type == NSLeftMouseDown || type == NSRightMouseDown || type == NSOtherMouseDown);
|
BOOL pressed = (type == NSLeftMouseDown || type == NSRightMouseDown || type == NSOtherMouseDown);
|
||||||
CGPoint pt = CGEventGetLocation([theEvent CGEvent]);
|
CGPoint pt = CGEventGetLocation([theEvent CGEvent]);
|
||||||
BOOL process;
|
|
||||||
|
|
||||||
if (clippingCursor)
|
if (clippingCursor)
|
||||||
[self clipCursorLocation:&pt];
|
[self clipCursorLocation:&pt];
|
||||||
|
@ -1689,13 +1689,14 @@ - (void) handleMouseButton:(NSEvent*)theEvent
|
||||||
|
|
||||||
macdrv_release_event(event);
|
macdrv_release_event(event);
|
||||||
}
|
}
|
||||||
else if (windowBroughtForward)
|
}
|
||||||
|
|
||||||
|
if (!process && windowBroughtForward)
|
||||||
{
|
{
|
||||||
[[windowBroughtForward ancestorWineWindow] postBroughtForwardEvent];
|
[[windowBroughtForward ancestorWineWindow] postBroughtForwardEvent];
|
||||||
if (![windowBroughtForward isKeyWindow] && !windowBroughtForward.disabled && !windowBroughtForward.noActivate)
|
if (![windowBroughtForward isKeyWindow] && !windowBroughtForward.disabled && !windowBroughtForward.noActivate)
|
||||||
[self windowGotFocus:windowBroughtForward];
|
[self windowGotFocus:windowBroughtForward];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Since mouse button events deliver absolute cursor position, the
|
// Since mouse button events deliver absolute cursor position, the
|
||||||
// accumulating delta from move events is invalidated. Make sure
|
// accumulating delta from move events is invalidated. Make sure
|
||||||
|
|
Loading…
Reference in New Issue