From 53b835340544345985b811c9aa3f53ed4f42fb5f Mon Sep 17 00:00:00 2001 From: woglinde Date: Fri, 28 Jan 2011 16:26:03 +0000 Subject: [PATCH] Fix:graphics/win32: WM_SETFOCUS and WM_KILLFOCUS seems to work better for #713, thanks to thomas0782 for the hint and test git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4060 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/graphics/win32/graphics_win32.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/navit/navit/graphics/win32/graphics_win32.c b/navit/navit/graphics/win32/graphics_win32.c index b5b28b8..be92e92 100644 --- a/navit/navit/graphics/win32/graphics_win32.c +++ b/navit/navit/graphics/win32/graphics_win32.c @@ -531,13 +531,20 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM l HandleKeyDown( gra_priv, wParam); break; #ifdef HAVE_API_WIN32_CE - case WM_ENABLE:; - HWND hwndSip = FindWindow(L"MS_SIPBUTTON", NULL); + case WM_SETFOCUS: if (fullscr) { + HWND hwndSip = FindWindow(L"MS_SIPBUTTON", NULL); // deactivate the SIP button ShowWindow(hwndSip, SW_HIDE); } break; + case WM_KILLFOCUS: + if (fullscr != 1) { + HWND hwndSip = FindWindow(L"MS_SIPBUTTON", NULL); + // active the SIP button + ShowWindow(hwndSip, SW_SHOW); + } + break; #endif default: return DefWindowProc(hwnd, Message, wParam, lParam); -- 2.7.4