summaryrefslogtreecommitdiffstats
path: root/mac/tkMacCursor.c
diff options
context:
space:
mode:
authorwelch <welch>1998-06-27 18:06:37 (GMT)
committerwelch <welch>1998-06-27 18:06:37 (GMT)
commitadcb060b5ab8d310f5aff8a1119d3b97baf86641 (patch)
tree759f8786c82028afeb67bd971309b7b328d81d7f /mac/tkMacCursor.c
parentd010dca55fd7a02e3fe6e50910359d8d4915f003 (diff)
downloadtk-adcb060b5ab8d310f5aff8a1119d3b97baf86641.zip
tk-adcb060b5ab8d310f5aff8a1119d3b97baf86641.tar.gz
tk-adcb060b5ab8d310f5aff8a1119d3b97baf86641.tar.bz2
plugin updates
Diffstat (limited to 'mac/tkMacCursor.c')
-rw-r--r--mac/tkMacCursor.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/mac/tkMacCursor.c b/mac/tkMacCursor.c
index f221189..805dac3 100644
--- a/mac/tkMacCursor.c
+++ b/mac/tkMacCursor.c
@@ -64,9 +64,16 @@ static struct CursorName {
static TkMacCursor * gCurrentCursor = NULL; /* A pointer to the current
* cursor. */
-static int gResizeOverride = false; /* A boolean indicating wether
+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
@@ -348,6 +355,9 @@ void
TkpSetCursor(
TkpCursor cursor)
{
+ if (!gTkOwnsCursor) {
+ return;
+ }
if (cursor == None) {
gCurrentCursor = NULL;
} else {
@@ -358,3 +368,25 @@ TkpSetCursor(
TkMacInstallCursor(gResizeOverride);
}
}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tk_MacTkOwnsCursor --
+ *
+ * Sets whether Tk has the right to adjust the cursor.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * May keep Tk from changing the cursor.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void Tk_MacTkOwnsCursor(
+ int tkOwnsIt)
+{
+ gTkOwnsCursor = tkOwnsIt;
+}