From b66de79fec6bf8cdd74f56ea300b20346e6fc5fd Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 16 May 2015 20:33:20 -0400 Subject: [PATCH] Fixed another small error in windows/tab.c. --- redo/windows/tab.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/redo/windows/tab.c b/redo/windows/tab.c index c7cd444a..797eeb61 100644 --- a/redo/windows/tab.c +++ b/redo/windows/tab.c @@ -85,3 +85,18 @@ uiTab *uiNewTab(void) return uiTab(t); } + +// unfortunately WS_TABSTOP and WS_EX_CONTROLPARENT are mutually exclusive, so we have to toggle between them +// see main.c for more details + +void tabEnterTabNavigation(HWND hwnd) +{ + setStyle(hwnd, getStyle(hwnd) & ~WS_TABSTOP); + setExStyle(hwnd, getExStyle(hwnd) | WS_EX_CONTROLPARENT); +} + +void tabLeaveTabNavigation(HWND hwnd) +{ + setExStyle(hwnd, getExStyle(hwnd) & ~WS_EX_CONTROLPARENT); + setStyle(hwnd, getStyle(hwnd) | WS_TABSTOP); +}