comparison os2/dw.c @ 183:b5a92b04b298

Minor change to handling of right clicks in the container control on OS/2.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 08 Dec 2002 17:11:32 +0000
parents b8caec82a4d2
children f55677513954
comparison
equal deleted inserted replaced
182:b8caec82a4d2 183:b5a92b04b298
40 HAB dwhab = 0; 40 HAB dwhab = 0;
41 HMQ dwhmq = 0; 41 HMQ dwhmq = 0;
42 DWTID _dwtid = 0; 42 DWTID _dwtid = 0;
43 LONG _foreground = 0xAAAAAA, _background = 0; 43 LONG _foreground = 0xAAAAAA, _background = 0;
44 44
45 HWND hwndBubble = NULLHANDLE, hwndBubbleLast = NULLHANDLE; 45 HWND hwndBubble = NULLHANDLE, hwndBubbleLast = NULLHANDLE, hwndEmph = NULLHANDLE;
46 PRECORDCORE pCore = NULL; 46 PRECORDCORE pCore = NULL, pCoreEmph = NULL;
47 ULONG aulBuffer[4]; 47 ULONG aulBuffer[4];
48 HWND lasthcnr = 0, lastitem = 0, popup = 0; 48 HWND lasthcnr = 0, lastitem = 0, popup = 0;
49 49
50 #define IS_WARP4() (aulBuffer[0] == 20 && aulBuffer[1] >= 40) 50 #define IS_WARP4() (aulBuffer[0] == 20 && aulBuffer[1] >= 40)
51 51
2072 2072
2073 dw_pointer_query_pos(&x, &y); 2073 dw_pointer_query_pos(&x, &y);
2074 2074
2075 if(tmp->window == conthwnd) 2075 if(tmp->window == conthwnd)
2076 { 2076 {
2077 int container = (int)dw_window_get_data(tmp->window, "_dw_container");
2078
2077 if(mp2) 2079 if(mp2)
2078 { 2080 {
2079 NOTIFYRECORDEMPHASIS pre; 2081 if(!container)
2080 2082 {
2081 dw_tree_item_select(tmp->window, (HWND)mp2); 2083 NOTIFYRECORDEMPHASIS pre;
2082 pre.pRecord = mp2; 2084
2083 pre.fEmphasisMask = CRA_CURSORED; 2085 dw_tree_item_select(tmp->window, (HWND)mp2);
2084 pre.hwndCnr = tmp->window; 2086 pre.pRecord = mp2;
2085 _run_event(hWnd, WM_CONTROL, MPFROM2SHORT(0, CN_EMPHASIS), (MPARAM)&pre); 2087 pre.fEmphasisMask = CRA_CURSORED;
2086 pre.pRecord->flRecordAttr |= CRA_CURSORED; 2088 pre.hwndCnr = tmp->window;
2089 _run_event(hWnd, WM_CONTROL, MPFROM2SHORT(0, CN_EMPHASIS), (MPARAM)&pre);
2090 pre.pRecord->flRecordAttr |= CRA_CURSORED;
2091 }
2092 else
2093 {
2094 hwndEmph = tmp->window;
2095 pCoreEmph = mp2;
2096 WinSendMsg(tmp->window, CM_SETRECORDEMPHASIS, mp2, MPFROM2SHORT(TRUE, CRA_SOURCE));
2097 }
2087 } 2098 }
2088 result = containercontextfunc(tmp->window, text, x, y, tmp->data, user); 2099 result = containercontextfunc(tmp->window, text, x, y, tmp->data, user);
2089 tmp = NULL; 2100 tmp = NULL;
2090 } 2101 }
2091 } 2102 }
2405 } 2416 }
2406 break; 2417 break;
2407 case WM_DESTROY: 2418 case WM_DESTROY:
2408 /* Free memory before destroying */ 2419 /* Free memory before destroying */
2409 _free_window_memory(hWnd); 2420 _free_window_memory(hWnd);
2421 break;
2422 case WM_MENUEND:
2423 if(hwndEmph && pCoreEmph)
2424 WinSendMsg(hwndEmph, CM_SETRECORDEMPHASIS, pCoreEmph, MPFROM2SHORT(FALSE, CRA_SOURCE));
2425 hwndEmph = NULLHANDLE;
2426 pCoreEmph = NULL;
2410 break; 2427 break;
2411 } 2428 }
2412 2429
2413 if(result != -1) 2430 if(result != -1)
2414 return (MRESULT)result; 2431 return (MRESULT)result;