Mercurial > dwindows
diff win/dw.c @ 539:8f80ed604a89
Some splitbar optimizations, removed unneeded code and optimized crucial
codepaths (window procedures) on OS/2 and Windows. I also figured out
what the splitbar problem is on OS/2, but the fix is not yet finished.
I have a somewhat working fix but it causes some other problems. So
I have not committed it yet.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 01 Apr 2004 07:25:38 +0000 |
parents | 222b0f32e7c9 |
children | a95f39e81fe2 |
line wrap: on
line diff
--- a/win/dw.c Thu Mar 25 19:52:57 2004 +0000 +++ b/win/dw.c Thu Apr 01 07:25:38 2004 +0000 @@ -2714,9 +2714,6 @@ MoveWindow(handle2, x - newx, 0, newx, y, FALSE); _do_resize(tmp, newx - 1, y - 1); - ShowWindow(handle1, SW_SHOW); - ShowWindow(handle2, SW_SHOW); - dw_window_set_data(hwnd, "_dw_start", (void *)newx); } else @@ -2742,20 +2739,16 @@ MoveWindow(handle2, 0, 0, x, newy, FALSE); _do_resize(tmp, x - 1, newy - 1); - ShowWindow(handle1, SW_SHOW); - ShowWindow(handle2, SW_SHOW); - dw_window_set_data(hwnd, "_dw_start", (void *)newy); } + + ShowWindow(handle1, SW_SHOW); + ShowWindow(handle2, SW_SHOW); } /* This handles any activity on the splitbars (sizers) */ BOOL CALLBACK _splitwndproc(HWND hwnd, UINT msg, WPARAM mp1, LPARAM mp2) { - float *percent = (float *)dw_window_get_data(hwnd, "_dw_percent"); - int type = (int)dw_window_get_data(hwnd, "_dw_type"); - int start = (int)dw_window_get_data(hwnd, "_dw_start"); - switch (msg) { case WM_ACTIVATE: @@ -2766,6 +2759,8 @@ { PAINTSTRUCT ps; HDC hdcPaint; + int type = (int)dw_window_get_data(hwnd, "_dw_type"); + int start = (int)dw_window_get_data(hwnd, "_dw_start"); BeginPaint(hwnd, &ps); @@ -2802,6 +2797,10 @@ break; case WM_MOUSEMOVE: { + float *percent = (float *)dw_window_get_data(hwnd, "_dw_percent"); + int type = (int)dw_window_get_data(hwnd, "_dw_type"); + int start; + if(type == DW_HORZ) SetCursor(LoadCursor(NULL, IDC_SIZEWE)); else