Mercurial > dwindows
changeset 1434:2cca36ec3da6
Fixed automatic redrawing not occurring on OS/2 and Windows when changes were made from a button press handler.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 06 Dec 2011 22:36:55 +0000 |
parents | feb0429278e2 |
children | 3c5287b8eebb |
files | os2/dw.c readme win/dw.c |
diffstat | 3 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/os2/dw.c Mon Dec 05 05:22:06 2011 +0000 +++ b/os2/dw.c Tue Dec 06 22:36:55 2011 +0000 @@ -3856,6 +3856,7 @@ { WindowData *blah = WinQueryWindowPtr(hwnd, QWL_USER); PFNWP oldproc; + int retval = -1; if(!blah) return WinDefWindowProc(hwnd, msg, mp1, mp2); @@ -3932,14 +3933,14 @@ break; case WM_USER: { - SignalHandler *tmp = (SignalHandler *)mp1; + SignalHandler *tmp = (SignalHandler *)mp1; int (API_FUNC clickfunc)(HWND, void *) = NULL; if(tmp) { clickfunc = (int (API_FUNC)(HWND, void *))tmp->signalfunction; - clickfunc(tmp->window, tmp->data); + retval = clickfunc(tmp->window, tmp->data); } } break; @@ -3990,6 +3991,10 @@ } break; } + + /* Make sure windows are up-to-date */ + if(retval != -1) + _dw_redraw(0, FALSE); if(!oldproc) return WinDefWindowProc(hwnd, msg, mp1, mp2); return oldproc(hwnd, msg, mp1, mp2);
--- a/readme Mon Dec 05 05:22:06 2011 +0000 +++ b/readme Tue Dec 06 22:36:55 2011 +0000 @@ -43,7 +43,7 @@ automatically figure out a suggested size for many controls. Added automatic window redraw support for OS/2, Windows and Mac. Added Open Watcom compiler support for OS/2. -Added pseudo transparent background widget support on Windows. +Added pseudo transparent background widget support on Windows and OS/2. If you set the background color of a widget to DW_RGB_TRANSPARENT... it will attempt to use the background color of the parent. Several types of widgets have this set by default now.
--- a/win/dw.c Mon Dec 05 05:22:06 2011 +0000 +++ b/win/dw.c Tue Dec 06 22:36:55 2011 +0000 @@ -3407,6 +3407,7 @@ { ColorInfo *cinfo = (ColorInfo *)GetWindowLongPtr(hwnd, GWLP_USERDATA); WNDPROC pOldProc; + int retval = -1; if ( !cinfo ) return DefWindowProc(hwnd, msg, mp1, mp2); @@ -3451,7 +3452,7 @@ if(checkbox) in_checkbox_handler = 1; - clickfunc(tmp->window, tmp->data); + retval = clickfunc(tmp->window, tmp->data); if(checkbox) in_checkbox_handler = 0; @@ -3482,7 +3483,7 @@ /* Make sure it's the right window, and the right ID */ if(tmp->window == hwnd) { - clickfunc(tmp->window, tmp->data); + retval = clickfunc(tmp->window, tmp->data); tmp = NULL; } } @@ -3508,6 +3509,9 @@ break; } + /* Make sure windows are up-to-date */ + if(retval != -1) + _dw_redraw(0, FALSE); if ( !pOldProc ) return DefWindowProc(hwnd, msg, mp1, mp2); return CallWindowProc(pOldProc, hwnd, msg, mp1, mp2);