From ad7480aecaaa7c45a18d092c4a27a4e2733b39f4 Mon Sep 17 00:00:00 2001 From: "K.Takata" Date: Mon, 5 Sep 2016 22:41:13 +0900 Subject: [PATCH] property: Fix that the focus moves when Alt+A is pressed The focus should not move if the Apply button doesn't have a focus. Related: ca4bc18d45f4d0fcde0dd1cc37abb31efd441b93 --- source/property/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/property/main.c b/source/property/main.c index 6734c17..a0519bf 100644 --- a/source/property/main.c +++ b/source/property/main.c @@ -399,8 +399,9 @@ void OnApply(HWND hDlg) g_bApplyMain = FALSE; } + if(GetFocus() == GetDlgItem(hDlg, IDC_APPLY)) + PostMessage(hDlg, WM_NEXTDLGCTL, 0, FALSE); EnableDlgItem(hDlg, IDC_APPLY, FALSE); - PostMessage(hDlg, WM_NEXTDLGCTL, 0, FALSE); } /*-------------------------------------------