mirror of https://github.com/encounter/SDL.git
Fix SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH=1 on Metal windows
SDL_cocoametalview was consuming the first click rather than passing it through to the SDLView underneath which overrides [NSView acceptsFirstMouse] based on the user's SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH preference.
This commit is contained in:
parent
244d0ad854
commit
1b6de9a987
|
@ -48,6 +48,7 @@
|
||||||
windowID:(Uint32)windowID;
|
windowID:(Uint32)windowID;
|
||||||
|
|
||||||
- (void)updateDrawableSize;
|
- (void)updateDrawableSize;
|
||||||
|
- (NSView *)hitTest:(NSPoint)point;
|
||||||
|
|
||||||
/* Override superclass tag so this class can set it. */
|
/* Override superclass tag so this class can set it. */
|
||||||
@property (assign, readonly) NSInteger tag;
|
@property (assign, readonly) NSInteger tag;
|
||||||
|
|
|
@ -123,6 +123,10 @@ SDL_MetalViewEventWatch(void *userdata, SDL_Event *event)
|
||||||
metalLayer.drawableSize = NSSizeToCGSize(backingSize);
|
metalLayer.drawableSize = NSSizeToCGSize(backingSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSView *)hitTest:(NSPoint)point {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
SDL_MetalView
|
SDL_MetalView
|
||||||
|
|
Loading…
Reference in New Issue