win32 backend: fix keyboard focus issue when returning back to dlangui window from another app with mouse instead of Alt+Tab (dlangide issue 26)

This commit is contained in:
Vadim Lopatin 2015-02-13 11:47:19 +03:00
parent dabc76390b
commit 4ed1efd75b
1 changed files with 3 additions and 0 deletions

View File

@ -558,16 +558,19 @@ class Win32Window : Window {
action = MouseAction.ButtonDown; action = MouseAction.ButtonDown;
button = MouseButton.Left; button = MouseButton.Left;
pbuttonDetails = &_lbutton; pbuttonDetails = &_lbutton;
SetFocus(_hwnd);
break; break;
case WM_RBUTTONDOWN: case WM_RBUTTONDOWN:
action = MouseAction.ButtonDown; action = MouseAction.ButtonDown;
button = MouseButton.Right; button = MouseButton.Right;
pbuttonDetails = &_rbutton; pbuttonDetails = &_rbutton;
SetFocus(_hwnd);
break; break;
case WM_MBUTTONDOWN: case WM_MBUTTONDOWN:
action = MouseAction.ButtonDown; action = MouseAction.ButtonDown;
button = MouseButton.Middle; button = MouseButton.Middle;
pbuttonDetails = &_mbutton; pbuttonDetails = &_mbutton;
SetFocus(_hwnd);
break; break;
case WM_LBUTTONUP: case WM_LBUTTONUP:
action = MouseAction.ButtonUp; action = MouseAction.ButtonUp;