summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixXId.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tkUnixXId.c')
-rw-r--r--unix/tkUnixXId.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/unix/tkUnixXId.c b/unix/tkUnixXId.c
index c6873a1..668f228 100644
--- a/unix/tkUnixXId.c
+++ b/unix/tkUnixXId.c
@@ -14,6 +14,39 @@
/*
*----------------------------------------------------------------------
*
+ * Tk_FreeXId --
+ *
+ * This function is called to indicate that an X resource identifier is
+ * now free.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The identifier is added to the stack of free identifiers for its
+ * display, so that it can be re-used.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+Tk_FreeXId(
+ Display *display, /* Display for which xid was allocated. */
+ XID xid) /* Identifier that is no longer in use. */
+{
+ /*
+ * This does nothing, because the XC-MISC extension takes care of
+ * freeing XIDs for us. It has been a standard X11 extension for
+ * about 15 years as of 2008. Keith Packard and another X.org
+ * developer suggested that we remove the previous code that used:
+ * #define XLIB_ILLEGAL_ACCESS.
+ */
+}
+
+
+/*
+ *----------------------------------------------------------------------
+ *
* Tk_GetPixmap --
*
* Same as the XCreatePixmap function except that it manages resource
@@ -63,6 +96,7 @@ Tk_FreePixmap(
Pixmap pixmap) /* Identifier for pixmap. */
{
XFreePixmap(display, pixmap);
+ Tk_FreeXId(display, (XID) pixmap);
}