comparison os2/dw.c @ 1337:e32b5e5595cd

Temporary fix for borderless buttons on OS/2 not displaying properly... when gaining keyboard focus.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 13 Nov 2011 16:15:35 +0000
parents c0f29ce1a879
children c6d6788e207f
comparison
equal deleted inserted replaced
1336:63e05ef4a59a 1337:e32b5e5595cd
514 514
515 int _focus_check_box(Box *box, HWND handle, int start, HWND defaultitem) 515 int _focus_check_box(Box *box, HWND handle, int start, HWND defaultitem)
516 { 516 {
517 int z; 517 int z;
518 static HWND lasthwnd, firsthwnd; 518 static HWND lasthwnd, firsthwnd;
519 static int finish_searching; 519 static int finish_searching;
520 520
521 /* Start is 2 when we have cycled completely and 521 /* Start is 2 when we have cycled completely and
522 * need to set the focus to the last widget we found 522 * need to set the focus to the last widget we found
523 * that was valid. 523 * that was valid.
524 */ 524 */
3407 return _button_draw(hwnd, msg, mp1, mp2, oldproc, (int)mp1); 3407 return _button_draw(hwnd, msg, mp1, mp2, oldproc, (int)mp1);
3408 case WM_SETFOCUS: 3408 case WM_SETFOCUS:
3409 if(mp2) 3409 if(mp2)
3410 _run_event(hwnd, msg, mp1, mp2); 3410 _run_event(hwnd, msg, mp1, mp2);
3411 else 3411 else
3412 WinSendMsg(hwnd, BM_SETDEFAULT, 0, 0); 3412 WinSendMsg(hwnd, BM_SETDEFAULT, 0, 0);
3413 /* FIX: Borderless buttons not displaying properly after gaining focus */
3414 if((WinQueryWindowULong(hwnd, QWL_STYLE) & BS_NOBORDER))
3415 {
3416 RECTL rcl;
3417
3418 WinQueryWindowRect(hwnd, &rcl);
3419
3420 WinInvalidateRect(hwnd, &rcl, FALSE);
3421 WinPostMsg(hwnd, WM_PAINT, 0, 0);
3422 }
3413 break; 3423 break;
3414 case WM_BUTTON1DOWN: 3424 case WM_BUTTON1DOWN:
3415 case WM_BUTTON2DOWN: 3425 case WM_BUTTON2DOWN:
3416 case WM_BUTTON3DOWN: 3426 case WM_BUTTON3DOWN:
3417 case WM_BUTTON1DBLCLK: 3427 case WM_BUTTON1DBLCLK: