Overview
| Artifact ID: | 6a3831ae434c4d1a36a4f0b509da44a31656074c |
|---|---|
| Ticket: | 564897ffffffffffffffffffffffffffffffffff |
| Date: | 2002-06-05 23:39:01 |
| User: | davygrvy |
| Artifact Attached: | b0b458df9e0c55d6db4818f58df511e4801b423a |
| Filename: | patch.txt |
| Description: |
Content:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37Index: tkWinWm.c =================================================================== RCS file: /cvsroot/tktoolkit/tk/win/tkWinWm.c,v retrieving revision 1.38 diff -c -r1.38 tkWinWm.c *** tkWinWm.c 27 May 2002 22:54:42 -0000 1.38 --- tkWinWm.c 5 Jun 2002 16:36:37 -0000 *************** *** 5494,5500 **** ActivateEvent *eventPtr; winPtr = GetTopLevel((HWND) wParam); ! if (winPtr && (TkGrabState(winPtr) != TK_GRAB_EXCLUDED)) { /* * This allows us to pass the message onto the * native menus [Bug: 2272] --- 5494,5513 ---- ActivateEvent *eventPtr; winPtr = GetTopLevel((HWND) wParam); ! /* ! * If you have Tk embedded in a C application, your Windows' ! * windows may be above your Tcl windows in the window ! * hierarchy. In this case, the message goes to the main ! * application window. Since the application window is above ! * all the Tk windows, and isn't a Tk window itself, when we ! * try to "get its toplevel" we get a null pointer. The ! * result is that the application doesn't activate if we ! * click a widget in the application. The !winPtr || portion ! * ensures that the message is passed through and the ! * application activates. ! */ ! if (!winPtr || (winPtr && (TkGrabState(winPtr) != ! TK_GRAB_EXCLUDED))) { /* * This allows us to pass the message onto the * native menus [Bug: 2272]
