Mercurial > dwindows
changeset 314:41b890c649e7
Fixed a container emphasis problem when no context menus are created.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 31 Mar 2003 21:32:55 +0000 |
parents | a3dee031d27e |
children | 89eac0990c67 |
files | os2/dw.c |
diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/os2/dw.c Mon Mar 31 10:24:51 2003 +0000 +++ b/os2/dw.c Mon Mar 31 21:32:55 2003 +0000 @@ -1838,6 +1838,14 @@ return -1; } +void _clear_emphasis(void) +{ + if(hwndEmph && pCoreEmph) + WinSendMsg(hwndEmph, CM_SETRECORDEMPHASIS, pCoreEmph, MPFROM2SHORT(FALSE, CRA_SOURCE)); + hwndEmph = NULLHANDLE; + pCoreEmph = NULL; +} + MRESULT EXPENTRY _run_event(HWND hWnd, ULONG msg, MPARAM mp1, MPARAM mp2) { int result = -1; @@ -2120,6 +2128,8 @@ } else { + if(pCoreEmph) + _clear_emphasis(); hwndEmph = tmp->window; pCoreEmph = mp2; WinSendMsg(tmp->window, CM_SETRECORDEMPHASIS, mp2, MPFROM2SHORT(TRUE, CRA_SOURCE)); @@ -2473,10 +2483,7 @@ _free_window_memory(hWnd); break; case WM_MENUEND: - if(hwndEmph && pCoreEmph) - WinSendMsg(hwndEmph, CM_SETRECORDEMPHASIS, pCoreEmph, MPFROM2SHORT(FALSE, CRA_SOURCE)); - hwndEmph = NULLHANDLE; - pCoreEmph = NULL; + _clear_emphasis(); break; }