Wired up Windows resize hit testing.
authorRyan C. Gordon
Thu, 05 Jun 2014 00:54:43 -0400
changeset 89483ed9a59efda1
parent 8947 14d3e9f93c16
child 8949 9738e8208dd5
Wired up Windows resize hit testing.
src/video/windows/SDL_windowsevents.c
     1.1 --- a/src/video/windows/SDL_windowsevents.c	Thu Jun 05 00:49:25 2014 -0400
     1.2 +++ b/src/video/windows/SDL_windowsevents.c	Thu Jun 05 00:54:43 2014 -0400
     1.3 @@ -897,11 +897,19 @@
     1.4                  if (ScreenToClient(data->hwnd, &winpoint)) {
     1.5                      const SDL_Point point = { (int) winpoint.x, (int) winpoint.y };
     1.6                      const SDL_HitTestResult rc = window->hit_test(window, &point, window->hit_test_data);
     1.7 -                    if (rc == SDL_HITTEST_DRAGGABLE) {
     1.8 -                        return HTCAPTION;
     1.9 +                    switch (rc) {
    1.10 +                        case SDL_HITTEST_DRAGGABLE: return HTCAPTION;
    1.11 +                        case SDL_HITTEST_RESIZE_TOPLEFT: return HTTOPLEFT;
    1.12 +                        case SDL_HITTEST_RESIZE_TOP: return HTTOP;
    1.13 +                        case SDL_HITTEST_RESIZE_TOPRIGHT: return HTTOPRIGHT;
    1.14 +                        case SDL_HITTEST_RESIZE_RIGHT: return HTRIGHT;
    1.15 +                        case SDL_HITTEST_RESIZE_BOTTOMRIGHT: return HTBOTTOMRIGHT;
    1.16 +                        case SDL_HITTEST_RESIZE_BOTTOM: return HTBOTTOM;
    1.17 +                        case SDL_HITTEST_RESIZE_BOTTOMLEFT: return HTBOTTOMLEFT;
    1.18 +                        case SDL_HITTEST_RESIZE_LEFT: return HTLEFT;
    1.19                      }
    1.20                  }
    1.21 -                // if we didn't return, this will call DefWindowProc below.
    1.22 +                /* If we didn't return, this will call DefWindowProc below. */
    1.23              }
    1.24          }
    1.25          break;