src/events/SDL_windowevents.c
changeset 7089 257fc4e541e1
parent 6885 700f1b25f77f
child 7191 75360622e65f
equal deleted inserted replaced
7088:664d8532219b 7089:257fc4e541e1
   146     case SDL_WINDOWEVENT_ENTER:
   146     case SDL_WINDOWEVENT_ENTER:
   147         if (window->flags & SDL_WINDOW_MOUSE_FOCUS) {
   147         if (window->flags & SDL_WINDOW_MOUSE_FOCUS) {
   148             return 0;
   148             return 0;
   149         }
   149         }
   150         window->flags |= SDL_WINDOW_MOUSE_FOCUS;
   150         window->flags |= SDL_WINDOW_MOUSE_FOCUS;
       
   151         SDL_OnWindowEnter(window);
   151         break;
   152         break;
   152     case SDL_WINDOWEVENT_LEAVE:
   153     case SDL_WINDOWEVENT_LEAVE:
   153         if (!(window->flags & SDL_WINDOW_MOUSE_FOCUS)) {
   154         if (!(window->flags & SDL_WINDOW_MOUSE_FOCUS)) {
   154             return 0;
   155             return 0;
   155         }
   156         }
   156         window->flags &= ~SDL_WINDOW_MOUSE_FOCUS;
   157         window->flags &= ~SDL_WINDOW_MOUSE_FOCUS;
       
   158 		SDL_OnWindowLeave(window);
   157         break;
   159         break;
   158     case SDL_WINDOWEVENT_FOCUS_GAINED:
   160     case SDL_WINDOWEVENT_FOCUS_GAINED:
   159         if (window->flags & SDL_WINDOW_INPUT_FOCUS) {
   161         if (window->flags & SDL_WINDOW_INPUT_FOCUS) {
   160             return 0;
   162             return 0;
   161         }
   163         }