Commit 8ec1b4f0 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

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.
parent 5fe3c4b8
......@@ -1585,6 +1585,7 @@ int macdrv_err_on;
WineWindow* window = (WineWindow*)[theEvent window];
NSEventType type = [theEvent type];
WineWindow* windowBroughtForward = nil;
BOOL process = FALSE;
if ([window isKindOfClass:[WineWindow class]] &&
type == NSLeftMouseDown &&
......@@ -1622,7 +1623,6 @@ int macdrv_err_on;
{
BOOL pressed = (type == NSLeftMouseDown || type == NSRightMouseDown || type == NSOtherMouseDown);
CGPoint pt = CGEventGetLocation([theEvent CGEvent]);
BOOL process;
if (clippingCursor)
[self clipCursorLocation:&pt];
......@@ -1689,12 +1689,13 @@ int macdrv_err_on;
macdrv_release_event(event);
}
else if (windowBroughtForward)
{
[[windowBroughtForward ancestorWineWindow] postBroughtForwardEvent];
if (![windowBroughtForward isKeyWindow] && !windowBroughtForward.disabled && !windowBroughtForward.noActivate)
[self windowGotFocus:windowBroughtForward];
}
}
if (!process && windowBroughtForward)
{
[[windowBroughtForward ancestorWineWindow] postBroughtForwardEvent];
if (![windowBroughtForward isKeyWindow] && !windowBroughtForward.disabled && !windowBroughtForward.noActivate)
[self windowGotFocus:windowBroughtForward];
}
// Since mouse button events deliver absolute cursor position, the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment