summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-26 10:44:04 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-26 10:44:04 (GMT)
commitae8836e95248ef2e25508b3e234ae1f1ef46efac (patch)
treee7197c37fb5c60b4f815d39faa930fb11563fb5f
parenta33411438ab9001bdd38f2d693229ec03b565c79 (diff)
parent219216c26fe5f38d29a865b7df2a5f816d20fffa (diff)
downloadtk-ae8836e95248ef2e25508b3e234ae1f1ef46efac.zip
tk-ae8836e95248ef2e25508b3e234ae1f1ef46efac.tar.gz
tk-ae8836e95248ef2e25508b3e234ae1f1ef46efac.tar.bz2
Fix [08eb057dea]: Aqua: cleanup Carbon-era cursor variables.
Do more cleanup: No browser still supports NSAPI, so functions like Tk_MacOSXSetEmbedHandler() don't make any sense any more
-rw-r--r--generic/tk.decls20
-rw-r--r--generic/tkInt.decls7
-rw-r--r--generic/tkIntPlatDecls.h11
-rw-r--r--generic/tkPlatDecls.h50
-rw-r--r--generic/tkStubInit.c25
-rw-r--r--macosx/tkMacOSXCursor.c46
-rw-r--r--macosx/tkMacOSXEmbed.c41
-rw-r--r--macosx/tkMacOSXInt.h18
-rw-r--r--macosx/tkMacOSXMenu.c31
-rw-r--r--macosx/tkMacOSXMenus.c23
-rw-r--r--macosx/tkMacOSXScale.c28
-rw-r--r--macosx/tkMacOSXSubwindows.c9
-rw-r--r--macosx/tkMacOSXWm.c30
13 files changed, 46 insertions, 293 deletions
diff --git a/generic/tk.decls b/generic/tk.decls
index a77720f..502fda1 100644
--- a/generic/tk.decls
+++ b/generic/tk.decls
@@ -1139,26 +1139,6 @@ declare 9 aqua {
declare 10 aqua {
int Tk_MacOSXIsAppInFront(void)
}
-declare 11 aqua {
- void Tk_MacOSXSetEmbedHandler_(
- Tk_MacOSXEmbedRegisterWinProc *registerWinProcPtr,
- Tk_MacOSXEmbedGetGrafPortProc *getPortProcPtr,
- Tk_MacOSXEmbedMakeContainerExistProc *containerExistProcPtr,
- Tk_MacOSXEmbedGetClipProc *getClipProc,
- Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc)
-}
-declare 12 aqua {
- void Tk_MacOSXTurnOffMenus_(void)
-}
-declare 13 aqua {
- void Tk_MacOSXTkOwnsCursor_(int tkOwnsIt)
-}
-declare 14 aqua {
- void TkMacOSXInitMenus_(Tcl_Interp *interp)
-}
-declare 15 aqua {
- void TkMacOSXInitAppleEvents_(Tcl_Interp *interp)
-}
declare 16 aqua {
void TkGenWMConfigureEvent_(Tk_Window tkwin, int x, int y, int width,
int height, int flags)
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 95d3802..03dfd91 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -918,9 +918,10 @@ declare 9 aqua {
declare 10 aqua {
int TkMacOSXDispatchMenuEvent(int menuID, int index)
}
-declare 11 aqua {
- void TkMacOSXInstallCursor(int resizeOverride)
-}
+# Now a static function
+# declare 11 aqua {
+# void TkMacOSXInstallCursor(int resizeOverride)
+# }
declare 12 aqua {
void TkMacOSXHandleTearoffMenu(void)
}
diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h
index aecc222..0c577dc 100644
--- a/generic/tkIntPlatDecls.h
+++ b/generic/tkIntPlatDecls.h
@@ -170,8 +170,7 @@ EXTERN unsigned int TkMacOSXButtonKeyState(void);
EXTERN void TkMacOSXClearMenubarActive(void);
/* 10 */
EXTERN int TkMacOSXDispatchMenuEvent(int menuID, int index);
-/* 11 */
-EXTERN void TkMacOSXInstallCursor(int resizeOverride);
+/* Slot 11 is reserved */
/* 12 */
EXTERN void TkMacOSXHandleTearoffMenu(void);
/* Slot 13 is reserved */
@@ -405,7 +404,7 @@ typedef struct TkIntPlatStubs {
unsigned int (*tkMacOSXButtonKeyState) (void); /* 8 */
void (*tkMacOSXClearMenubarActive) (void); /* 9 */
int (*tkMacOSXDispatchMenuEvent) (int menuID, int index); /* 10 */
- void (*tkMacOSXInstallCursor) (int resizeOverride); /* 11 */
+ void (*reserved11)(void);
void (*tkMacOSXHandleTearoffMenu) (void); /* 12 */
void (*reserved13)(void);
int (*tkMacOSXDoHLEvent) (void *theEvent); /* 14 */
@@ -631,8 +630,7 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr;
(tkIntPlatStubsPtr->tkMacOSXClearMenubarActive) /* 9 */
#define TkMacOSXDispatchMenuEvent \
(tkIntPlatStubsPtr->tkMacOSXDispatchMenuEvent) /* 10 */
-#define TkMacOSXInstallCursor \
- (tkIntPlatStubsPtr->tkMacOSXInstallCursor) /* 11 */
+/* Slot 11 is reserved */
#define TkMacOSXHandleTearoffMenu \
(tkIntPlatStubsPtr->tkMacOSXHandleTearoffMenu) /* 12 */
/* Slot 13 is reserved */
@@ -798,6 +796,9 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr;
#undef TkSendCleanup_
#undef TkpTestsendCmd_
#undef TkGenerateActivateEvents_
+#undef TkMacOSXSetUpClippingRgn
+#undef Tk_MacOSXTkOwnsCursor
+#undef Tk_MacOSXTurnOffMenus
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tkPlatDecls.h b/generic/tkPlatDecls.h
index db9141c..fd48e87 100644
--- a/generic/tkPlatDecls.h
+++ b/generic/tkPlatDecls.h
@@ -82,21 +82,11 @@ EXTERN void * TkMacOSXGetRootControl(Drawable drawable);
EXTERN void Tk_MacOSXSetupTkNotifier(void);
/* 10 */
EXTERN int Tk_MacOSXIsAppInFront(void);
-/* 11 */
-EXTERN void Tk_MacOSXSetEmbedHandler_(
- Tk_MacOSXEmbedRegisterWinProc *registerWinProcPtr,
- Tk_MacOSXEmbedGetGrafPortProc *getPortProcPtr,
- Tk_MacOSXEmbedMakeContainerExistProc *containerExistProcPtr,
- Tk_MacOSXEmbedGetClipProc *getClipProc,
- Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc);
-/* 12 */
-EXTERN void Tk_MacOSXTurnOffMenus_(void);
-/* 13 */
-EXTERN void Tk_MacOSXTkOwnsCursor_(int tkOwnsIt);
-/* 14 */
-EXTERN void TkMacOSXInitMenus_(Tcl_Interp *interp);
-/* 15 */
-EXTERN void TkMacOSXInitAppleEvents_(Tcl_Interp *interp);
+/* Slot 11 is reserved */
+/* Slot 12 is reserved */
+/* Slot 13 is reserved */
+/* Slot 14 is reserved */
+/* Slot 15 is reserved */
/* 16 */
EXTERN void TkGenWMConfigureEvent_(Tk_Window tkwin, int x, int y,
int width, int height, int flags);
@@ -126,11 +116,11 @@ typedef struct TkPlatStubs {
void * (*tkMacOSXGetRootControl) (Drawable drawable); /* 8 */
void (*tk_MacOSXSetupTkNotifier) (void); /* 9 */
int (*tk_MacOSXIsAppInFront) (void); /* 10 */
- void (*tk_MacOSXSetEmbedHandler_) (Tk_MacOSXEmbedRegisterWinProc *registerWinProcPtr, Tk_MacOSXEmbedGetGrafPortProc *getPortProcPtr, Tk_MacOSXEmbedMakeContainerExistProc *containerExistProcPtr, Tk_MacOSXEmbedGetClipProc *getClipProc, Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc); /* 11 */
- void (*tk_MacOSXTurnOffMenus_) (void); /* 12 */
- void (*tk_MacOSXTkOwnsCursor_) (int tkOwnsIt); /* 13 */
- void (*tkMacOSXInitMenus_) (Tcl_Interp *interp); /* 14 */
- void (*tkMacOSXInitAppleEvents_) (Tcl_Interp *interp); /* 15 */
+ void (*reserved11)(void);
+ void (*reserved12)(void);
+ void (*reserved13)(void);
+ void (*reserved14)(void);
+ void (*reserved15)(void);
void (*tkGenWMConfigureEvent_) (Tk_Window tkwin, int x, int y, int width, int height, int flags); /* 16 */
#endif /* AQUA */
} TkPlatStubs;
@@ -184,16 +174,11 @@ extern const TkPlatStubs *tkPlatStubsPtr;
(tkPlatStubsPtr->tk_MacOSXSetupTkNotifier) /* 9 */
#define Tk_MacOSXIsAppInFront \
(tkPlatStubsPtr->tk_MacOSXIsAppInFront) /* 10 */
-#define Tk_MacOSXSetEmbedHandler_ \
- (tkPlatStubsPtr->tk_MacOSXSetEmbedHandler_) /* 11 */
-#define Tk_MacOSXTurnOffMenus_ \
- (tkPlatStubsPtr->tk_MacOSXTurnOffMenus_) /* 12 */
-#define Tk_MacOSXTkOwnsCursor_ \
- (tkPlatStubsPtr->tk_MacOSXTkOwnsCursor_) /* 13 */
-#define TkMacOSXInitMenus_ \
- (tkPlatStubsPtr->tkMacOSXInitMenus_) /* 14 */
-#define TkMacOSXInitAppleEvents_ \
- (tkPlatStubsPtr->tkMacOSXInitAppleEvents_) /* 15 */
+/* Slot 11 is reserved */
+/* Slot 12 is reserved */
+/* Slot 13 is reserved */
+/* Slot 14 is reserved */
+/* Slot 15 is reserved */
#define TkGenWMConfigureEvent_ \
(tkPlatStubsPtr->tkGenWMConfigureEvent_) /* 16 */
#endif /* AQUA */
@@ -202,12 +187,11 @@ extern const TkPlatStubs *tkPlatStubsPtr;
/* !END!: Do not edit above this line. */
-#undef Tk_MacOSXSetEmbedHandler_
#undef Tk_MacOSXTurnOffMenus_
-#undef Tk_MacOSXTkOwnsCursor_
#undef TkMacOSXInitMenus_
-#undef TkMacOSXInitAppleEvents_
#undef TkGenWMConfigureEvent_
+#undef Tk_MacOSXSetEmbedHandler
+#undef Tk_MacOSXTurnOffMenus
#ifdef __cplusplus
}
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index 8ebcb18..40ee8bb 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -44,6 +44,14 @@ MODULE_SCOPE const TkStubs tkStubs;
#undef TkPutImage
#undef XPutImage
#define TkMacOSXSetUpClippingRgn (void (*)(Drawable))(void *)doNothing
+#define Tk_MacOSXTkOwnsCursor (void (*)(int))(void *)doNothing
+#define Tk_MacOSXTurnOffMenus (void (*)(void))(void *)doNothing
+#define TkMacOSXInitMenus (void (*)(Tcl_Interp *))(void *)doNothing
+#define Tk_MacOSXSetEmbedHandler (void (*)(Tk_MacOSXEmbedRegisterWinProc *, \
+ Tk_MacOSXEmbedGetGrafPortProc *, \
+ Tk_MacOSXEmbedMakeContainerExistProc *, \
+ Tk_MacOSXEmbedGetClipProc *, \
+ Tk_MacOSXEmbedGetOffsetInParentProc *))(void *)doNothing
#if defined(_WIN32) && !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
# define Tk_TranslateWinEvent TkTranslateWinEvent
@@ -102,11 +110,6 @@ static Tk_Style Tk_GetStyleFromObj(Tcl_Obj *obj)
#define TkWmCleanup_ TkWmCleanup
#define TkSendCleanup_ TkSendCleanup
#define TkpTestsendCmd_ TkpTestsendCmd
-#define Tk_MacOSXSetEmbedHandler_ Tk_MacOSXSetEmbedHandler
-#define Tk_MacOSXTurnOffMenus_ Tk_MacOSXTurnOffMenus
-#define Tk_MacOSXTkOwnsCursor_ Tk_MacOSXTkOwnsCursor
-#define TkMacOSXInitMenus_ TkMacOSXInitMenus
-#define TkMacOSXInitAppleEvents_ TkMacOSXInitAppleEvents
#define TkGenWMConfigureEvent_ TkGenWMConfigureEvent
#define TkGenerateActivateEvents_ TkGenerateActivateEvents
#define Tk_CanvasTagsParseProc \
@@ -591,7 +594,7 @@ static const TkIntPlatStubs tkIntPlatStubs = {
TkMacOSXButtonKeyState, /* 8 */
TkMacOSXClearMenubarActive, /* 9 */
TkMacOSXDispatchMenuEvent, /* 10 */
- TkMacOSXInstallCursor, /* 11 */
+ 0, /* 11 */
TkMacOSXHandleTearoffMenu, /* 12 */
0, /* 13 */
TkMacOSXDoHLEvent, /* 14 */
@@ -1037,11 +1040,11 @@ static const TkPlatStubs tkPlatStubs = {
TkMacOSXGetRootControl, /* 8 */
Tk_MacOSXSetupTkNotifier, /* 9 */
Tk_MacOSXIsAppInFront, /* 10 */
- Tk_MacOSXSetEmbedHandler_, /* 11 */
- Tk_MacOSXTurnOffMenus_, /* 12 */
- Tk_MacOSXTkOwnsCursor_, /* 13 */
- TkMacOSXInitMenus_, /* 14 */
- TkMacOSXInitAppleEvents_, /* 15 */
+ 0, /* 11 */
+ 0, /* 12 */
+ 0, /* 13 */
+ 0, /* 14 */
+ 0, /* 15 */
TkGenWMConfigureEvent_, /* 16 */
#endif /* AQUA */
};
diff --git a/macosx/tkMacOSXCursor.c b/macosx/tkMacOSXCursor.c
index 812f54e..6c36ca7 100644
--- a/macosx/tkMacOSXCursor.c
+++ b/macosx/tkMacOSXCursor.c
@@ -187,15 +187,6 @@ static const struct CursorName cursorNames[] = {
static TkMacOSXCursor *gCurrentCursor = NULL;
/* A pointer to the current cursor. */
-static int gResizeOverride = false;
- /* A boolean indicating whether we should use
- * the resize cursor during installations. */
-static int gTkOwnsCursor = true;/* A boolean indicating whether Tk owns the
- * cursor. If not (for instance, in the case
- * where a Tk window is embedded in another
- * app's window, and the cursor is out of the
- * Tk window, we will not attempt to adjust
- * the cursor. */
/*
* Declarations of procedures local to this file
@@ -498,17 +489,15 @@ TkpFreeCursor(
*----------------------------------------------------------------------
*/
-void
+static void
TkMacOSXInstallCursor(
- int resizeOverride)
+ void)
{
TkMacOSXCursor *macCursorPtr = gCurrentCursor;
static int cursorHidden = 0;
int cursorNone = 0;
- gResizeOverride = resizeOverride;
-
- if (resizeOverride || !macCursorPtr) {
+ if (!macCursorPtr) {
[[NSCursor arrowCursor] set];
} else {
switch (macCursorPtr->type) {
@@ -556,10 +545,6 @@ TkpSetCursor(
{
int cursorChanged = 1;
- if (!gTkOwnsCursor) {
- return;
- }
-
if (cursor == None) {
/*
* This is a little tricky. We can't really tell whether
@@ -578,34 +563,11 @@ TkpSetCursor(
}
if (Tk_MacOSXIsAppInFront() && cursorChanged) {
- TkMacOSXInstallCursor(gResizeOverride);
+ TkMacOSXInstallCursor();
}
}
/*
- *----------------------------------------------------------------------
- *
- * Tk_MacOSXTkOwnsCursor --
- *
- * Sets whether Tk has the right to adjust the cursor.
- *
- * Results:
- * None.
- *
- * Side effects:
- * May keep Tk from changing the cursor.
- *
- *----------------------------------------------------------------------
- */
-
-void
-Tk_MacOSXTkOwnsCursor(
- int tkOwnsIt)
-{
- gTkOwnsCursor = tkOwnsIt;
-}
-
-/*
* Local Variables:
* mode: objc
* c-basic-offset: 4
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index bacdc44..8c13157 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -43,11 +43,6 @@ typedef struct Container {
static Container *firstContainerPtr = NULL;
/* First in list of all containers managed by
* this process. */
-/*
- * Globals defined in this file:
- */
-
-TkMacOSXEmbedHandler *tkMacOSXEmbedHandler = NULL;
/*
* Prototypes for static procedures defined in this file:
@@ -66,42 +61,6 @@ static void EmbedWindowDeleted(TkWindow *winPtr);
/*
*----------------------------------------------------------------------
*
- * Tk_MacOSXSetEmbedHandler --
- *
- * Registers a handler for an in process form of embedding, like Netscape
- * plugins, where Tk is loaded into the process, but does not control the
- * main window
- *
- * Results:
- * None
- *
- * Side effects:
- * The embed handler is set.
- *
- *----------------------------------------------------------------------
- */
-
-void
-Tk_MacOSXSetEmbedHandler(
- Tk_MacOSXEmbedRegisterWinProc *registerWinProc,
- Tk_MacOSXEmbedGetGrafPortProc *getPortProc,
- Tk_MacOSXEmbedMakeContainerExistProc *containerExistProc,
- Tk_MacOSXEmbedGetClipProc *getClipProc,
- Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc)
-{
- if (tkMacOSXEmbedHandler == NULL) {
- tkMacOSXEmbedHandler = (TkMacOSXEmbedHandler *)ckalloc(sizeof(TkMacOSXEmbedHandler));
- }
- tkMacOSXEmbedHandler->registerWinProc = registerWinProc;
- tkMacOSXEmbedHandler->getPortProc = getPortProc;
- tkMacOSXEmbedHandler->containerExistProc = containerExistProc;
- tkMacOSXEmbedHandler->getClipProc = getClipProc;
- tkMacOSXEmbedHandler->getOffsetProc = getOffsetProc;
-}
-
-/*
- *----------------------------------------------------------------------
- *
* TkpMakeWindow --
*
* Creates an X Window (Mac subwindow).
diff --git a/macosx/tkMacOSXInt.h b/macosx/tkMacOSXInt.h
index a5e4c9b..56ce98e 100644
--- a/macosx/tkMacOSXInt.h
+++ b/macosx/tkMacOSXInt.h
@@ -99,24 +99,6 @@ typedef struct TkWindowPrivate MacDrawable;
*/
/*
- * This structure is for handling Netscape-type in process
- * embedding where Tk does not control the top-level. It contains
- * various functions that are needed by Mac specific routines, like
- * TkMacOSXGetDrawablePort. The definitions of the function types
- * are in tkMacOSX.h.
- */
-
-typedef struct {
- Tk_MacOSXEmbedRegisterWinProc *registerWinProc;
- Tk_MacOSXEmbedGetGrafPortProc *getPortProc;
- Tk_MacOSXEmbedMakeContainerExistProc *containerExistProc;
- Tk_MacOSXEmbedGetClipProc *getClipProc;
- Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc;
-} TkMacOSXEmbedHandler;
-
-MODULE_SCOPE TkMacOSXEmbedHandler *tkMacOSXEmbedHandler;
-
-/*
* GC CGColorRef cache for tkMacOSXColor.c
*/
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index 8c8ec99..598793d 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -91,9 +91,6 @@ static const struct {
#undef ACCEL
#undef sl
-static int gNoTkMenus = 0; /* This is used by Tk_MacOSXTurnOffMenus as
- * the flag that Tk is not to draw any
- * menus. */
static int inPostMenu = 0;
static SInt32 menuMarkColumnWidth = 0, menuIconTrailingEdgeMargin = 0;
static SInt32 menuTextLeadingEdgeMargin = 0, menuTextTrailingEdgeMargin = 0;
@@ -493,10 +490,6 @@ TKBackgroundLoop *backgroundLoop = nil;
- (void) tkSetMainMenu: (TKMenu *) menu
{
- if (gNoTkMenus) {
- return;
- }
-
TKMenu *applicationMenu = nil;
if (menu) {
@@ -1665,30 +1658,6 @@ TkMacOSXClearMenubarActive(void)
/*
*----------------------------------------------------------------------
*
- * Tk_MacOSXTurnOffMenus --
- *
- * Turns off all the menu drawing code. This is more than just disabling
- * the "menu" command, this means that Tk will NEVER touch the menubar.
- * It is needed in the Plugin, where Tk does not own the menubar.
- *
- * Results:
- * None.
- *
- * Side effects:
- * A flag is set which will disable all menu drawing.
- *
- *----------------------------------------------------------------------
- */
-
-void
-Tk_MacOSXTurnOffMenus(void)
-{
- gNoTkMenus = 1;
-}
-
-/*
- *----------------------------------------------------------------------
- *
* TkpMenuInit --
*
* Initializes Mac-specific menu data.
diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c
index 71b99db..b49b80d 100644
--- a/macosx/tkMacOSXMenus.c
+++ b/macosx/tkMacOSXMenus.c
@@ -373,29 +373,6 @@ TkMacOSXHandleMenuSelect(
/*
*----------------------------------------------------------------------
*
- * TkMacOSXInitMenus --
- *
- * This procedure initializes the Macintosh menu bar.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-void
-TkMacOSXInitMenus(
- TCL_UNUSED(Tcl_Interp *))
-{
- [NSApp _setupMenus];
-}
-
-/*
- *----------------------------------------------------------------------
- *
* GenerateEditEvent --
*
* Takes an edit menu item and posts the corasponding a virtual event to
diff --git a/macosx/tkMacOSXScale.c b/macosx/tkMacOSXScale.c
index 80b1bda..28b192d 100644
--- a/macosx/tkMacOSXScale.c
+++ b/macosx/tkMacOSXScale.c
@@ -149,8 +149,6 @@ TkpDisplayScale(
MacScale *macScalePtr = clientData;
Rect r;
WindowRef windowRef;
- CGrafPtr destPort, savePort;
- Boolean portChanged;
MacDrawable *macDraw;
SInt32 initialValue, minValue, maxValue;
UInt16 numTicks;
@@ -216,9 +214,7 @@ TkpDisplayScale(
*/
macDraw = (MacDrawable *) Tk_WindowId(tkwin);
- destPort = TkMacOSXGetDrawablePort(Tk_WindowId(tkwin));
windowRef = TkMacOSXDrawableWindow(Tk_WindowId(tkwin));
- portChanged = QDSwapPort(destPort, &savePort);
/*
* Create Macintosh control.
@@ -292,9 +288,6 @@ TkpDisplayScale(
HiliteControl(macScalePtr->scaleHandle, 0);
Draw1Control(macScalePtr->scaleHandle);
- if (portChanged) {
- QDSwapPort(savePort, NULL);
- }
done:
scalePtr->flags &= ~REDRAW_ALL;
}
@@ -326,14 +319,10 @@ TkpScaleElement(
ControlPartCode part;
Point where;
Rect bounds;
- CGrafPtr destPort, savePort;
- Boolean portChanged;
#ifdef TK_MAC_DEBUG_SCALE
TkMacOSXDbgMsg("TkpScaleElement");
#endif
- destPort = TkMacOSXGetDrawablePort(Tk_WindowId(scalePtr->tkwin));
- portChanged = QDSwapPort(destPort, &savePort);
/*
* All of the calculations in this procedure mirror those in
@@ -345,10 +334,6 @@ TkpScaleElement(
where.v = y + bounds.top;
part = TestControl(macScalePtr->scaleHandle, where);
- if (portChanged) {
- QDSwapPort(savePort, NULL);
- }
-
#ifdef TK_MAC_DEBUG_SCALE
fprintf (stderr,"ScalePart %d, pos ( %d %d )\n", part, where.h, where.v );
#endif
@@ -400,8 +385,6 @@ MacScaleEventProc(
Point where;
Rect bounds;
int part;
- CGrafPtr destPort, savePort;
- Boolean portChanged;
#ifdef TK_MAC_DEBUG_SCALE
fprintf(stderr,"MacScaleEventProc\n" );
@@ -413,13 +396,6 @@ MacScaleEventProc(
* control was hit and act accordingly.
*/
- destPort = TkMacOSXGetDrawablePort(Tk_WindowId(macScalePtr->info.tkwin));
- portChanged = QDSwapPort(destPort, &savePort);
-
- TkMacOSXWinBounds((TkWindow *) macScalePtr->info.tkwin, &bounds);
- where.h = eventPtr->xbutton.x + bounds.left;
- where.v = eventPtr->xbutton.y + bounds.top;
-#ifdef TK_MAC_DEBUG_SCALE
TkMacOSXDbgMsg("calling TestControl");
#endif
part = TestControl(macScalePtr->scaleHandle, where);
@@ -445,10 +421,6 @@ MacScaleEventProc(
*/
TkGenerateButtonEventForXPointer(Tk_WindowId(macScalePtr->info.tkwin));
-
- if (portChanged) {
- QDSwapPort(savePort, NULL);
- }
}
/*
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index 41dea01..5564113 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -866,15 +866,6 @@ TkMacOSXUpdateClipRgn(
TkMacOSXUpdateClipRgn(win2Ptr);
ChkErr(HIShapeIntersect,
win2Ptr->privatePtr->aboveVisRgn, rgn, rgn);
- } else if (tkMacOSXEmbedHandler != NULL) {
- Region r = XCreateRegion();
- HIShapeRef visRgn;
-
- tkMacOSXEmbedHandler->getClipProc((Tk_Window) winPtr, r);
- visRgn = TkMacOSXGetNativeRegion(r);
- ChkErr(HIShapeIntersect, visRgn, rgn, rgn);
- CFRelease(visRgn);
- TkDestroyRegion(r);
}
/*
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 9b5105f..69691bf 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -4530,27 +4530,6 @@ Tk_GetRootCoords(
otherPtr = TkpGetOtherWindow(winPtr);
if (otherPtr == NULL) {
- if (tkMacOSXEmbedHandler->getOffsetProc != NULL) {
- Point theOffset;
-
- /*
- * We do not require that the changes.x & changes.y for a
- * non-Tk master window be kept up to date. So we first
- * subtract off the possibly bogus values that have been
- * added on at the top of this pass through the loop, and
- * then call out to the getOffsetProc to give us the
- * correct offset.
- */
-
- x -= winPtr->changes.x + winPtr->changes.border_width;
- y -= winPtr->changes.y + winPtr->changes.border_width;
-
- tkMacOSXEmbedHandler->getOffsetProc((Tk_Window) winPtr,
- &theOffset);
-
- x += theOffset.h;
- y += theOffset.v;
- }
break;
}
@@ -6067,14 +6046,7 @@ TkMacOSXMakeRealWindowExist(
return;
}
- if (tkMacOSXEmbedHandler == NULL) {
- Tcl_Panic("TkMacOSXMakeRealWindowExist could not find container");
- }
- if (tkMacOSXEmbedHandler->containerExistProc &&
- tkMacOSXEmbedHandler->containerExistProc((Tk_Window) winPtr)
- != TCL_OK) {
- Tcl_Panic("ContainerExistProc could not make container");
- }
+ Tcl_Panic("TkMacOSXMakeRealWindowExist could not find container");
return;
/*