Mercurial > dwindows
changeset 1567:91d3586cf2a4
Fix issues with resizing scrollboxes on OS/2 that are not in their initial position.
Also some source code formatting cleanups.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 21 Jan 2012 01:06:09 +0000 |
parents | 035bc006afbe |
children | 625c4d1555fe |
files | os2/dw.c |
diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/os2/dw.c Fri Jan 20 18:47:10 2012 +0000 +++ b/os2/dw.c Sat Jan 21 01:06:09 2012 +0000 @@ -1333,7 +1333,7 @@ } /* Position the scrolled box */ - WinSetWindowPos(box, HWND_TOP, 0, -(cy - origy), cx, cy, SWP_MOVE | SWP_SIZE | SWP_ZORDER); + WinSetWindowPos(box, HWND_TOP, -hpos, -(cy - origy - vpos), cx, cy, SWP_MOVE | SWP_SIZE | SWP_ZORDER); dw_window_set_data(handle, "_dw_cy", (void *)(cy - origy)); @@ -2064,10 +2064,10 @@ HWND box = (HWND)dw_window_get_data(hWnd, "_dw_resizebox"); HWND hscroll = WinWindowFromID(hWnd, FID_HORZSCROLL); HWND vscroll = WinWindowFromID(hWnd, FID_VERTSCROLL); - int hpos = dw_scrollbar_get_pos(hscroll); - int vpos = dw_scrollbar_get_pos(vscroll); + int hpos = dw_scrollbar_get_pos(hscroll); + int vpos = dw_scrollbar_get_pos(vscroll); int cy = (int)dw_window_get_data(hWnd, "_dw_cy"); - RECTL rect; + RECTL rect; WinQueryWindowRect(client, &rect); @@ -2075,13 +2075,13 @@ { page = rect.yTop - rect.yBottom; handle = vscroll; - pos = &vpos; + pos = &vpos; } else { page = rect.xRight - rect.xLeft; handle = hscroll; - pos = &hpos; + pos = &hpos; } res = WinSendMsg(handle, SBM_QUERYRANGE, 0, 0); @@ -2114,9 +2114,9 @@ *pos = max; break; } - WinSendMsg(handle, SBM_SETPOS, (MPARAM)*pos, 0); - /* Position the scrolled box */ - WinSetWindowPos(box, HWND_TOP, -hpos, -(cy - vpos), 0, 0, SWP_MOVE); + WinSendMsg(handle, SBM_SETPOS, (MPARAM)*pos, 0); + /* Position the scrolled box */ + WinSetWindowPos(box, HWND_TOP, -hpos, -(cy - vpos), 0, 0, SWP_MOVE); break; } }