From d373ea28ca2547a08f100778c5e5e80c8d4cc9bd Mon Sep 17 00:00:00 2001 From: martin-s Date: Sat, 14 May 2011 14:57:30 +0000 Subject: [PATCH] Add:graphics_win32:Better configurability of SIP button handling git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4493 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/graphics/win32/graphics_win32.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/navit/navit/graphics/win32/graphics_win32.c b/navit/navit/graphics/win32/graphics_win32.c index a7fd818..0beca26 100644 --- a/navit/navit/graphics/win32/graphics_win32.c +++ b/navit/navit/graphics/win32/graphics_win32.c @@ -47,6 +47,7 @@ struct graphics_priv int width; int height; int disabled; + int flags; HANDLE wnd_parent_handle; HANDLE wnd_handle; COLORREF bg_color; @@ -534,14 +535,17 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM l break; #ifdef HAVE_API_WIN32_CE case WM_SETFOCUS: - if (fullscr) { + /* flags=0: Don't change SIPBUTTON */ + /* flags=1: Disable SIPBUTTON at fullscreen */ + /* flags=2: Disable SIPBUTTON when navit gets focus and enable it when it looses focus */ + if ((flags & 3) && (fullscr || (flags & 2))) { HWND hwndSip = FindWindow(L"MS_SIPBUTTON", NULL); // deactivate the SIP button ShowWindow(hwndSip, SW_HIDE); } break; case WM_KILLFOCUS: - if (fullscr != 1) { + if ((flags & 3) && (fullscr != 1 || (flags & 2))) { HWND hwndSip = FindWindow(L"MS_SIPBUTTON", NULL); // active the SIP button ShowWindow(hwndSip, SW_SHOW); @@ -1534,6 +1538,10 @@ static struct graphics_priv* this_->height=547; if ((attr=attr_search(attrs, NULL, attr_h))) this_->height=attr->u.num; + if ((attr=attr_search(attrs, NULL, attr_flags))) + this_->flags=attr->u.num; + else + this_->flags=1; this_->overlays = NULL; this_->cbl=cbl; this_->parent = NULL; -- 2.7.4