mirror of
https://github.com/encounter/SDL.git
synced 2025-12-21 10:49:12 +00:00
Fixed bug 4265 - SDL window falls to the bottom of the screen when dragged down and stuck there
Alexei On WM_WINDOWPOSCHANGED event, WIN_UpdateClipCursor() is called. SDL_WINDOW_INPUT_FOCUS is set even when the mouse pointer is not inside the SDL window and therefore ClipCursor(&rect) is called. When dragging the window and rect.bottom=800 (i.e. the bottom edge of the screen) the SDL window is clipped to the bottom of the screen and it is not possible to move it back to the center of the screen.
This commit is contained in:
@@ -414,6 +414,13 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_NCACTIVATE:
|
||||
{
|
||||
/* Don't immediately clip the cursor in case we're clicking minimize/maximize buttons */
|
||||
data->skip_update_clipcursor = SDL_TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_ACTIVATE:
|
||||
{
|
||||
POINT cursorPos;
|
||||
|
||||
Reference in New Issue
Block a user