Skip to content

Commit

Permalink
Wired up Windows resize hit testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jun 5, 2014
1 parent 31de8f8 commit c8cf407
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/video/windows/SDL_windowsevents.c
Expand Up @@ -897,11 +897,19 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
if (ScreenToClient(data->hwnd, &winpoint)) {
const SDL_Point point = { (int) winpoint.x, (int) winpoint.y };
const SDL_HitTestResult rc = window->hit_test(window, &point, window->hit_test_data);
if (rc == SDL_HITTEST_DRAGGABLE) {
return HTCAPTION;
switch (rc) {
case SDL_HITTEST_DRAGGABLE: return HTCAPTION;
case SDL_HITTEST_RESIZE_TOPLEFT: return HTTOPLEFT;
case SDL_HITTEST_RESIZE_TOP: return HTTOP;
case SDL_HITTEST_RESIZE_TOPRIGHT: return HTTOPRIGHT;
case SDL_HITTEST_RESIZE_RIGHT: return HTRIGHT;
case SDL_HITTEST_RESIZE_BOTTOMRIGHT: return HTBOTTOMRIGHT;
case SDL_HITTEST_RESIZE_BOTTOM: return HTBOTTOM;
case SDL_HITTEST_RESIZE_BOTTOMLEFT: return HTBOTTOMLEFT;
case SDL_HITTEST_RESIZE_LEFT: return HTLEFT;
}
}
// if we didn't return, this will call DefWindowProc below.
/* If we didn't return, this will call DefWindowProc below. */
}
}
break;
Expand Down

0 comments on commit c8cf407

Please sign in to comment.