summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-09-04 09:55:17 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-09-04 09:55:17 (GMT)
commitbf73e552c985aa37d9ee9e76f462c4015a3cfd6f (patch)
tree634b8724987ceb08258649142e1f452d7548e97e
parent9f87c721622a74c927926066ac9fe58e4f2fc93f (diff)
downloadtk-bf73e552c985aa37d9ee9e76f462c4015a3cfd6f.zip
tk-bf73e552c985aa37d9ee9e76f462c4015a3cfd6f.tar.gz
tk-bf73e552c985aa37d9ee9e76f462c4015a3cfd6f.tar.bz2
Finish purging remains of old XID hacks (a bunch of unused/write-only fields in
the TkDisplay structure...)
-rw-r--r--ChangeLog6
-rw-r--r--generic/tkInt.h36
-rw-r--r--generic/tkWindow.c7
3 files changed, 9 insertions, 40 deletions
diff --git a/ChangeLog b/ChangeLog
index 622ce56..8fa5b6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-09-04 Donal K. Fellows <dkf@users.sf.net>
+
+ * generic/tkInt.h (TkDisplay): Remove fields that are never read from.
+ * generic/tkWindow.c (Tk_DestroyWindow): Remove code to write to
+ write-only fields of TkDisplay. This follows on from [Bug 2039720].
+
2009-08-25 Donal K. Fellows <dkf@users.sf.net>
* unix/tkUnixSend.c (ServerSecure): [Bug 1909931]: Added some support
diff --git a/generic/tkInt.h b/generic/tkInt.h
index 2cd1494..c4086af 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: $Id: tkInt.h,v 1.109 2009/08/25 23:49:46 das Exp $
+ * RCS: $Id: tkInt.h,v 1.110 2009/09/04 09:55:17 dkf Exp $
*/
#ifndef _TKINT
@@ -399,10 +399,6 @@ typedef struct TkDisplay {
int postCommandGeneration;
/*
- * Information used by tkOption.c only.
- */
-
- /*
* Information used by tkPack.c only.
*/
@@ -471,24 +467,6 @@ typedef struct TkDisplay {
* application name on each comm window. */
/*
- * Information used by tkXId.c only:
- */
-
- struct TkIdStack *idStackPtr;
- /* First in list of chunks of free resource
- * identifiers, or NULL if there are no free
- * resources. */
- XID (*defaultAllocProc) (Display *display);
- /* Default resource allocator for display. */
- struct TkIdStack *windowStackPtr;
- /* First in list of chunks of window ids that
- * can't be reused right now. */
- Tcl_TimerToken idCleanupScheduled;
- /* If set, it means a call to WindowIdCleanup
- * has already been scheduled, 0 means it
- * hasn't. */
-
- /*
* Information used by tkUnixWm.c and tkWinWm.c only:
*/
@@ -497,18 +475,6 @@ typedef struct TkDisplay {
/* Points to the foreground window. */
/*
- * Information maintained by tkWindow.c for use later on by tkXId.c:
- */
-
- int destroyCount; /* Number of Tk_DestroyWindow operations in
- * progress. */
- unsigned long lastDestroyRequest;
- /* Id of most recent XDestroyWindow request;
- * can re-use ids in windowStackPtr when
- * server has seen this request and event
- * queue is empty. */
-
- /*
* Information used by tkVisual.c only:
*/
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 70c8472..962f356 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWindow.c,v 1.104 2009/08/19 23:02:00 pspjuth Exp $
+ * RCS: @(#) $Id: tkWindow.c,v 1.105 2009/09/04 09:55:17 dkf Exp $
*/
#include "tkInt.h"
@@ -1347,7 +1347,6 @@ Tk_DestroyWindow(
if (!(halfdeadPtr->flags & HD_DESTROY_COUNT)) {
halfdeadPtr->flags |= HD_DESTROY_COUNT;
- dispPtr->destroyCount++;
}
while (winPtr->childList != NULL) {
@@ -1462,7 +1461,6 @@ Tk_DestroyWindow(
* to do an explicit destroy of this X window.
*/
- dispPtr->lastDestroyRequest = NextRequest(winPtr->display);
XDestroyWindow(winPtr->display, winPtr->window);
}
#endif
@@ -1470,7 +1468,6 @@ Tk_DestroyWindow(
(char *) winPtr->window));
winPtr->window = None;
}
- dispPtr->destroyCount--;
UnlinkWindow(winPtr);
TkEventDeadWindow(winPtr);
TkBindDeadWindow(winPtr);
@@ -1536,7 +1533,7 @@ Tk_DestroyWindow(
Tcl_CreateCommand(winPtr->mainPtr->interp, "send",
TkDeadAppCmd, NULL, NULL);
Tcl_UnlinkVar(winPtr->mainPtr->interp, "tk_strictMotif");
- Tcl_UnlinkVar(winPtr->mainPtr->interp,
+ Tcl_UnlinkVar(winPtr->mainPtr->interp,
"::tk::AlwaysShowSelection");
}