Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSX menus unresponsive to mouse input until focus lost & regained. #2224

Open
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Open
Assignees
Milestone

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 2.0.4
Reported for operating system, platform: Mac OS X 10.11, x86

Comments on the original bug report:

On 2016-07-26 21:45:57 +0000, Devon Sean McCullough wrote:

/// sdl-menu-bug.c

// Menu Bar (Apple) sdl-menu-bug Window View
// unresponsive until the app loses and regains focus.

#include <SDL2/SDL.h>

int
main () {
SDL_Init (SDL_INIT_EVERYTHING);
SDL_CreateWindow ("SDL2 Menu Bug", 100, 100, 800, 600, SDL_WINDOW_OPENGL);
for (;;) {SDL_Event event;
SDL_WaitEvent (&event);
if (event.type == SDL_QUIT) { SDL_Quit (); return 0; }}}

// Local Variables:
// compile-command: "cc -g -O0 -F/Library/Frameworks -I SDL2-includes sdl-menu-bug.c -o sdl-menu-bug -framework SDL2 -Wl,-framework,Cocoa && ./sdl-menu-bug"
// End:

On 2016-08-01 20:45:43 +0000, Philipp Wiesemann wrote:

Maybe this is a similar problem like in bug # 3365.

On 2016-08-01 22:21:03 +0000, Devon Sean McCullough wrote:

(In reply to Philipp Wiesemann from comment # 1)

Maybe this is a similar problem like in bug # 3365.

Very different as SDL_WaitEvent calls SDL_PumpEvents() every 10ms.

  Peace
  	--Devon

P.S. An initial 5s delay merely delays the black window's appearance,
then the buggy behavior is unchanged.

An initial PumpEvents before the delay merely gets a spinning beachball
while waiting for the black window to appear, otherwise unchanged.

Moving, minimizing and un-minimizing the window do not affect the bug.

In all cases the menus appear at once but are unresponsive to mouse input
until the window loses and then gains focus.

On 2016-08-01 22:36:08 +0000, Devon Sean McCullough wrote:

The menus do respond to keyboard shortcuts at all times.
Clover-Q, Clover-H and Clover-Alt-H always work.
Hiding and un-hiding does not affect the bug.

On 2016-08-01 22:39:40 +0000, Devon Sean McCullough wrote:

Delete Comment 3 line 3 please - obviously un-hiding gains focus.

On 2016-08-05 21:34:20 +0000, Jim Van Verth wrote:

This might be related to the line

[NSApp activateIgnoringOtherApps:YES]

in Cocoa_RegisterApp(). Commenting it out allows the menu to activate -- assuming
that the window activates. Without that line, it looks like file access (for me,
anyway) prevents the window from activating.

I tried moving this to after window creation (as another framework does), but it
didn't make any difference.

@slouken slouken removed the bug label May 11, 2022
@slouken slouken added this to the 2.32.0 milestone Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants