Posted to tcl by patthoyts at Thu Mar 10 14:36:22 GMT 2011view raw

  1. Index: win/tkWinWm.c^M$
  2. ===================================================================^M$
  3. --- win/tkWinWm.c^M$
  4. +++ win/tkWinWm.c^M$
  5. @@ -34,11 +34,11 @@^M$
  6. ^M$
  7. /*^M$
  8. * Event structure for synthetic activation events. These events are placed on^M$
  9. * the event queue whenever a toplevel gets a WM_MOUSEACTIVATE message or^M$
  10. * a WM_ACTIVATE. If the window is being moved (*flagPtr will be true)^M$
  11. - * then the handling of this event must be delayed until the operation ^M$
  12. + * then the handling of this event must be delayed until the operation^M$
  13. * has completed to avoid a premature WM_EXITSIZEMOVE event.^M$
  14. */^M$
  15. ^M$
  16. typedef struct ActivateEvent {^M$
  17. Tcl_Event ev;^M$
  18. @@ -3715,11 +3715,11 @@^M$
  19. ^ITkMapTopFrame(frameWin);^M$
  20. } else {^M$
  21. ^I/* Already not managed by wm - ignore it */^M$
  22. }^M$
  23. return TCL_OK;^M$
  24. -}^L^M$
  25. +}^M$
  26. /*^M$
  27. *----------------------------------------------------------------------^M$
  28. *^M$
  29. * WmFrameCmd --^M$
  30. *^M$
  31. @@ -4374,11 +4374,11 @@^M$
  32. ^I * Don't use CreateIcon to create the icon, as it requires color^M$
  33. ^I * bitmap data in device-dependent format. Instead we use^M$
  34. ^I * CreateIconIndirect which takes device-independent bitmaps^M$
  35. ^I * and converts them as required. Initialise icon info structure.^M$
  36. ^I */^M$
  37. -^I^M$
  38. +^M$
  39. ^IZeroMemory( &iconInfo, sizeof iconInfo );^M$
  40. ^IiconInfo.fIcon = TRUE;^M$
  41. ^M$
  42. ^I/*^M$
  43. ^I * Create device-independant color bitmap.^M$
  44. @@ -4395,11 +4395,11 @@^M$
  45. ^I DIB_RGB_COLORS, &bgraPixel.voidPtr, NULL, 0 );^M$
  46. ^Iif ( !iconInfo.hbmColor ) {^M$
  47. ^I ckfree((char *) lpIR);^M$
  48. ^I Tcl_AppendResult(interp, "failed to create color bitmap for \"",^M$
  49. ^I^I Tcl_GetString(objv[i]), "\"", NULL);^M$
  50. -^I return TCL_ERROR;^I ^M$
  51. +^I return TCL_ERROR;^M$
  52. ^I}^M$
  53. ^M$
  54. ^I/*^M$
  55. ^I * Convert the photo image data into BGRA format (RGBQUAD).^M$
  56. ^I */^M$
  57. @@ -4423,15 +4423,15 @@^M$
  58. ^Iif ( !iconInfo.hbmMask ) {^M$
  59. ^I DeleteObject(iconInfo.hbmColor);^M$
  60. ^I ckfree((char *) lpIR);^M$
  61. ^I Tcl_AppendResult(interp, "failed to create mask bitmap for \"",^M$
  62. ^I^I Tcl_GetString(objv[i]), "\"", NULL);^M$
  63. -^I return TCL_ERROR;^I ^M$
  64. +^I return TCL_ERROR;^M$
  65. ^I}^M$
  66. -^I^M$
  67. +^M$
  68. ^IZeroMemory( bgraMaskPtr, width*height/8 );^M$
  69. -^I^M$
  70. +^M$
  71. ^I/*^M$
  72. ^I * Create an icon from the bitmaps.^M$
  73. ^I */^M$
  74. ^IhIcon = CreateIconIndirect( &iconInfo);^M$
  75. ^IDeleteObject(iconInfo.hbmColor);^M$
  76. @@ -7872,11 +7872,11 @@^M$
  77. ^I^Iresult = 0;^M$
  78. ^I^Igoto done;^M$
  79. ^I }^M$
  80. ^I}^M$
  81. ^I/* fall through */^M$
  82. -^I^M$
  83. +^M$
  84. case WM_EXITSIZEMOVE:^M$
  85. ^Iif (inMoveSize) {^M$
  86. ^I inMoveSize = 0;^M$
  87. ^I Tcl_SetServiceMode(oldMode);^M$
  88. ^I}^M$
  89. @@ -8041,17 +8041,17 @@^M$
  90. ^I if ((SC_MINIMIZE == cmd)^M$
  91. ^I^I&& (grab == TK_GRAB_IN_TREE || grab == TK_GRAB_ANCESTOR)^M$
  92. ^I^I&& (winPtr != winPtr->mainPtr->winPtr)) {^M$
  93. ^I^Igoto done;^M$
  94. ^I }^M$
  95. -^I if (grab == TK_GRAB_EXCLUDED ^M$
  96. +^I if (grab == TK_GRAB_EXCLUDED^M$
  97. ^I^I&& !(SC_MOVE == cmd || SC_SIZE == cmd)) {^M$
  98. ^I^Igoto done;^M$
  99. ^I }^M$
  100. ^I}^M$
  101. ^I/* fall through */^M$
  102. -^I^M$
  103. +^M$
  104. case WM_INITMENU:^M$
  105. case WM_COMMAND:^M$
  106. case WM_MENUCHAR:^M$
  107. case WM_MEASUREITEM:^M$
  108. case WM_DRAWITEM:^M$
  109. @@ -8058,11 +8058,11 @@^M$
  110. case WM_MENUSELECT:^M$
  111. case WM_ENTERIDLE:^M$
  112. case WM_INITMENUPOPUP:^M$
  113. ^Iif (winPtr) {^M$
  114. ^I HWND hMenuHWnd = Tk_GetEmbeddedMenuHWND((Tk_Window)winPtr);^M$
  115. -^I ^M$
  116. +^M$
  117. ^I if (hMenuHWnd) {^M$
  118. ^I^Iif (SendMessage(hMenuHWnd, message, wParam, lParam)) {^M$
  119. ^I^I goto done;^M$
  120. ^I^I}^M$
  121. ^I } else if (TkWinHandleMenuEvent(&hwnd, &message, &wParam, &lParam,^M$
  122. @@ -8627,19 +8627,20 @@^M$
  123. *^Ikeeps windowing system happy^M$
  124. *^M$
  125. *----------------------------------------------------------------------^M$
  126. */^M$
  127. ^M$
  128. -static void ^M$
  129. +static void^M$
  130. RemapWindows(winPtr, parentHWND)^M$
  131. TkWindow *winPtr;^M$
  132. HWND parentHWND;^M$
  133. {^M$
  134. TkWindow *childPtr;^M$
  135. + const char *className = Tk_Class(winPtr);^M$
  136. ^M$
  137. /* Skip Menus as they are handled differently */^M$
  138. - if (strcmp(Tk_Class(winPtr), "Menu") == 0) {^M$
  139. + if (className != NULL && strcmp(className, "Menu") == 0) {^M$
  140. ^Ireturn;^M$
  141. }^M$
  142. if (winPtr->window) {^M$
  143. ^ISetParent(Tk_GetHWND(winPtr->window), parentHWND);^M$
  144. }^M$
  145. ^M$