diff options
| author | Pietro Gagliardi <[email protected]> | 2014-10-26 14:43:45 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-10-26 14:43:45 -0400 |
| commit | db80156eba98e851d4e9983261eb060bb60d615e (patch) | |
| tree | bd8a61758ed026a883175f8a4ee24c95c6761d45 /tab_windows.c | |
| parent | acc8157bea65221220ae33b665781de86745b465 (diff) | |
Began migrating the Windows code away from using container entirely. This is going to be a mess for Tab... hopefully only a short-term one.
Diffstat (limited to 'tab_windows.c')
| -rw-r--r-- | tab_windows.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tab_windows.c b/tab_windows.c index 9a9908a..081129c 100644 --- a/tab_windows.c +++ b/tab_windows.c @@ -10,6 +10,8 @@ static LRESULT CALLBACK tabSubProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l { NMHDR *nmhdr = (NMHDR *) lParam; LRESULT r; + RECT resizeRect; + WINDOWPOS *wp; switch (uMsg) { case msgNOTIFY: @@ -27,6 +29,17 @@ static LRESULT CALLBACK tabSubProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l return (*fv_DefSubclassProc)(hwnd, uMsg, wParam, lParam); case msgTabCurrentTabHasChildren: return (LRESULT) tabTabHasChildren((void *) data, SendMessageW(hwnd, TCM_GETCURSEL, 0, 0)); + case WM_WINDOWPOSCHANGING: + case WM_WINDOWPOSCHANGED: + wp = (WINDOWPOS *) lParam; + resizeRect.left = wp->x; + resizeRect.top = wp->y; + resizeRect.right = wp->x + wp->cx; + resizeRect.bottom = wp->y + wp->cy; + tabGetContentRect(hwnd, &resizeRect); + tabResized((void *) data, resizeRect); + // and chain up + return (*fv_DefSubclassProc)(hwnd, uMsg, wParam, lParam); case WM_NCDESTROY: if ((*fv_RemoveWindowSubclass)(hwnd, tabSubProc, id) == FALSE) xpanic("error removing Tab subclass (which was for its own event handler)", GetLastError()); |
