From 4ed1efd75be8c7f62f45ad21b13988e8dbc923ea Mon Sep 17 00:00:00 2001 From: Vadim Lopatin Date: Fri, 13 Feb 2015 11:47:19 +0300 Subject: [PATCH] win32 backend: fix keyboard focus issue when returning back to dlangui window from another app with mouse instead of Alt+Tab (dlangide issue 26) --- src/dlangui/platforms/windows/winapp.d | 3 +++ 1 file changed, 3 insertions(+) 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;