diff --git a/src/dlangui/platforms/windows/winapp.d b/src/dlangui/platforms/windows/winapp.d index 8a39eea4..ba7b46b9 100644 --- a/src/dlangui/platforms/windows/winapp.d +++ b/src/dlangui/platforms/windows/winapp.d @@ -558,16 +558,19 @@ class Win32Window : Window { action = MouseAction.ButtonDown; button = MouseButton.Left; pbuttonDetails = &_lbutton; + SetFocus(_hwnd); break; case WM_RBUTTONDOWN: action = MouseAction.ButtonDown; button = MouseButton.Right; pbuttonDetails = &_rbutton; + SetFocus(_hwnd); break; case WM_MBUTTONDOWN: action = MouseAction.ButtonDown; button = MouseButton.Middle; pbuttonDetails = &_mbutton; + SetFocus(_hwnd); break; case WM_LBUTTONUP: action = MouseAction.ButtonUp;