Commit a723af61 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

Revert "winemac: Dispatch key events directly to window to be sure to get key-up events.".

This reverts commit 0d20ac02.
parent 4f23821f
......@@ -1692,12 +1692,6 @@ int macdrv_err_on;
[self handleScrollWheel:anEvent];
ret = mouseCaptureWindow != nil;
}
else if (type == NSKeyDown || type == NSKeyUp)
{
WineWindow* window = (WineWindow*)[anEvent window];
if ([window isKindOfClass:[WineWindow class]])
[window postKeyEvent:anEvent];
}
return ret;
}
......
......@@ -68,6 +68,4 @@
- (NSInteger) minimumLevelForActive:(BOOL)active;
- (void) updateFullscreen;
- (void) postKeyEvent:(NSEvent *)theEvent;
@end
......@@ -1195,6 +1195,18 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
}
}
- (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,
// rather than the device color space, to avoid expensive color conversion
// which slows down drawing. However, for windows displaying OpenGL, having
......@@ -1230,7 +1242,8 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
/*
* ---------- 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
{
......
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