summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXMenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXMenu.c')
-rw-r--r--macosx/tkMacOSXMenu.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index e1ee0ed..4db2bf3 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.18 2005/05/15 21:09:34 wolfsuit Exp $
+ * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.19 2005/08/09 07:39:21 das Exp $
*/
#include "tkMacOSXInt.h"
#include "tkMenubutton.h"
@@ -1284,9 +1284,11 @@ ReconfigureMacintoshMenu(
ReconfigureIndividualMenu(menuPtr, macMenuHdl, 0);
+ /* Not necessary in Carbon:
if (menuPtr->menuFlags & MENU_APPLE_MENU) {
AppendResMenu(macMenuHdl, 'DRVR');
}
+ */
if (GetMenuID(macMenuHdl) == currentHelpMenuID) {
MenuItemIndex helpIndex;
HMGetHelpMenu(&helpMenuHdl,&helpIndex);
@@ -1958,7 +1960,7 @@ TkpSetMainMenubar(
}
macWindowPtr = GetWindowFromPort(winPort);
- frontNonFloating = FrontNonFloatingWindow();
+ frontNonFloating = ActiveNonFloatingWindow();
if ((macWindowPtr == NULL) || (macWindowPtr != frontNonFloating)) {
return;
}
@@ -3660,9 +3662,6 @@ MenuSelectEvent(
TkMenu *menuPtr) /* the menu we have selected. */
{
XVirtualEvent event;
- Point where;
- CGrafPtr port;
- Rect bounds;
event.type = VirtualEvent;
event.serial = menuPtr->display->request;
@@ -3674,12 +3673,8 @@ MenuSelectEvent(
event.subwindow = None;
event.time = TkpGetMS();
- GetMouse(&where);
- GetPort(&port);
- GetPortBounds(port,&bounds);
- event.x_root = where.h + bounds.left;
- event.y_root = where.v + bounds.top;
- event.state = TkMacOSXButtonKeyState();
+ XQueryPointer(NULL, None, NULL, NULL,
+ &event.x_root, &event.y_root, NULL, NULL, &event.state);
event.same_screen = true;
event.name = Tk_GetUid("MenuSelect");
event.user_data = NULL;