# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1321200935 0 # Node ID e32b5e5595cdd5aee811c9e8ac40f413e6d3246c # Parent 63e05ef4a59a43971ff87cc112604fd6a30afc52 Temporary fix for borderless buttons on OS/2 not displaying properly... when gaining keyboard focus. diff -r 63e05ef4a59a -r e32b5e5595cd os2/dw.c --- 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: