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:
parent
273f71a704
commit
5d60a58a8b
2 changed files with 24 additions and 16 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue