mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 15:08:31 +00:00
Generalized the hint for whether the application gets a mouse event when clicking on the window to activate it, and is now named SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH.
The behavior is defined to not receive the click event, and this hint allows you to override that.
This commit is contained in:
@@ -1118,7 +1118,11 @@ SetWindowStyle(SDL_Window * window, NSUInteger style)
|
||||
|
||||
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
|
||||
{
|
||||
const char *hint = SDL_GetHint(SDL_HINT_MAC_MOUSE_FOCUS_CLICKTHROUGH);
|
||||
const char *hint = SDL_GetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH);
|
||||
if (!hint) {
|
||||
/* Check older hint for backwards compatibility */
|
||||
hint = SDL_GetHint("SDL_MAC_MOUSE_FOCUS_CLICKTHROUGH");
|
||||
}
|
||||
return hint && *hint != '0';
|
||||
}
|
||||
@end
|
||||
|
Reference in New Issue
Block a user