src/video/cocoa/SDL_cocoawindow.m
changeset 8929 7b459b49fa92
parent 8738 354dabd2cb58
child 8931 44d8a2f4b431
equal deleted inserted replaced
8928:f60f16d29e37 8929:7b459b49fa92
   743 
   743 
   744     point = [theEvent locationInWindow];
   744     point = [theEvent locationInWindow];
   745     x = (int)point.x;
   745     x = (int)point.x;
   746     y = (int)(window->h - point.y);
   746     y = (int)(window->h - point.y);
   747 
   747 
   748     if (x < 0 || x >= window->w || y < 0 || y >= window->h) {
   748     if (window->flags & SDL_WINDOW_INPUT_GRABBED) {
   749         if (window->flags & SDL_WINDOW_INPUT_GRABBED) {
   749         if (x < 0 || x >= window->w || y < 0 || y >= window->h) {
   750             if (x < 0) {
   750             if (x < 0) {
   751                 x = 0;
   751                 x = 0;
   752             } else if (x >= window->w) {
   752             } else if (x >= window->w) {
   753                 x = window->w - 1;
   753                 x = window->w - 1;
   754             }
   754             }