diff options
Diffstat (limited to 'alf/alf.cpp')
| -rw-r--r-- | alf/alf.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/alf/alf.cpp b/alf/alf.cpp index 3bcde5b..2ec33ca 100644 --- a/alf/alf.cpp +++ b/alf/alf.cpp @@ -249,13 +249,20 @@ ALF_ApplyLayout(HWND hwnd, ALFWindowPriv *win) int margintop = ALF_CentipointsToPxPriv(win, c->cptMarginTop); int marginbottom = ALF_CentipointsToPxPriv(win, c->cptMarginBottom); - hdwp = DeferWindowPos(hdwp, - c->hwnd, 0, - win->layout.columns[c->x].allocatedPosition + marginleft, - win->layout.rows[c->y].allocatedPosition + margintop, - win->layout.columns[c->x].allocatedWidth - marginleft - marginright, - win->layout.rows[c->y].allocatedWidth - margintop - marginbottom, - SWP_NOACTIVATE | SWP_NOZORDER); + RECT r = { 0,0,0,0 }; + r.left = win->layout.columns[c->x].allocatedPosition + marginleft; + r.right = r.left + win->layout.columns[c->x].allocatedWidth - marginleft - marginright; + r.top = win->layout.rows[c->y].allocatedPosition + margintop; + r.bottom = r.top + win->layout.rows[c->y].allocatedWidth - margintop - marginbottom; + + if (c->flags & ALF_APPLYSIZE) { + hdwp = (HDWP)SendMessage(c->hwnd, ALF_WM_APPLYSIZE, (WPARAM)hdwp, (LPARAM)&r); + } else { + hdwp = DeferWindowPos(hdwp, + c->hwnd, 0, + r.left, r.top, r.right - r.left, r.bottom - r.top, + SWP_NOACTIVATE | SWP_NOZORDER); + } } EndDeferWindowPos(hdwp); |
