Mercurial > dwindows
changeset 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 | 63e05ef4a59a |
children | b23ae7d9f729 |
files | os2/dw.c |
diffstat | 1 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/os2/dw.c Sun Nov 13 14:46:30 2011 +0000 +++ b/os2/dw.c Sun Nov 13 16:15:35 2011 +0000 @@ -516,7 +516,7 @@ { int z; static HWND lasthwnd, firsthwnd; - static int finish_searching; + static int finish_searching; /* Start is 2 when we have cycled completely and * need to set the focus to the last widget we found @@ -3409,7 +3409,17 @@ if(mp2) _run_event(hwnd, msg, mp1, mp2); else - WinSendMsg(hwnd, BM_SETDEFAULT, 0, 0); + WinSendMsg(hwnd, BM_SETDEFAULT, 0, 0); + /* FIX: Borderless buttons not displaying properly after gaining focus */ + if((WinQueryWindowULong(hwnd, QWL_STYLE) & BS_NOBORDER)) + { + RECTL rcl; + + WinQueryWindowRect(hwnd, &rcl); + + WinInvalidateRect(hwnd, &rcl, FALSE); + WinPostMsg(hwnd, WM_PAINT, 0, 0); + } break; case WM_BUTTON1DOWN: case WM_BUTTON2DOWN: