Revert "winemac: Dispatch key events directly to window to be sure to get key-up events.".
This reverts commit 0d20ac02f7
.
This commit is contained in:
parent
4f23821f08
commit
a723af61ac
|
@ -1692,12 +1692,6 @@ - (BOOL) handleEvent:(NSEvent*)anEvent
|
||||||
[self handleScrollWheel:anEvent];
|
[self handleScrollWheel:anEvent];
|
||||||
ret = mouseCaptureWindow != nil;
|
ret = mouseCaptureWindow != nil;
|
||||||
}
|
}
|
||||||
else if (type == NSKeyDown || type == NSKeyUp)
|
|
||||||
{
|
|
||||||
WineWindow* window = (WineWindow*)[anEvent window];
|
|
||||||
if ([window isKindOfClass:[WineWindow class]])
|
|
||||||
[window postKeyEvent:anEvent];
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,4 @@ @interface WineWindow : NSPanel <NSWindowDelegate>
|
||||||
- (NSInteger) minimumLevelForActive:(BOOL)active;
|
- (NSInteger) minimumLevelForActive:(BOOL)active;
|
||||||
- (void) updateFullscreen;
|
- (void) updateFullscreen;
|
||||||
|
|
||||||
- (void) postKeyEvent:(NSEvent *)theEvent;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -1195,6 +1195,18 @@ - (void) makeKeyAndOrderFront:(id)sender
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) sendEvent:(NSEvent*)event
|
||||||
|
{
|
||||||
|
/* NSWindow consumes certain key-down events as part of Cocoa's keyboard
|
||||||
|
interface control. For example, Control-Tab switches focus among
|
||||||
|
views. We want to bypass that feature, so directly route key-down
|
||||||
|
events to -keyDown:. */
|
||||||
|
if ([event type] == NSKeyDown)
|
||||||
|
[[self firstResponder] keyDown:event];
|
||||||
|
else
|
||||||
|
[super sendEvent:event];
|
||||||
|
}
|
||||||
|
|
||||||
// We normally use the generic/calibrated RGB color space for the window,
|
// We normally use the generic/calibrated RGB color space for the window,
|
||||||
// rather than the device color space, to avoid expensive color conversion
|
// rather than the device color space, to avoid expensive color conversion
|
||||||
// which slows down drawing. However, for windows displaying OpenGL, having
|
// which slows down drawing. However, for windows displaying OpenGL, having
|
||||||
|
@ -1230,7 +1242,8 @@ - (void) updateColorSpace
|
||||||
/*
|
/*
|
||||||
* ---------- NSResponder method overrides ----------
|
* ---------- NSResponder method overrides ----------
|
||||||
*/
|
*/
|
||||||
- (void) keyDown:(NSEvent *)theEvent { /* Need an implementation to avoid beeps */ }
|
- (void) keyDown:(NSEvent *)theEvent { [self postKeyEvent:theEvent]; }
|
||||||
|
- (void) keyUp:(NSEvent *)theEvent { [self postKeyEvent:theEvent]; }
|
||||||
|
|
||||||
- (void) flagsChanged:(NSEvent *)theEvent
|
- (void) flagsChanged:(NSEvent *)theEvent
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue