src/video/windows/SDL_windowsevents.c
changeset 8948 3ed9a59efda1
parent 8942 3d84839c97b2
child 8949 9738e8208dd5
equal deleted inserted replaced
8947:14d3e9f93c16 8948:3ed9a59efda1
   895             if (window->hit_test) {
   895             if (window->hit_test) {
   896                 POINT winpoint = { (int) LOWORD(lParam), (int) HIWORD(lParam) };
   896                 POINT winpoint = { (int) LOWORD(lParam), (int) HIWORD(lParam) };
   897                 if (ScreenToClient(data->hwnd, &winpoint)) {
   897                 if (ScreenToClient(data->hwnd, &winpoint)) {
   898                     const SDL_Point point = { (int) winpoint.x, (int) winpoint.y };
   898                     const SDL_Point point = { (int) winpoint.x, (int) winpoint.y };
   899                     const SDL_HitTestResult rc = window->hit_test(window, &point, window->hit_test_data);
   899                     const SDL_HitTestResult rc = window->hit_test(window, &point, window->hit_test_data);
   900                     if (rc == SDL_HITTEST_DRAGGABLE) {
   900                     switch (rc) {
   901                         return HTCAPTION;
   901                         case SDL_HITTEST_DRAGGABLE: return HTCAPTION;
       
   902                         case SDL_HITTEST_RESIZE_TOPLEFT: return HTTOPLEFT;
       
   903                         case SDL_HITTEST_RESIZE_TOP: return HTTOP;
       
   904                         case SDL_HITTEST_RESIZE_TOPRIGHT: return HTTOPRIGHT;
       
   905                         case SDL_HITTEST_RESIZE_RIGHT: return HTRIGHT;
       
   906                         case SDL_HITTEST_RESIZE_BOTTOMRIGHT: return HTBOTTOMRIGHT;
       
   907                         case SDL_HITTEST_RESIZE_BOTTOM: return HTBOTTOM;
       
   908                         case SDL_HITTEST_RESIZE_BOTTOMLEFT: return HTBOTTOMLEFT;
       
   909                         case SDL_HITTEST_RESIZE_LEFT: return HTLEFT;
   902                     }
   910                     }
   903                 }
   911                 }
   904                 // if we didn't return, this will call DefWindowProc below.
   912                 /* If we didn't return, this will call DefWindowProc below. */
   905             }
   913             }
   906         }
   914         }
   907         break;
   915         break;
   908 
   916 
   909     }
   917     }