mirror of https://github.com/libsdl-org/SDL.git
Tooltips and unfocusable windows can't become main windows
This commit is contained in:
parent
ebb24eedc8
commit
a446381ea9
|
|
@ -36,7 +36,9 @@
|
||||||
#include "SDL_cocoaopengles.h"
|
#include "SDL_cocoaopengles.h"
|
||||||
#include "SDL_cocoavideo.h"
|
#include "SDL_cocoavideo.h"
|
||||||
|
|
||||||
// #define DEBUG_COCOAWINDOW
|
#if 0
|
||||||
|
#define DEBUG_COCOAWINDOW
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG_COCOAWINDOW
|
#ifdef DEBUG_COCOAWINDOW
|
||||||
#define DLog(fmt, ...) printf("%s: " fmt "\n", __func__, ##__VA_ARGS__)
|
#define DLog(fmt, ...) printf("%s: " fmt "\n", __func__, ##__VA_ARGS__)
|
||||||
|
|
@ -125,7 +127,7 @@
|
||||||
- (BOOL)canBecomeMainWindow
|
- (BOOL)canBecomeMainWindow
|
||||||
{
|
{
|
||||||
SDL_Window *window = [self findSDLWindow];
|
SDL_Window *window = [self findSDLWindow];
|
||||||
if (window && !SDL_WINDOW_IS_POPUP(window)) {
|
if (window && !(window->flags & (SDL_WINDOW_TOOLTIP | SDL_WINDOW_NOT_FOCUSABLE)) && !SDL_WINDOW_IS_POPUP(window)) {
|
||||||
return YES;
|
return YES;
|
||||||
} else {
|
} else {
|
||||||
return NO;
|
return NO;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue