mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
cocoa: Popup menus always accept first click
(cherry picked from commit 09b2aae47e
)
This commit is contained in:
@@ -2104,7 +2104,9 @@ static void Cocoa_SendMouseButtonClicks(SDL_Mouse *mouse, NSEvent *theEvent, SDL
|
|||||||
|
|
||||||
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
|
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
|
||||||
{
|
{
|
||||||
if (SDL_GetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH)) {
|
if (_sdlWindow->flags & SDL_WINDOW_POPUP_MENU) {
|
||||||
|
return YES;
|
||||||
|
} else if (SDL_GetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH)) {
|
||||||
return SDL_GetHintBoolean(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, false);
|
return SDL_GetHintBoolean(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, false);
|
||||||
} else {
|
} else {
|
||||||
return SDL_GetHintBoolean("SDL_MAC_MOUSE_FOCUS_CLICKTHROUGH", false);
|
return SDL_GetHintBoolean("SDL_MAC_MOUSE_FOCUS_CLICKTHROUGH", false);
|
||||||
|
Reference in New Issue
Block a user