| Ticket UUID: | 2039720 | |||
| Title: | Tk doesn't need to manage XIDs | |||
| Type: | Bug | Version: | obsolete: 8.6a1 | |
| Submitter: | georgeps | Created on: | 2008-08-06 04:46:13 | |
| Subsystem: | 67. Unix Window Operations | Assigned To: | georgeps | |
| Priority: | 9 Immediate | Severity: | ||
| Status: | Closed | Last Modified: | 2008-08-20 01:07:11 | |
| Resolution: | Fixed | Closed By: | georgeps | |
| Closed on: | 2008-08-19 18:07:11 | |||
| Description: |
After some discussion with Joe English, and subsequent discussions with the X.org developers, it has become apparent that Tk doesn't need to manage XIDs by replacing the core XID allocator. This is all managed by the XC-MISC extension now that is very common. I have also confirmed this by studying libX11 sources, which use XC-MISC. I have attached a patch to this bug report. The patch makes Tk_FreeXId a no-op. This patch also eliminates some unnecessary internal functions and function calls. keithp is Keith Packard of X.org in this discussion: <imaginator> Hi. I'm trying to get a definitive answer on whether or not XAllocID() can run out of ids these days. Does it make any attempt to reuse XIDs over a period of time? <keithp> imaginator: xlib manages reuse automatically <ajax> imaginator: if you have the XC-MISC extension on your server (and you do) then they get reused internally, yes. <ajax> you can still run out, but that requires actually consuming all of the XID space <imaginator> ok, so an application that runs a long time will no longer need to reuse XIDs or replace the core dpy->resource_alloc? <keithp> imaginator: right <imaginator> ok, good to know. So it seems we can put this code to rest in Tk: http://tktoolkit.cvs.sourceforge.net/tktoolkit/tk/unix/tkUnixXId.c?revision=1.11&view=markup <ajax> oh my. <imaginator> ajax? <ajax> yes, please do <keithp> imaginator: uh, yeah, since like 1993 <ajax> i just didn't know tk did that <imaginator> How does the XC-MISC extension do this, and how common is the XC-MISC extension? <ajax> it asks the server for a list of unused IDs <keithp> imaginator: it's been around in every X server for 15 years <imaginator> thank you :) <imaginator> Now I think I have suitable justification to nuke this code. | |||
| User Comments: |
georgeps added on 2008-08-20 01:07:11:
Logged In: YES user_id=585068 Originator: YES The changes were applied to the Tk HEAD. jenglish added on 2008-08-19 22:02:42: Logged In: YES user_id=68433 Originator: NO Patch looks good -- please commit. georgeps added on 2008-08-06 11:46:14: File Added - 287312: tk_XID_cleanup-1.patch | |||
Attachments:
- tk_XID_cleanup-1.patch [download] added by georgeps on 2008-08-06 11:46:14. [details]
