diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-14 11:30:48 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-14 11:30:48 -0400 |
| commit | 2c8bb7bc6d3b5614d53de957b4dca025c53a9cee (patch) | |
| tree | 047678d358c9b5e741f54c051a3bb580e704fd4f /redo/tab_windows.c | |
| parent | c1dc235d3b1bda6f4ddff92da1e348399c4a3e70 (diff) | |
Fixed Tabs on Windows having undesirable tab stop behavior. This doesn't work correctly in wine, and I can confirm for the first time that it actually is a bug in wine!
Diffstat (limited to 'redo/tab_windows.c')
| -rw-r--r-- | redo/tab_windows.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/redo/tab_windows.c b/redo/tab_windows.c index 791e115..4958a68 100644 --- a/redo/tab_windows.c +++ b/redo/tab_windows.c @@ -80,3 +80,27 @@ LONG tabGetTabHeight(HWND hwnd) } return tallest; } + +void tabEnterChildren(HWND hwnd) +{ + DWORD style, xstyle; + + style = (DWORD) GetWindowLongPtrW(hwnd, GWL_STYLE); + xstyle = (DWORD) GetWindowLongPtrW(hwnd, GWL_EXSTYLE); + style &= ~((DWORD) WS_TABSTOP); + xstyle |= WS_EX_CONTROLPARENT; + SetWindowLongPtrW(hwnd, GWL_STYLE, (LONG_PTR) style); + SetWindowLongPtrW(hwnd, GWL_EXSTYLE, (LONG_PTR) xstyle); +} + +void tabLeaveChildren(HWND hwnd) +{ + DWORD style, xstyle; + + style = (DWORD) GetWindowLongPtrW(hwnd, GWL_STYLE); + xstyle = (DWORD) GetWindowLongPtrW(hwnd, GWL_EXSTYLE); + style |= WS_TABSTOP; + xstyle &= ~((DWORD) WS_EX_CONTROLPARENT); + SetWindowLongPtrW(hwnd, GWL_STYLE, (LONG_PTR) style); + SetWindowLongPtrW(hwnd, GWL_EXSTYLE, (LONG_PTR) xstyle); +} |
