Mercurial > dwindows
comparison win/dw.c @ 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 | 0676561865ac |
children | 18c1b999dd65 |
comparison
equal
deleted
inserted
replaced
1433:feb0429278e2 | 1434:2cca36ec3da6 |
---|---|
3405 | 3405 |
3406 BOOL CALLBACK _BtProc(HWND hwnd, ULONG msg, WPARAM mp1, LPARAM mp2) | 3406 BOOL CALLBACK _BtProc(HWND hwnd, ULONG msg, WPARAM mp1, LPARAM mp2) |
3407 { | 3407 { |
3408 ColorInfo *cinfo = (ColorInfo *)GetWindowLongPtr(hwnd, GWLP_USERDATA); | 3408 ColorInfo *cinfo = (ColorInfo *)GetWindowLongPtr(hwnd, GWLP_USERDATA); |
3409 WNDPROC pOldProc; | 3409 WNDPROC pOldProc; |
3410 int retval = -1; | |
3410 | 3411 |
3411 if ( !cinfo ) | 3412 if ( !cinfo ) |
3412 return DefWindowProc(hwnd, msg, mp1, mp2); | 3413 return DefWindowProc(hwnd, msg, mp1, mp2); |
3413 | 3414 |
3414 /* We must save a pointer to the old | 3415 /* We must save a pointer to the old |
3449 int checkbox = DW_POINTER_TO_INT(dw_window_get_data(hwnd, "_dw_checkbox")); | 3450 int checkbox = DW_POINTER_TO_INT(dw_window_get_data(hwnd, "_dw_checkbox")); |
3450 | 3451 |
3451 if(checkbox) | 3452 if(checkbox) |
3452 in_checkbox_handler = 1; | 3453 in_checkbox_handler = 1; |
3453 | 3454 |
3454 clickfunc(tmp->window, tmp->data); | 3455 retval = clickfunc(tmp->window, tmp->data); |
3455 | 3456 |
3456 if(checkbox) | 3457 if(checkbox) |
3457 in_checkbox_handler = 0; | 3458 in_checkbox_handler = 0; |
3458 tmp = NULL; | 3459 tmp = NULL; |
3459 } | 3460 } |
3480 int (*clickfunc)(HWND, void *) = tmp->signalfunction; | 3481 int (*clickfunc)(HWND, void *) = tmp->signalfunction; |
3481 | 3482 |
3482 /* Make sure it's the right window, and the right ID */ | 3483 /* Make sure it's the right window, and the right ID */ |
3483 if(tmp->window == hwnd) | 3484 if(tmp->window == hwnd) |
3484 { | 3485 { |
3485 clickfunc(tmp->window, tmp->data); | 3486 retval = clickfunc(tmp->window, tmp->data); |
3486 tmp = NULL; | 3487 tmp = NULL; |
3487 } | 3488 } |
3488 } | 3489 } |
3489 if(tmp) | 3490 if(tmp) |
3490 tmp= tmp->next; | 3491 tmp= tmp->next; |
3506 if(mp1 == VK_RIGHT || mp1 == VK_DOWN) | 3507 if(mp1 == VK_RIGHT || mp1 == VK_DOWN) |
3507 _shift_focus(hwnd); | 3508 _shift_focus(hwnd); |
3508 break; | 3509 break; |
3509 } | 3510 } |
3510 | 3511 |
3512 /* Make sure windows are up-to-date */ | |
3513 if(retval != -1) | |
3514 _dw_redraw(0, FALSE); | |
3511 if ( !pOldProc ) | 3515 if ( !pOldProc ) |
3512 return DefWindowProc(hwnd, msg, mp1, mp2); | 3516 return DefWindowProc(hwnd, msg, mp1, mp2); |
3513 return CallWindowProc(pOldProc, hwnd, msg, mp1, mp2); | 3517 return CallWindowProc(pOldProc, hwnd, msg, mp1, mp2); |
3514 } | 3518 } |
3515 | 3519 |