summaryrefslogtreecommitdiffstats
BranchCommit messageAuthorAge
8_5_with_8_6_regexpMinor clean-ups (e.g. turn back const -> CONST, as common in 8.5 branch)jan.nijtmans9 years
Coverity_CID_1251203Fix the documentation comment.dkf9 years
ISC_peepholemerge trunkmig12 years
activestate_nre_excised_variant_1_roll_forwardwhile 'info' is destroyed and becoms inaccessible after TclEvalObjEx.andreask14 years
activestate_nre_excised_variant_2_subtractedThe re-creation of this branch should have deleted a few NRE specific testsui...andreask14 years
adjust_fixPatch to the original line continuation commit to fix up TclCompileTokens.dgp11 years
ajuba_ajuba2_2_0_syntheticCreated branch ajuba-ajuba2-2-0-syntheticcvs2fossil25 years
ajuba_ajuba2_2_1_base_syntheticCreated branch ajuba-ajuba2-2-1-base-syntheticcvs2fossil24 years
aku_mem_debug_allow_regularMinor compilation issue fix, make sure variable declaration (via macro) is fi...Joe Mistachkin10 years
aku_reviewDocs for Tcl_CreateChannelHandler() state that the registered handler procdgp10 years
aku_tip_280_cl_perf_trialMerge to feature branchdkf14 years
aku_tkt_6141c15186Update to trunk workaku9 years
amg_array_enum_c_apiCheck in stash. This code probably does not compile as-is. Changes intended...andy8 years
amg_string_insertSimplify implementation of non-bytecoded [string replace]andy7 years
androwishmerge zipfsjan.nijtmans7 years
apn_hash_optSome cleanup of style issues.dkf10 years
array_search_unsetReference ticket number in tests var-13.2 and var-13.3andy8 years
aspect_async_pipedon't panic when EAGAIN - if the pipe is full, we have to drop the messageaspect8 years
aspect_bug_391bc0fd2cglob for hidden files on unix should not require stat()aspect8 years
aspect_lreplace_cleanup[47ac84309b] Import of aspect's branch from his personal repository on chisel...dkf9 years
aspect_lreplace_fixundo erroneous change in [1fa2e32e07]aspect10 years
aspect_lreplace_refixlreplace: more tests, doc improvementaspect9 years
aspect_shimmer_singleton_listsadd some tests for singleton list optimisation [738900]aspect8 years
aspect_string_matchfix advancement of snext: could not cook up a test for this, but the error i...aspect8 years
aspect_tip288Taking a stab at TIP#288 implementation.aspect8 years
avl_strcat_fixStop trimming on first non empty-string.avl7 years
avl_tip_282restrictions on array index confined to lhs.avl8 years
backout_memaccounting(just an experiment, don't look ....) Backout the contributed patch memaccoun...jan.nijtmans9 years
bch_coveritymerge [e11d223695c5468b1bfb3db35ebf54856501fdf0], specifically for ./generic/...bch10 years
better_deprecationmerge trunkjan.nijtmans12 years
better_deprecation_85merge core-8-5-branch.jan.nijtmans12 years
bg_tip_282merge trunkdgp8 years
bsg_0d_radix_prefixMerge core-8-6-branchjan.nijtmans7 years
bug3036566Corrected args -> arg arg ... in msgcat docoehhar12 years
bug_010f4162efAdd test and improve errorInfo.dgp11 years
bug_0520d17284fix chan leak with http keepalive vs close (bug [0520d17284])aspect8 years
bug_05489ce335Backout failed attempt to fix [32ae34e63a].dgp9 years
bug_0b874c344dmerge trunkdgp11 years
bug_0b874c344d_ak_info_frame_coroModified info frame's coro handling to allow for a caller coro without cmdFra...andreask11 years
bug_0b8c387cf7Merge trunk. jan.nijtmans9 years
bug_0c043a175test and fix (thx dgp)Miguel Sofer10 years
bug_0e4d88b650merge 8.5dgp7 years
bug_0f42ff7871Added contributed tests from aspectdgp10 years
bug_11892931189293 Make '<<' redirects binary safe. Don't use strlen() (or equivalent)dgp12 years
bug_1224888Added better way to find executable name on OSX.dkf10 years
bug_12b0997ce7[12b0997ce7] Plug memleak in iocmd.tf-32.0 .dgp10 years
bug_13d3af3ad5 * Give clearer names to some of the state flags and sync them with Windows...max11 years
bug_13d3af3ad5_forkRemove writable shortcut and errorneous workaround to get [connect -async] fa...oehhar11 years
bug_1493a43044Expose the AVOID_RESOLVERS flag to [namespace upvar] implementations, which s...dkf8 years
bug_1536227Cygwin network pathname supportjan.nijtmans12 years
bug_16828b3744Merge tip of core-8-6-branchdgp8 years
bug_1712098rebasejan.nijtmans11 years
bug_1758a0b603merge 8.5dgp10 years
bug_1a25fdfec6Simple change gets most of the effect. Fails to handle backslash. anyone care?dgp9 years
bug_1b0266d8bbSome more cleaning updkf10 years
bug_2152292ChangeLog entrydkf11 years
bug_219866c1e9proposed fix for [219866c1e9]: platform::identify: regexp doesn't match platformjan.nijtmans9 years
bug_2413550Changed position of flag evaluation as proposed by Phil Hoffmanoehhar11 years
bug_2502002New internal eval flag value so that all TclNREvalObjv() callers thatdgp11 years
bug_25842c161fMight as well number tests more conventionally.dkf8 years
bug_272e866f1eremove some dead codedkf11 years
bug_2902268Backport 2902268 fix.dgp13 years
bug_2911139Now really fix test-case http-4.14jan.nijtmans12 years
bug_2992970[2992970] Restore the safety of Tcl_AppendObjToObj(x, x) for bytearrays.dgp11 years
bug_2a94652ee1http state 100 continue handling broken [2a94652ee1]oehhar7 years
bug_2f7cbd01c3Proposed fix for [2f7cbd01c3].jan.nijtmans11 years
bug_2f9df4c4faprevious commit was not quite right, this one should be betterjan.nijtmans10 years
bug_3024359Simplify bug fix so that active claims on the FilesystemRecord list of a threaddgp12 years
bug_3033307very minor style tweaksdkf12 years
bug_3092089new attempt for better fixjan.nijtmans12 years
bug_3154ea2759Bug fix. Have to arrange to only close a catch once. After the spacedgp9 years
bug_31661d2135[31661d2135] Plug memory leak.dgp11 years
bug_3173086Completed patch with mucho comments. Merge 8.5.dgp14 years
bug_3185407Merge from 8.5 branch tipdkf14 years
bug_3202171 * generic/tclNamesp.c: Tighten the detector of nested [namespace code] dgp14 years
bug_3216070bug-3216070jan.nijtmans14 years
bug_3288345[bug-3288345] Wrong Tcl_StatBuf used on Cygwinjan.nijtmans13 years
bug_3293874Rewind from a refactoring that veered into the weeds.dgp14 years
bug_32ae34e63aUpdate tests to account for changed ReflectWatch behavior.dgp9 years
bug_3362446remove some unused codejan.nijtmans12 years
bug_336441ed59Try not to loose FD_CONNECT by switching monitoring off.oehhar11 years
bug_3365156Remove stray refcount bump that caused a memory leak.dkf13 years
bug_3389764Proposed fix for 3389764. Have "path" dup routine duplicate the pattern dgp13 years
bug_33920703392070 More complete prevention of Tcl_Obj reference cycles dgp13 years
bug_3397515Prevent segfaults attempting to use thread maps after they've been deleted.dgp13 years
bug_3401704Use better 'isalnum' predicate ; add test case.ferrieux13 years
bug_3413857Test harness for Tcl_ParseArgsObjvdkf13 years
bug_3414754Purge the old, buggy implementation.dgp13 years
bug_3418547merge trunkdgp8 years
bug_3466099Added source test with utf-8 (without -encoding param), remove too many same ...sebres13 years
bug_3475569yank back debugging codedgp13 years
bug_34805993480599 Make [source] and [load] order of multi-file package happen in sorteddgp13 years
bug_34844023484402 Correct Off-By-One error appending unicode. Thanks to Poor Yorick.dgp13 years
bug_3485833Style guide and tidying up.dgp13 years
bug_3493120*nix segfault cleared: we should reset a thread key after freeing of alloc ca...sebres11 years
bug_3496014[Bug 3496014]: Unecessary memset() in Tcl_SetByteArrayObj()jan.nijtmans12 years
bug_3508771first working version of Cygwin notifierjan.nijtmans12 years
bug_3511806now ready for further field testsjan.nijtmans13 years
bug_3514475[Bug 3514475]: remove TclpGetTimeZone and TclpGetTZNamejan.nijtmans13 years
bug_3519357Do filesystem tests needing /tmp access in a subdir less likely to conflict.dgp13 years
bug_3522560Explicitly declare a channel nonblocking before throwing EAGAIN on write.ferrieux13 years
bug_3525762explicitely specify encoding in DdeCreateStringHandlejan.nijtmans13 years
bug_3525907Use zero-delays instead of finite ones when posting fileevents, because (1) t...ferrieux13 years
bug_3530536two more testcases, showing that only the "deflate" and "inflate" streams don...jan.nijtmans13 years
bug_3532959Revised so that we avoid hashing twice.dgp12 years
bug_3536888translate script parameters for msgcatjan.nijtmans12 years
bug_3544685Fix for 3544685: Threaded build failures on OpenBSD-currentjan.nijtmans12 years
bug_3545363merge trunkdkf12 years
bug_3555001Safer stale config fix for review.dgp12 years
bug_3562640merge core-8-4-branchjan.nijtmans12 years
bug_3562640_altAlternative fix for bug-3562640jan.nijtmans12 years
bug_35647353564735 Protection against namespace var resolvers that unexpectedly returndgp12 years
bug_3566106contributed patch for Solaris 9/x86 supportdgp12 years
bug_3567063merge 8.4dgp12 years
bug_3588687merge trunkdgp12 years
bug_3592747Fix [tailcall] and [yieldto] to not panic in dying namespaces: [Bug 3592747]mig12 years
bug_3598300Proposed solution for Bug 3598300 on MacOSXjan.nijtmans12 years
bug_3598580For Tcl9, do a real Tcl_DecrRefCountjan.nijtmans12 years
bug_3599789Bug 3599789: Proposed fix by Serg G. Bresterjan.nijtmans12 years
bug_3600057merge markdkf11 years
bug_3600057_85*BACKPORT* [3600057]: Filled out missing parts of implementation of [string i...dkf11 years
bug_3600058_tdMerge to fix accidental fork in branch bug-3600058-tdtwylite11 years
bug_3600328merge trunkdkf12 years
bug_3601260merge core-8-5-branchjan.nijtmans12 years
bug_3602706Cherrypick again. Add test.dgp12 years
bug_3603434Fix for Bug 3603434.dgp12 years
bug_3603553Correction to comment in re key buffer size.dkf12 years
bug_3603695Apply a fix for the bug. Passes the test suite now.dkf12 years
bug_3604074New branch bug-3604074 with improved patch to correct fixempties() failuredgp12 years
bug_3604576Finer granulated catchoehhar12 years
bug_3605401[Bug 3605401]: Compiler error with latest mingw-w64 headers.jan.nijtmans12 years
bug_3605447added testdgp12 years
bug_3606121Fixes to namespace-old.testdkf8 years
bug_3606683merge trunkdgp12 years
bug_3606683_84merge 8.4dgp12 years
bug_3606683_85merge 8.5dgp12 years
bug_3607246Correct unbalanced effect of TclInvalidateCmdLiteral() on the refcountsdgp12 years
bug_36073723607372 Correct literal refcounting.dgp12 years
bug_3608360Check for wildcards if we've used FindFirstFile inside NativeAccess.dkf12 years
bug_3608714merge trunkdgp10 years
bug_3609693[3609693] Must strip the internal representation of procedure-like methods indkf11 years
bug_3610026Demand the error message indicating the purpose of the test.dgp12 years
bug_3610383First simple-minded attempt at fix. Fixes the demo script.dgp12 years
bug_3610404merge trunkdgp11 years
bug_3611974minor bug: Don't TclpInitUnlock() here, because the following TclFinalizeLock...jan.nijtmans11 years
bug_3613609Fixed the weird edge case.dkf12 years
bug_3613671unwrapping some of the complexitydkf11 years
bug_3614342Repair TCL_COMPILE_DEBUG guardsdgp11 years
bug_39f6304c2emerge trunkjan.nijtmans8 years
bug_46f801ea5aTry to make good stack trace. Fallback to making not-so-good stack trace.dgp7 years
bug_473946Increase version to 1.2.5jan.nijtmans13 years
bug_47d66253c9Possible fix for [47d66253c92197d30bff280b02e0a9e62f07cee2|47d66253c9]: "lsea...jan.nijtmans11 years
bug_4a0c163d24New test for clock scan, test numbering correctedoehhar9 years
bug_4b61afd660Improve fix and add test.dgp8 years
bug_4dbdd9af14Improve the comments and add a test.dgp8 years
bug_50750c735a[50750c735a] Fix for uninit memory handling issue in zlib transforms.dkf8 years
bug_510001better solution for bug-510001jan.nijtmans13 years
bug_547989[547989] Proposed implementation of the change described in the comments of t...dkf11 years
bug_57945b574aFurther cleanup and enhancements.Joe Mistachkin9 years
bug_57945b574a_without_stubmerge trunkjan.nijtmans9 years
bug_581937ab1eFix bug [581937ab1e]: fire readable event on async socket connect failureoehhar11 years
bug_58b96f6744make [info commands] follow the namespace path from :: (bug [58b96f6744])aspect8 years
bug_593baa032cmerge trunkdgp9 years
bug_5adc350683Also test transfroms that delay.dgp10 years
bug_5adc350683_86merge iogt fixes.dgp10 years
bug_5d170b5ca5merge trunkjan.nijtmans9 years
bug_5f71353740merge trunkgahr@gahr.ch9 years
bug_67aa9a2070merge core-8-6-branchjan.nijtmans8 years
bug_6ca52aec14fix chan leak with http keepalive vs close (bug [6ca52aec14])aspect8 years
bug_716b427f76A few more tweaks to streamline and clarify.dgp7 years
bug_734138ded8Backout checkin 84f992ce50. This fixes test socket-14.11.1 and createsdgp11 years
bug_75b8433707[75b8433707] Plug a subtle memory leak in TclOO. dkf10 years
bug_7a87a9bc5bProposed fix for invalid write, found by valgrind.dkf9 years
bug_7f02ff1efaNew test trace-18.5 for the bug. Updated trace-18.1 which was tuned to it.dgp8 years
bug_80304238acExtra safety against cyclesdgp9 years
bug_85ce4bf928[85ce4bf928] Fix for problems with storing Inf with [binary format R].dkf10 years
bug_86ceb4e2b6merge trunkdgp11 years
bug_879a0747beProposed fix for bug 879a0747bedgp10 years
bug_894da183c8[894da183c8] Fix and test for bug at the point it was introduced.dgp10 years
bug_8bd13f07bdPatch for [8bd13f07bde6fb0631f27927e36461fdefe8ca95|8bd13f07bd]: Closing tcl ...jan.nijtmans8 years
bug_900cb0284bcTweak to make tests a little clearer.dkf8 years
bug_96c3f3b47d1Tcl_GetWideIntFromObj must fail for values between WIDE_MAX+1 and UWIDE_MAX (...aspect8 years
bug_97069ea11aRevert the tests for bug#97069ea11a from socket.test, because it is hard to t...max11 years
bug_9b47029467631832Add test-case which demonstrates the problem. This test-case fails in trunk (...jan.nijtmans9 years
bug_a3309d01dbAdd the missing cleanup bits in INST_UNSET_ARRAY.dgp9 years
bug_adb198c256Pull out of the loop a block of code that can only run in first iteration.dgp7 years
bug_af08e89777Rework the *FinalizeThread*() routines so that the quick exit preferencedgp10 years
bug_b26e38a3e4Fix the bug. Make use of zlib API in this area more like a Tcl API with wrapp...dkf8 years
bug_b5ced5865bProposed workaround for [b5ced5865b]: newer MinGW compilers can link director...jan.nijtmans10 years
bug_b87ad7e914Fix for [b87ad7e9146832d505f9a430d779c5313c440256|b87ad7e914], rebased to cor...jan.nijtmans8 years
bug_b9b2079e6dNew test compile-5.3 for the bug.dgp9 years
bug_ba44e415a0Proposed fix for [ba44e415a0]: "Use of mutexLock causes problem with reactive...jan.nijtmans9 years
bug_bbc304f61a[bbc304f61a] Proposed fix for reflected watch race condition.dgp9 years
bug_bc1a96407atest casesdgp10 years
bug_bd7f17bce8Enable TCL_EVAL_INVOKE support in the Tcl*Eval(Ex)* family.dgp8 years
bug_bdd91c7e43Suggested fix for [bdd91c7e43]: tclsh crashes in [interp delete]jan.nijtmans11 years
bug_c4e230f29brebase against trunkjan.nijtmans11 years
bug_c7d0bc9a549714e0Proposed fix for [c7d0bc9a549714e0]. Thanks to mr_calvinjan.nijtmans8 years
bug_d2ffcca163Limit isalpha(.) calls in the expr parser to only apply to known ASCIIdgp10 years
bug_d3071887dbc7aeac.... oops ....jan.nijtmans9 years
bug_d4e464ae48First attempt to fix bug [d4e464ae48]: tcl 8.5.15/8.61 breaks python make che...jan.nijtmans11 years
bug_d4e7780ca1Additiona patch/suggestion from Gustaf. This indeed fixes the crash in oo.tes...jan.nijtmans8 years
bug_d5ddbc7f49merge trunkdkf10 years
bug_db0a5f6417Make a few tests more resilient to differences in the semantics of pipes betw...dkf8 years
bug_dcc03414f5Revert bug-fix for [2413550], in order to be able to investigate whether it c...jan.nijtmans10 years
bug_dfc08326e3merge trunkjan.nijtmans11 years
bug_e0a7b3e5f8merge 8.5dgp9 years
bug_e21fc32c2aaProposed fix for [e21fc32c2aa]: auto_execok does not check executability on W...jan.nijtmans9 years
bug_e711ffb458New utility routine GetLocalScalarIndex() reduces common caller boilerplatedgp10 years
bug_f1253530cdMerged trunkfvogel9 years
bug_f1253530cd_altAlternative solution for [f1253530cd]jan.nijtmans9 years
bug_f4f44174emove pthread_sigmask() calls to Tcl_WaitForEvent() where they belongaspect8 years
bug_f97d4ee020Make the tests pass.dkf9 years
bug_f9fe90d0fa[f9fe90d0fa]: more path normalization in TclNewFSPathObjaspect8 years
bug_io_32_11merge 8.5dgp11 years
bug_itcl_1b2865Slightly more efficient version as this is Hot Path code.dkf8 years
bug_unknown_no_errorcodePotential fix for issues relating to lack of errorCode setting with unknown c...dkf11 years
bugfix_832a1994c7_for_precompiled_bcFixed bug in parent revision [832a1994c7] unpredictably breaking theandreask12 years
cjo_hydramerge tip-445dgp7 years
compile_ensemble(experiment): Always compile ensembles. Result: 2 test failures in the "histo...jan.nijtmans8 years
contrib_patrick_fradin_code_cleanupmerge trunkdgp12 years
core_8_0_2_syntheticCreated branch core-8-0-2-syntheticcvs2fossil27 years
core_8_0_3_prPost-release revisions to restore building on later platforms.dgp12 years
core_8_0_4_syntheticCreated branch core-8-0-4-syntheticcvs2fossil26 years
core_8_0_5_base_syntheticCreated branch core-8-0-5-base-syntheticcvs2fossil26 years
core_8_0_5_branchApplied patch to fix sockets when the FD_CONNECT never happens redman26 years
core_8_0_5_syntheticCreated branch core-8-0-5-syntheticcvs2fossil26 years
core_8_0_6_branchCreating branch core-8-0-6-branchcvs26 years
core_8_1_0_syntheticCreated branch core-8-1-0-syntheticcvs2fossil26 years
core_8_1_b1_syntheticCreated branch core-8-1-b1-syntheticcvs2fossil26 years
core_8_1_b2_syntheticCreated branch core-8-1-b2-syntheticcvs2fossil26 years
core_8_1_b3_syntheticCreated branch core-8-1-b3-syntheticcvs2fossil26 years
core_8_1_branch_oldFixed problem with LD_SEARCH_FLAGS on Solaris. It's different rjohnson26 years
core_8_2_1_branchFix sh quoting error reported in bash-3.1+ [Bug 1377619] nijtmans15 years
core_8_2_b1_syntheticCreated branch core-8-2-b1-syntheticcvs2fossil25 years
core_8_2_b3_branchRemoved patch to change prototype of Tcl_ListObjGetElements. redman25 years
core_8_3_1_branch[Bug 3030870] make itcl 3.x built with pre-8.6 work in 8.6: nijtmans14 years
core_8_3_1_io_rewrite * generic/tclStubInit.c: hobbs24 years
core_8_3_1_syntheticCreated branch core-8-3-1-syntheticcvs2fossil25 years
core_8_4_20_rcTag for release.dgp12 years
core_8_4_a2_syntheticCreated branch core-8-4-a2-syntheticcvs2fossil24 years
core_8_4_branchmerge releasedgp12 years
core_8_5_10_rcmerge to RCdgp13 years
core_8_5_11_rctag&bag another 8.5.11 RC.dgp13 years
core_8_5_12_rcmerge 8.5dgp12 years
core_8_5_13_rcChangeLog release markdgp12 years
core_8_5_14rcRedate. Retag RC1.dgp12 years
core_8_5_15_rcAdded note to ChangeLog pointing to the fossil timeline for better logging.dgp11 years
core_8_5_16_rc`make dist` allowed README-* fossil droppings to leak into the distribution.dgp10 years
core_8_5_17_rcupdate changesdgp10 years
core_8_5_18_rcrepair nroff breakagedgp10 years
core_8_5_19_rcupdate release datedgp9 years
core_8_5_a5_syntheticCreated branch core-8-5-a5-syntheticcvs2fossil18 years
core_8_5_branch[0e4d88b650] Allow command overwrite when deletion callback deletes namespace.dgp7 years
core_8_5_branch_fix_1997007code review: restore missing "break" to step out from internal cycle "while (...sebres8 years
core_8_6_0_rcmerge trunk, update changes and re-tagdgp12 years
core_8_6_1_rcmerge trunkdgp11 years
core_8_6_2_rcmerge trunk; update changesdgp10 years
core_8_6_3_rcLikely fix for channel mem leaks.dgp10 years
core_8_6_4_rcupdate changesdgp10 years
core_8_6_5_rcmerge trunkdgp9 years
core_8_6_6_rca few test & docs fixesdgp8 years
core_8_6_7_rcbump release datedgp7 years
core_8_6_b2_rcmerge from trunk to rc all but the AI_ADDRCONFIG experimentdgp13 years
core_8_6_b3_rcTag Tcl 8.6b3 for release.dgp12 years
core_8_6_branchRFE [566a999189] - better error message for 32/64 bit mismatch on load.apnadkarni7 years
core_8_6_branch_forkFixup the ensemble rewrite conversions.dgp8 years
core_8_7_a1_rcmerge trunk; rc1dgp7 years
core_stabilizer_branchmerge updates from 8.5 branch dgp16 years
core_stabilizer_merge_syntheticCreated branch core-stabilizer-merge-syntheticcvs2fossil16 years
core_zip_vfsImprovements to Tip#430 based on community input. Added a forward declaration...hypnotoad7 years
core_zip_vfs_c_encoderTweaks to buildhypnotoad10 years
core_zip_vfs_staticAdd Static library link instructions to tclConfig.shhypnotoad10 years
cpuid_on_unixcpuid-on-unixjan.nijtmans13 years
cygwin_environment_changescygwin should use SetEnvironmentVariable for windows envjan.nijtmans13 years
dah_proc_arg_upvarMore comments, fix bug where numArgs should be argCtdah8 years
damkerngt_file_utimeAdd new sub-command: file utime ?ATIME? MTIMEdamkerngt11 years
daves_chop_branchCreating branch daves-chop-branchcvs23 years
daves_mk_branchworks! I feel like a sculpter. Not done, by far. davygrvy23 years
dev_8_1_stubs_branchMerged 8.0 stub changes stanton26 years
dev_hobbs_branchrefactored varname pushing code and some of the bytecode instructions hobbs24 years
dev_stubs_branch* tools/genStubs.tcl: Reorganized code to support mixed generic stanton26 years
dgp_3401704Tidiness, comments, and tests.dgp13 years
dgp_async_socketThese edits make all tests outside of socket-14.* pass on OSX Mavericks.dgp11 years
dgp_bug_findNow fix the bug.dgp9 years
dgp_bye_ctx_eval_flagConsolidate some helper routines.dgp11 years
dgp_bye_location_eval_listDrop TCL_LOCATION_EVAL_LIST now that it is unused.dgp11 years
dgp_channel_flag_repairSimplify the inputProc of [testchannel transform].dgp11 years
dgp_cmd_epochRemove dup line.dgp8 years
dgp_compile_list_shimmerUnless I'm missing something, this patch to TclCompileListCmd() shoulddgp12 years
dgp_defer_string_repTidier version.dkf10 years
dgp_demoFixup restacking tests to expect the right results.dgp11 years
dgp_dup_encoding_fixmerge trunkdgp9 years
dgp_ecrMissed a cleanup line, which created a memleak.dgp8 years
dgp_encoding_flagsSupport TCL_ENCODING_CHAR_LIMIT in TableToUtfProc and EscapeToUtfProc drivers.dgp10 years
dgp_ensemble_rewritemerge 8.6dgp8 years
dgp_eofCorrect some faulty assumptions in the zlib transformation input driver. dgp11 years
dgp_experimentSimplify ReadBytes based on new constraints.dgp11 years
dgp_flush_channelUpdate comment to explain assumptions.dgp11 years
dgp_hoehrmann_decoderFeature branch to explore making use of the Hoehrmann UTF-8 decoder.dgp12 years
dgp_init_bytecodeParameterize TclInitByteCodeObj to callers sense of typePtr.dgp9 years
dgp_list_simplifyRemove the old implementation.dgp14 years
dgp_literal_reformmerge trunkdgp8 years
dgp_may_be_pointlessRevised ReadChars to restore an attempt to make sure we do not short readdgp11 years
dgp_move_buffersmerge trunkdgp10 years
dgp_no_buffer_recycleRevise the logic for setting TCL_ENCODING_END in the outputEncodingFlagsdgp11 years
dgp_optimize_output_stageBe sure to finalize the identity encoding.dgp11 years
dgp_pkg_migrationmerge trunkdgp10 years
dgp_properbytearraymerge novemdgp7 years
dgp_purge_NRRunObjProcTidy the code and add a test.dgp11 years
dgp_read_bytesMerge 8.5.dgp11 years
dgp_read_bytes_detourmissing declarationdgp11 years
dgp_read_charstidy up.dgp11 years
dgp_refactorRefactor code common to merge and insert.dgp7 years
dgp_refactor_merge_syntheticCreated branch dgp-refactor-merge-syntheticcvs2fossil14 years
dgp_remove_string_resultrevert mistaken commitdgp12 years
dgp_reviewequivalentjan.nijtmans11 years
dgp_revise_parsedvarnametypeThere's a "parsedVarName" Tcl_ObjType that remembers how a variable namedgp9 years
dgp_scan_elementmerge trunkjan.nijtmans13 years
dgp_slow_readSame results; simpler logic.dgp10 years
dgp_sprintfStart branch reducing use of sprintf().dgp12 years
dgp_stack_depth_testerReport pc value when VERIFY fails.dgp11 years
dgp_stackedstdchanFix for core bug yet to be named/numbered.dgp12 years
dgp_stop_regexp_test_crashBackout the contributed patch memaccounting from Postgres since it changesdgp@users.sourceforge.net9 years
dgp_string_catReplace indexing with pointer increments.dgp8 years
dgp_string_findOptimize case of all single-byte chars.dgp8 years
dgp_stringcat_delaystringrepDon't test the impossible.dgp7 years
dgp_switch_compileDrop old code.dgp14 years
dgp_tailcall_errorinfoSuppress additions to the -errorinfo from a tailcall-invoked command.dgp9 years
dgp_tailcall_errorinfo_altDifferent solution to the tailcall impact on -errorinfo.dgp9 years
dgp_tcs_rewrite[assemble] compile syntax error into bytecode reporting syntax error message.dgp11 years
dgp_thread_leaksUse the Thread package instead of the [testthread] command to do dgp13 years
dgp_trunk_flag_repairSame improvements to the zlib transform operations.dgp11 years
dgp_trunk_readmerge trunkdgp11 years
dgp_win_specific_strictUpon further review, due the order of #include of headers, we do not havedgp10 years
dgp_writebytes_optimizeMake simplificiations possible when we know just bytes are getting copieddgp10 years
dkf_64bit_support_branchAdded test for meaning of tcl_platform(wordSize) dkf23 years
dkf_alias_encodingmerge trunkdkf12 years
dkf_asm_crash_20131022merge trunkdgp11 years
dkf_bcc_optimizemerge trunkdkf12 years
dkf_better_try_compilationFix the problems with code generation; behavior now appears correct.dkf11 years
dkf_bytecode_8_6compilation of [string is]dkf11 years
dkf_bytecode_8_6_evalmerge main working branchdkf11 years
dkf_bytecode_8_6_joinmerge main working branchdkf11 years
dkf_bytecode_8_6_nextmerge main working branch; made opcode work by getting callback ordering rightdkf11 years
dkf_bytecode_8_6_string_isimprove the disassemblydkf11 years
dkf_bytecode_8_6_string_replaceprecondition was wrong, and needed to flush part of the string/internal repdkf11 years
dkf_bytecode_8_6_yieldfix INST_YIELD so that it worksmig12 years
dkf_bytecode_optimizermerge trunkdkf11 years
dkf_command_typemerge trunkdkf11 years
dkf_compile_improvementsmerge trunkdkf11 years
dkf_dict_with_compiledAdd the other instructions to the assembler's nous.dkf13 years
dkf_documentation_figuresmerge trunkdkf12 years
dkf_expose_ptrgetvarmerge trunkdkf7 years
dkf_expose_ptrgetvar_8_6Expose some of the core variable access APIs. dkf7 years
dkf_http_cookiesmerge trunkdkf10 years
dkf_improved_disassemblerTidy things up a bit more.dkf10 years
dkf_loop_exception_range_workAnd the last bits that need fixing; the code is still less efficient than des...dkf11 years
dkf_namespace_as_ensembleAdd ChangeLog entry.dkf14 years
dkf_notifier_pollmerge trunkdkf12 years
dkf_oo_override_definition_namespacesThink-o fix...dkf7 years
dkf_quieter_compilesmore quieting of excessively-noisy messagesdkf11 years
dkf_reviewremove uninitialized variable and the code that used it mig11 years
dkf_utf16_branchmerge trunkdkf12 years
dkf_wait_with_pollExperimental branch on whether to use poll() instead of select().dkf9 years
dogeen_assembler_branchmerge trunkKevin B Kenny14 years
dogeen_assembler_merge_syntheticCreated branch dogeen-assembler-merge-syntheticcvs2fossil14 years
drh_micro_optimizationMerge trunkjan.nijtmans8 years
editorconfigEditorconfig support (experimental)jan.nijtmans8 years
empty_bodiesmerge trunkMiguel Sofer9 years
experimentmerge 8.5dgp10 years
experimentalFix typo in previous check-in.Joe Mistachkin10 years
ferrieux_naclAdd a local copy of reference JS demo at same fps. Add an interactive tclsh p...ferrieux13 years
fix_1997007merge core-8-6-branchjan.nijtmans8 years
fix_42202ba1e5ff566ebug fix for [42202ba1e5ff566e0f9abb9f890e460fbc6c1c5c]: segfault by coro injectsebres8 years
fix_8_5_578155d5a19b348dstability fix: try to avoid segfault using released object, in error case of ...sebres7 years
fix_win_native_accessmerge to bugfix branchdgp13 years
fix_windows_zlibFix for the cases where a dynamic build is usedhypnotoad10 years
forgiving_pkgconfigoopsjan.nijtmans12 years
freq_3010352_implFRQ 3010352 implementationjan.nijtmans13 years
frq_3527238merge trunkjan.nijtmans12 years
frq_3544967same fore Makefile.injan.nijtmans12 years
frq_3579001merge trunkjan.nijtmans12 years
frq_3599786Experimental: categories added to man pages; enhance tcltk-man2html to use ca...twylite12 years
gahr_split_installCreate new branch named "gahr-split-install"gahr9 years
gahr_ticket_dee3d66bc7[dee3d66bc7] Remove 'any' afgahr9 years
gahr_ticket_e6f27aa56fmerge trunkjan.nijtmans8 years
gahr_tip_447Merge trunkgahr9 years
griffin_numlevelsmerge 8.5dgp12 years
htmlCopyrightsFixFix the generated copyright sections in the HTML help file.Joe Mistachkin8 years
htmlhelpFixSet the default topic, enable full-text search, and put all help output files...Joe Mistachkin8 years
http3Checkpoint of work in progress.dkf7 years
hypnotoadUpdating hypnotoad branchtne10 years
hypnotoad_bug_3598385Merging in changes from trunkseandeelywoods12 years
hypnotoad_prefer_native_8_6Bringing patch up to date with the latest trunkhypnotoad12 years
hypnotoad_vexprBringing vexpr up to date with the latest trunk.hypnotoad12 years
info_linkednameAdd [info linkedname] introspection commandmlafon8 years
initsubsystemsmerge trunkjan.nijtmans8 years
initsubsystems2revert previous 2 commits: Setting argv0 as well is not a good idea. Needs to...jan.nijtmans12 years
initsubsystems2_splitHow would it look like, if the various initializations were split in separate...jan.nijtmans12 years
iocmd_leaksConstrain test iocmd.tf-32.1 to be skipped during valgrinding. It contains a dgp13 years
iosTesting patches for iOS supportKevin Walzer10 years
irontclThe 'clean' target should delete the generated 'nmhlp-out.txt' file as well.Joe Mistachkin7 years
jcr_notifier_pollMerge from trunkevilotto10 years
je_tty_cleanupCreate new branch named "je-tty-cleanup"joe12 years
jenglish_termios_cleanup... which means struct TtyState can be replaced with struct FileState.joe12 years
jn_0d_radix_prefixmerge trunkjan.nijtmans7 years
jn_Tcl_requirementLet Tcl 8.7 allow Tk 8.7 to be used by defaultjan.nijtmans9 years
jn_emptystringMerge trunk. Don't use ListObjLength() in tclStrToD.cjan.nijtmans8 years
jn_frq_3257396merge latest trunkjan.nijtmans14 years
jn_no_struct_namesunnecessary hook struct definitionsjan.nijtmans12 years
jn_unc_vfsintegrate QNX special path handling better with TIP #402jan.nijtmans12 years
jn_wide_printfImplement all possible TCL_LL_MODIFIER formats in Tcl_ObjPrintf(), can be "ll...jan.nijtmans8 years
kbk_clock_encoding_ensemblesMake 'clock' and 'encoding' into compilable ensembles that play with safe int...Kevin B Kenny8 years
kennykb_numerics_branchmerge updates from HEAD dgp19 years
kennykb_tip_22_33 * Typo correction. dgp23 years
kennykb_tip_22_33_botchedDevelopment branch for TIPs 22 and 33 Kevin B Kenny24 years
lanam_array_for_implMerge trunkandy8 years
libtommath'const'ify all libtommath functions, will appear in next libtommath version. ...jan.nijtmans7 years
libtommath_1_0Restore bn_mp_radix_size.c to exact copy of libtommath-1.0 version: Since the...jan.nijtmans8 years
libtommath_1_0_1Merge libtommath 1.0.1 finaljan.nijtmans7 years
libtommath_tcl_fixes_75(experiment) See: [https://github.com/libtom/libtommath/pull/75] proposal by ...jan.nijtmans7 years
littleMerge 8.6.5dgp9 years
macosx_8_4_branchadded macosx-8-4-branch ChangeLog entries das22 years
masterMerge latest 'const'ification changes from libtommath (develop branch, will b...jan.nijtmans7 years
merge_tzdata_to_trunkMerge Forkvenkat9 years
micro_optMerge tip-444gahr9 years
mig_alloc_reformmerge trunkmig12 years
mig_catch_compilerallow simple optimization of the OK case, at the cost of some code duplicationmig11 years
mig_errstill no goodmig12 years
mig_no280merge trunkmig12 years
mig_nre_modscode reordering, no func changesMiguel Sofer9 years
mig_opt2replace indirect with direct jumps where possible; little effect for now, pen...Miguel Sofer9 years
mig_opt2_tmp(NON_PORTABLE) insure good cache alignment of NRE_callbackMiguel Sofer9 years
mig_opt_foreachchange NULL to INT2PTR(0), for claritymig11 years
mig_optimize*** ABANDONED - see branch mig-opt2 *** Miguel Sofer9 years
mig_review[010f4162ef] Repair effect of trace errors on -errorinfo and -errorstack.dgp11 years
mig_stacklevelsstop looking at the C-stack depthmig11 years
mig_strip_brutalmerge no280, emptymig12 years
mig_tailcall_cleanupmore commentsMiguel Sofer10 years
mig_tmpupdate the range data for code that was moved to the endMiguel Sofer9 years
mig_tmp_optimizeMaking the optimizer pluggable by extensions; please review for committing to...mig11 years
minimal_fix_for_3598300_problemsAs minimal a fix for the issues with [3598300] as I can make.dkf12 years
miniz*** NON WORKING BUILD *** hypnotoad10 years
mistachkin_review**TIP #285 untested by the testsuite if the thread extension is not available...mig11 years
mistakeCheck in reference implementation of TIP 452.gerald7 years
mistake_20110314Revert previous commit: I was not aware that we have a fork of libtommathjan.nijtmans14 years
mistake_20110314aRevert previous commit: I was not aware that we have a fork of libtommathjan.nijtmans14 years
mistkae[50750c735a] Possible fix for uninit memory handling issue in [zlib].dkf8 years
mod_8_3_4_branch * generic/tclProc.c (TclCloneProc): Fixed leaking of 'procNew', andreas_kupries22 years
more_macrosmerge trunkjan.nijtmans12 years
msgcat_dyn_localeAdded tests for mcforgetpackage, mcpackagelocale and mcpackageconfigoehhar9 years
msofer_bcEngineupdated some comments Miguel Sofer23 years
msofer_wcodes_branch * generic/tclExecute.c: fixing an error in INST_LNOT and Miguel Sofer19 years
msvc_with_64bit_zlib1_dllExperiment: MSVC build now links with 64-bit zlib1.dlljan.nijtmans12 years
no_shimmer_string_lengthfix broken lset tests, now all test-cases pass!jan.nijtmans12 years
no_smartrefAttempt to get new clock code working without the need for smartref.jan.nijtmans8 years
nonmonotonic_obj_allocZap outdated comment.ferrieux10 years
notifierIntroduce new function TclInitThreadAlloc(), symmetric with TclFinalizeThread...jan.nijtmans8 years
novemMerge trunkjan.nijtmans7 years
novem_64bit_sizesmerge novemdkf11 years
novem_ak_iframe_directCleaning up some of the internals of TIP #280.andreask12 years
novem_ak_preserve_experimentsThis branch explores the performance implications of relacing the andreask12 years
novem_bighashMerge novemjan.nijtmans8 years
novem_bug_3598300merge novemjan.nijtmans11 years
novem_demo_bug_3588687now change magic value, to demonstrate better solutionjan.nijtmans12 years
novem_freeifrefcountzeroFix correct cleanup in more situations, using a new macro TclFreeIfRefCountZerojan.nijtmans12 years
novem_more_memory_APImerge novemjan.nijtmans7 years
novem_no_register_objtypesuse longValue as internal repr in stead of wideValue. jan.nijtmans12 years
novem_no_shimmer_string_lengthNew experiment (ended), regarding non-shimmering "string length"jan.nijtmans12 years
novem_no_startcmdmerge changes from trunkdkf12 years
novem_numbers_eiasWIP getting rid of the ::tcl_precision variabledgp12 years
novem_purge_literalsBranch to investigate what happens when we no longer maintain shareddgp12 years
novem_reduced_bytecodesmerge main novem branchdkf12 years
novem_reduced_symbol_exportimprove compatibility with initsubsystems branchjan.nijtmans11 years
novem_remove_string_resultNo string result -> no more need for TCL_RESULT_SIZEdgp12 years
novem_remove_vamerge novemjan.nijtmans12 years
novem_rename_memory_APIRename the memory routines so that Tcl_Alloc/Tcl_Free/etc become the recommendeddgp12 years
novem_reviewProposed rollback of the TCL_STUB_MAGIC change on novem branch.dgp12 years
novem_saveresult_as_macroImplement Tcl_SaveResult/Tcl_DiscardResult/Tcl_RestoreResult as macrojan.nijtmans12 years
novem_supportdo some Tcl_EvalEx, for test-purposes, demonstrating a crashjan.nijtmans12 years
novem_two_layer_listFirst sketches of a two-layer data structure for storing Tcl lists.dgp12 years
novem_unversioned_stubmerge novem. Some more fixes.jan.nijtmans12 years
off_8_4_branchWrap test-case over multiple lines.jan.nijtmans12 years
off_trunkAdded tooltip generation to contents and keywords pages.dkf12 years
on_hold_84<i>On-hold at Don Porter's request.</i> jan.nijtmans12 years
on_hold_85<i>On hold at Don Porter's request</i> jan.nijtmans12 years
on_hold_trunk<i>on-hold at Don Porter's request</i> jan.nijtmans12 years
oo_copy_nsImprove docs, add tests, fix a corner case in the implementation.dkf7 years
other_64bit_candidatesThis doesn't compile! Just a reminder to myself which other API's/fields/what...jan.nijtmans12 years
package_filesFlightAware feedback: "Aside: Any way to find out what the pkgIndex.tcl file ...jan.nijtmans8 years
panic_noreturnDecorate Tcl_Panic and Tcl_PanicVA with the noreturn option, alowing further ...jan.nijtmans9 years
prevent_inlinePrevent inlining of StackGrowsDown(), in case of cross-compilingjan.nijtmans12 years
privatexjan.nijtmans13 years
pseudotrunk_2011_03_08More gcc warnings: variable set but not usedjan.nijtmans14 years
pyk_emptystringmerge trunkjan.nijtmans8 years
pyk_expr_numericHarmonize tests with expr implementation.pooryorick8 years
pyk_listdictstringrepAdd back constraint that direct dict->list conversion is only done when no st...pooryorick8 years
pyk_pkgrequirenreNRE-enable [package ifneeded] scripts.pooryorick8 years
pyk_trunkmerge pyk-listdictstringreppooryorick8 years
remove_pathappend_intrepmerge trunkdgp13 years
remove_trim_headerRevert Makefile.in changes and remove added tclStringTrim.h header. jan.nijtmans11 years
revert_3396731Repaired the lost performance in the copy loop hotspots. Now meets or dgp13 years
rfe_1711975Tcl_MainEx() (like Tk_MainEx())jan.nijtmans13 years
rfe_3216010Merge to feature branchdkf14 years
rfe_3389978More efficient/robust implementation of function TclNativeCreateNativeRep(). jan.nijtmans11 years
rfe_3432962Submitted patch on interactive use of the rc file.dgp12 years
rfe_3464401merge to feature branchjan.nijtmans13 years
rfe_3473670merge trunkjan.nijtmans13 years
rfe_6c0d7aec67merge core-8-6-branchjan.nijtmans7 years
rfe_854941Minor simplification and correct TCL_NORETURN decorationjan.nijtmans9 years
rfe_b42b208ba4Only write back file attributes if any of them really changed.jan.nijtmans11 years
rfe_dfc08326e3The Tcl 9.0 way of how [dfc08326e3] should be fixed: Real integration of TclO...jan.nijtmans11 years
rfe_notifier_forkFixed test case variable clash with 'folder'oehhar11 years
rmax_ipv6_branchcomplete a comment in socket.testmax13 years
rmax_ipv6_merge_syntheticCreated branch rmax-ipv6-merge-syntheticcvs2fossil14 years
robust_async_connect_testsmerge trunkjan.nijtmans10 years
scriptics_sc_1_0_branchCreating branch scriptics-sc-1-0-branchcvs25 years
scriptics_sc_1_1_branchCreating branch scriptics-sc-1-1-branchcvs25 years
scriptics_sc_2_0_b2_syntheticCreated branch scriptics-sc-2-0-b2-syntheticcvs2fossil25 years
scriptics_sc_2_0_b5_syntheticCreated branch scriptics-sc-2-0-b5-syntheticcvs2fossil25 years
scriptics_sc_2_0_fixed_syntheticCreated branch scriptics-sc-2-0-fixed-syntheticcvs2fossil25 years
scriptics_tclpro_1_2added missing files, changed to handle CRLF translations stanton26 years
scriptics_tclpro_1_2_oldUpdated patchlevel for final release. rjohnson26 years
scriptics_tclpro_1_2_syntheticCreated branch scriptics-tclpro-1-2-syntheticcvs2fossil26 years
scriptics_tclpro_1_3_b2_branchFixed so patchlevel is included in installer strings. stanton26 years
scriptics_tclpro_1_3_b3_syntheticCreated branch scriptics-tclpro-1-3-b3-syntheticcvs2fossil25 years
sebres_8_5_event_perf_branchmerge (integrate) sebres-event-perf-fix-busy-waitsebres7 years
sebres_8_5_timerate[win32] optimized calibration cycle (makes Tcl for windows "RTS" resp. NRT-ca...sebres8 years
sebres_8_6_clock_speedupsmall amend with forgetten static keyword by optionsebres8 years
sebres_8_6_clock_speedup_cr1fixed overflow of year (resp. julianday), closes ticket [16e4fc3096]; test ca...sebres7 years
sebres_8_6_event_perf_branchmerge sebres-event-perf-fix-busy-waitsebres7 years
sebres_8_6_timerateman for timerate (doc/timerate.n)sebres8 years
sebres_clean_core_8_5generic: reduced diffs to trunk, win: clean code after bug [f00009f7ce] was f...sebres9 years
sebres_clock_speedupCreate new branch named "sebres-clock-speedup"sebres8 years
sebres_clock_tz_fixclock - FreeScan (resp. Oldscan): repair scanning date/time with TZ using '+'...sebres9 years
sebres_event_perf_fix_busy_waitavoid busy wait if new short block-time will be set within service event-cycl...sebres7 years
sebres_optimized_8_5merge bugfixdkf13 years
sebres_trunk_clock_speedupmerge sebres-8-6-clock-speedupsebres8 years
sebres_trunk_timeratereintergrate (merge back) "sebres-8-6-timerate" into "sebres-trunk-timerate"sebres8 years
semverRe-base to trunk. Now versioned as 8.7.0-alpha.2jan.nijtmans7 years
stwo_dev86Change the return type of Tcl_RegisterChannel from void to Tcl_Channel and ha...stu7 years
tclPlatformEngineUpdate comment with TIP number.Joe Mistachkin9 years
tcl_nosize(Bad idea)jan.nijtmans12 years
tclchan_assertionsbackout backwards-incompatible experiment that was accidentally committedbch10 years
tclpro_1_5_0_syntheticCreated branch tclpro-1-5-0-syntheticcvs2fossil24 years
tcltest_verbose_descGeneralization: desc is now appended to most events.ferrieux10 years
tgl_pg_reAdapted new tests contributed from Tom Lane @postgres.dgp9 years
thread_leaksstop segfaultdgp13 years
ticket_9b2e636361Allocate encoding name, so caller of Tcl_RegisterConfig() doesn't need to kee...jan.nijtmans11 years
ticket_e770d92d6Patch to add support for higher baud rates under Unix Ticket [e770d92d76]]hypnotoad9 years
tip280_test_coverageRevert the revised macros used in developing the new tests.dgp11 years
tip404_tcl8_5Correct build version and backported 973091ef75oehhar12 years
tip429_only_idRecognize that "id" is the K combinator in disguise. Rename it as "K" and ext...ferrieux10 years
tip_106_implfix handling of closing '\0' for -binary datajan.nijtmans13 years
tip_162_branchread() errors or EOF shall not prevent write(). This allows for proper grace...davygrvy16 years
tip_257_implementation_branchRenamed functions to reduce confusion and added to header file. dkf18 years
tip_257_implementation_branch_root_syntheticCreated branch tip-257-implementation-branch-root-syntheticcvs2fossil18 years
tip_257_merge1_branch_20061020T1300add tclOO* files das18 years
tip_278_branch * tests/namespace-old.test (5.4 6.12,14,15): Miguel Sofer18 years
tip_282merge trunkdgp7 years
tip_302Added patch for win/configure.in into win/configure.acoehhar9 years
tip_312merge trunkjan.nijtmans8 years
tip_318_updatemerge trunkjan.nijtmans12 years
tip_388_implmerge trunk to feature branchjan.nijtmans13 years
tip_389_implmerge trunkjan.nijtmans7 years
tip_395_with_alt_namealternative TIP 395 implementation:jan.nijtmans13 years
tip_398_implCompat flag, test, and doc update.ferrieux13 years
tip_400_implmerge trunkdkf12 years
tip_401merge trunkdgp13 years
tip_404ChangeLog entry addedoehhar12 years
tip_405_impl_tdmerge trunkdkf12 years
tip_427Documented "fconfigure $h -connecting" on socket man pageoehhar10 years
tip_428Merge trunkoehhar10 years
tip_429merge trunkferrieux10 years
tip_436Added tests.dkf9 years
tip_440_altRedo TIP #440 alternative again, now using "info runtime".jan.nijtmans9 years
tip_440_backportBackport of TIP #440.Joe Mistachkin9 years
tip_444merge trunkgahr9 years
tip_445More TIP 445 conversion of the "path" Tcl_ObjType.dgp7 years
tip_445_forkmerge trunkdgp9 years
tip_445_rejectConvert the "bytearray" Tcl_ObjType to use the proposed Tcl_ObjIntRepdgp9 years
tip_452Tests for ::http::Write done.gerald7 years
tip_456Further experimental follow-up: Add internal function TclOpenTcpClientEx(), a...jan.nijtmans8 years
tip_456_forkmerge forkjan.nijtmans8 years
tip_457TIP#457: Update named group endingmlafon8 years
tip_458merge trunkdgp8 years
tip_458_experimentExperiment, does this work? Still to be tested: Eliminate variable triggerPip...jan.nijtmans8 years
tip_463merge trunkdgp7 years
tip_465Deal with backslashes in ${...}, change "char" to "character" in error, fix t...avl8 years
tip_468merge (minor style issues from) trunkjan.nijtmans8 years
tip_468_bisMerge "tip-468" branch. Add new function Tcl_OpenTcpClientEx() with same chan...jan.nijtmans8 years
tip_469Make it work again with new epoll Notifieravl427 years
tip_470merge trunkdkf7 years
tip_473Documentation correction; issue pointed out by DGP.dkf7 years
tip_59_implementation2002-04-05 Daniel Steffen <das@users.sourceforge.net> das23 years
tip_improve_execFirst part of upcoming TIP - Improving [exec]'s syntax : the syntax extension...ferrieux11 years
tk_bug_9eb55debc5Was handling the flushing at the end of the stream wrongly.dkf9 years
tkt3328635_posix_monotonic_clockMerge trunkjan.nijtmans8 years
tkt_04e26c02c0Make sure not to miss bignumsgahr8 years
tkt_414d10346bAnother attempt to cleanup stale remnants of the notifier subsystem.Joe Mistachkin11 years
tkt_4d5ae7d88a[4d5ae7d88a] Restore default-to-error logic in TcpConnectgahr8 years
unbreak_tclcompilerPartial revert of [a16752c252] bug fix to stop crashes in buggy tclcompiler.dgp11 years
unknown_rewritemerge trunkdgp12 years
unprovenwipdgp13 years
unsetThreadDataAlso finalize the condition variables for each notifier thread.Joe Mistachkin11 years
unwantedmerge trunkdgp7 years
updateextended* added some docco for [update] changes.colin8 years
vc_reformAdd default-* targetsapnadkarni7 years
vs_ide_compilemerge core-8-5-branchjan.nijtmans8 years
werner_utf_max_6Patches by Christian Werner, supporting TCL_UTF_MAX=6 on Windows. Doesn't wor...jan.nijtmans9 years
win32_armSupport compiling Tcl for Win32 on ARM.Joe Mistachkin11 years
winFixesmerge core-8-6-branch. Undo changes to coffbase.txt (they cause overlap with Tk)jan.nijtmans8 years
win_console_panicRebase to trunkjan.nijtmans7 years
win_sock_async_connect_race_fixsocket -async and gets/puts stall on windows (Ticket [336441ed59]) andreask11 years
z_modifierMerge trunkjan.nijtmans7 years
zipfsMerge core-8-6-branch, fallback for MAP_FILEjan.nijtmans7 years
zippy_fifoReduce the list walking by keeping lastPtr fields.dgp10 years
zlib_1_2_6[Frq 3483854] zlib-1.2.6jan.nijtmans13 years
 
TagDownloadAuthorAge
core-bug-a8e4f76ce4core-bug-a8e4f76ce4.zip  core-bug-a8e4f76ce4.tar.gz  core-bug-a8e4f76ce4.tar.bz2  jan.nijtmans12 days
core-bug-f2b5f89c0dcore-bug-f2b5f89c0d.zip  core-bug-f2b5f89c0d.tar.gz  core-bug-f2b5f89c0d.tar.bz2  jan.nijtmans2 weeks
core-bug-e38dce74e2-214cc0eb22-v2core-bug-e38dce74e2-214cc0eb22-v2.zip  core-bug-e38dce74e2-214cc0eb22-v2.tar.gz  core-bug-e38dce74e2-214cc0eb22-v2.tar.bz2  jan.nijtmans2 weeks
core-bug-02977e0004-sebrescore-bug-02977e0004-sebres.zip  core-bug-02977e0004-sebres.tar.gz  core-bug-02977e0004-sebres.tar.bz2  sebres4 weeks
core-bug-02977e0004-jncore-bug-02977e0004-jn.zip  core-bug-02977e0004-jn.tar.gz  core-bug-02977e0004-jn.tar.bz2  jan.nijtmans4 weeks
core-bug-02977e0004core-bug-02977e0004.zip  core-bug-02977e0004.tar.gz  core-bug-02977e0004.tar.bz2  sebres4 weeks
core-bug-02977e0004-9.0core-bug-02977e0004-9.0.zip  core-bug-02977e0004-9.0.tar.gz  core-bug-02977e0004-9.0.tar.bz2  dkf4 weeks
core-bug-02977e0004-8.7core-bug-02977e0004-8.7.zip  core-bug-02977e0004-8.7.tar.gz  core-bug-02977e0004-8.7.tar.bz2  dkf4 weeks
core-bug-02977e0004-8.6core-bug-02977e0004-8.6.zip  core-bug-02977e0004-8.6.tar.gz  core-bug-02977e0004-8.6.tar.bz2  dkf4 weeks
core-more-encoding-testscore-more-encoding-tests.zip  core-more-encoding-tests.tar.gz  core-more-encoding-tests.tar.bz2  apnadkarni6 weeks
core-tip-702core-tip-702.zip  core-tip-702.tar.gz  core-tip-702.tar.bz2  apnadkarni6 weeks
core-always-zlibcore-always-zlib.zip  core-always-zlib.tar.gz  core-always-zlib.tar.bz2  jan.nijtmans7 weeks
core-9-0-0core-9-0-0.zip  core-9-0-0.tar.gz  core-9-0-0.tar.bz2  jan.nijtmans2 months
minorminor.zip  minor.tar.gz  minor.tar.bz2  dkf2 months
core-bug-e38dce74e2core-bug-e38dce74e2.zip  core-bug-e38dce74e2.tar.gz  core-bug-e38dce74e2.tar.bz2  jan.nijtmans2 months
core-bug-02d5d65d70adab97core-bug-02d5d65d70adab97.zip  core-bug-02d5d65d70adab97.tar.gz  core-bug-02d5d65d70adab97.tar.bz2  sebres3 months
core-8-6-15core-8-6-15.zip  core-8-6-15.tar.gz  core-8-6-15.tar.bz2  dgp3 months
core-bug-945d2387d7core-bug-945d2387d7.zip  core-bug-945d2387d7.tar.gz  core-bug-945d2387d7.tar.bz2  apnadkarni3 months
core-bug-a82f8b15d1core-bug-a82f8b15d1.zip  core-bug-a82f8b15d1.tar.gz  core-bug-a82f8b15d1.tar.bz2  jan.nijtmans3 months
core-bug-304d30677acore-bug-304d30677a.zip  core-bug-304d30677a.tar.gz  core-bug-304d30677a.tar.bz2  apnadkarni3 months
core-apn-encoding-testscore-apn-encoding-tests.zip  core-apn-encoding-tests.tar.gz  core-apn-encoding-tests.tar.bz2  apnadkarni3 months
core-bug-3968086595core-bug-3968086595.zip  core-bug-3968086595.tar.gz  core-bug-3968086595.tar.bz2  pooryorick4 months
core-zipfs-consolidationcore-zipfs-consolidation.zip  core-zipfs-consolidation.tar.gz  core-zipfs-consolidation.tar.bz2  apnadkarni4 months
core-bug-fccb9f322fcore-bug-fccb9f322f.zip  core-bug-fccb9f322f.tar.gz  core-bug-fccb9f322f.tar.bz2  apnadkarni4 months
core-9-0-b3core-9-0-b3.zip  core-9-0-b3.tar.gz  core-9-0-b3.tar.bz2  dgp4 months
core-bug-0439e1e1a3core-bug-0439e1e1a3.zip  core-bug-0439e1e1a3.tar.gz  core-bug-0439e1e1a3.tar.bz2  jan.nijtmans5 months
core-apn-info-framecore-apn-info-frame.zip  core-apn-info-frame.tar.gz  core-apn-info-frame.tar.bz2  apnadkarni5 months
core-tip-699core-tip-699.zip  core-tip-699.tar.gz  core-tip-699.tar.bz2  jan.nijtmans5 months
core-apn-icucore-apn-icu.zip  core-apn-icu.tar.gz  core-apn-icu.tar.bz2  apnadkarni5 months
core-apn-no-injectcore-apn-no-inject.zip  core-apn-no-inject.tar.gz  core-apn-no-inject.tar.bz2  apnadkarni5 months
core-bug-1d26e580cfcore-bug-1d26e580cf.zip  core-bug-1d26e580cf.tar.gz  core-bug-1d26e580cf.tar.bz2  jan.nijtmans6 months
core-bug-407b70361ccore-bug-407b70361c.zip  core-bug-407b70361c.tar.gz  core-bug-407b70361c.tar.bz2  jan.nijtmans6 months
core-9-0-b2core-9-0-b2.zip  core-9-0-b2.tar.gz  core-9-0-b2.tar.bz2  dgp6 months
core-fix-79474c58800cdf94core-fix-79474c58800cdf94.zip  core-fix-79474c58800cdf94.tar.gz  core-fix-79474c58800cdf94.tar.bz2  sebres7 months
dkf/to-redodkf/to-redo.zip  dkf/to-redo.tar.gz  dkf/to-redo.tar.bz2  dkf7 months
core-bug-9a8ce8af3dcore-bug-9a8ce8af3d.zip  core-bug-9a8ce8af3d.tar.gz  core-bug-9a8ce8af3d.tar.bz2  apnadkarni7 months
core-bug-ef23a85ac6core-bug-ef23a85ac6.zip  core-bug-ef23a85ac6.tar.gz  core-bug-ef23a85ac6.tar.bz2  jan.nijtmans7 months
core-tip-626core-tip-626.zip  core-tip-626.tar.gz  core-tip-626.tar.bz2  jan.nijtmans7 months
core-bug-18f4a94d03core-bug-18f4a94d03.zip  core-bug-18f4a94d03.tar.gz  core-bug-18f4a94d03.tar.bz2  jan.nijtmans7 months
core-bug-e155cedf33core-bug-e155cedf33.zip  core-bug-e155cedf33.tar.gz  core-bug-e155cedf33.tar.bz2  jan.nijtmans8 months
core-bug-ac7592e73c10d04bcore-bug-ac7592e73c10d04b.zip  core-bug-ac7592e73c10d04b.tar.gz  core-bug-ac7592e73c10d04b.tar.bz2  jan.nijtmans8 months
core-libtommath-1.3core-libtommath-1.3.zip  core-libtommath-1.3.tar.gz  core-libtommath-1.3.tar.bz2  jan.nijtmans8 months
core-clock-speedup-cr2core-clock-speedup-cr2.zip  core-clock-speedup-cr2.tar.gz  core-clock-speedup-cr2.tar.bz2  sebres9 months
core-tip-688-candidatecore-tip-688-candidate.zip  core-tip-688-candidate.tar.gz  core-tip-688-candidate.tar.bz2  jan.nijtmans9 months
core-bug-910d67a229fe7f65core-bug-910d67a229fe7f65.zip  core-bug-910d67a229fe7f65.tar.gz  core-bug-910d67a229fe7f65.tar.bz2  sebres9 months
core-8-6-14core-8-6-14.zip  core-8-6-14.tar.gz  core-8-6-14.tar.bz2  dgp9 months
core-tip-652core-tip-652.zip  core-tip-652.tar.gz  core-tip-652.tar.bz2  pooryorick10 months
core-9-0-b1core-9-0-b1.zip  core-9-0-b1.tar.gz  core-9-0-b1.tar.bz2  dgp11 months
core-9-0-b1-rc4core-9-0-b1-rc4.zip  core-9-0-b1-rc4.tar.gz  core-9-0-b1-rc4.tar.bz2  dgp11 months
core-tip-661-candidatecore-tip-661-candidate.zip  core-tip-661-candidate.tar.gz  core-tip-661-candidate.tar.bz2  jan.nijtmans12 months
closedclosed.zip  closed.tar.gz  closed.tar.bz2  jan.nijtmans15 months
core-tip-657-candidatecore-tip-657-candidate.zip  core-tip-657-candidate.tar.gz  core-tip-657-candidate.tar.bz2  jan.nijtmans17 months
core-tip-558-candidatecore-tip-558-candidate.zip  core-tip-558-candidate.tar.gz  core-tip-558-candidate.tar.bz2  jan.nijtmans19 months
core-tip-626-candidatecore-tip-626-candidate.zip  core-tip-626-candidate.tar.gz  core-tip-626-candidate.tar.bz2  jan.nijtmans19 months
tip-656-pre-capitip-656-pre-capi.zip  tip-656-pre-capi.tar.gz  tip-656-pre-capi.tar.bz2  apnadkarni21 months
jan-b8f575aa23jan-b8f575aa23.zip  jan-b8f575aa23.tar.gz  jan-b8f575aa23.tar.bz2  jan.nijtmans24 months
core-8-6-13core-8-6-13.zip  core-8-6-13.tar.gz  core-8-6-13.tar.bz2  dgp2 years
tip607-encoding-failindextip607-encoding-failindex.zip  tip607-encoding-failindex.tar.gz  tip607-encoding-failindex.tar.bz2  oehhar3 years
tip601-encoding-failindextip601-encoding-failindex.zip  tip601-encoding-failindex.tar.gz  tip601-encoding-failindex.tar.bz2  oehhar3 years
core-8-6-12core-8-6-12.zip  core-8-6-12.tar.gz  core-8-6-12.tar.bz2  dgp3 years
core-9-0-a3core-9-0-a3.zip  core-9-0-a3.tar.gz  core-9-0-a3.tar.bz2  dgp3 years
core-8-7-a5core-8-7-a5.zip  core-8-7-a5.tar.gz  core-8-7-a5.tar.bz2  dgp3 years
core-8-6-11core-8-6-11.zip  core-8-6-11.tar.gz  core-8-6-11.tar.bz2  dgp4 years
core-8-7a3core-8-7a3.zip  core-8-7a3.tar.gz  core-8-7a3.tar.bz2  dgp5 years
core-9-0-a1core-9-0-a1.zip  core-9-0-a1.tar.gz  core-9-0-a1.tar.bz2  dgp5 years
core-8-7-a3core-8-7-a3.zip  core-8-7-a3.tar.gz  core-8-7-a3.tar.bz2  dgp5 years
core-8-6-10core-8-6-10.zip  core-8-6-10.tar.gz  core-8-6-10.tar.bz2  dgp5 years
please_don't_mess_with_branches_just_for_debugging!please_don't_mess_with_branches_just_for_debugging!.zip  please_don't_mess_with_branches_just_for_debugging!.tar.gz  please_don't_mess_with_branches_just_for_debugging!.tar.bz2  jan.nijtmans5 years
core-8-6-9core-8-6-9.zip  core-8-6-9.tar.gz  core-8-6-9.tar.bz2  dgp6 years
rc4rc4.zip  rc4.tar.gz  rc4.tar.bz2  dgp6 years
core-8-6-8core-8-6-8.zip  core-8-6-8.tar.gz  core-8-6-8.tar.bz2  dgp7 years
vc_reform_tests_passvc_reform_tests_pass.zip  vc_reform_tests_pass.tar.gz  vc_reform_tests_pass.tar.bz2  7 years
vc-reform-tests-passvc-reform-tests-pass.zip  vc-reform-tests-pass.tar.gz  vc-reform-tests-pass.tar.bz2  apnadkarni7 years
releaserelease.zip  release.tar.gz  release.tar.bz2  7 years
core_8_7_a1core_8_7_a1.zip  core_8_7_a1.tar.gz  core_8_7_a1.tar.bz2  7 years
rc1rc1.zip  rc1.tar.gz  rc1.tar.bz2  7 years
core-8-7-a1core-8-7-a1.zip  core-8-7-a1.tar.gz  core-8-7-a1.tar.bz2  dgp7 years
rc0rc0.zip  rc0.tar.gz  rc0.tar.bz2  7 years
core_8_6_7core_8_6_7.zip  core_8_6_7.tar.gz  core_8_6_7.tar.bz2  7 years
core-8-6-7core-8-6-7.zip  core-8-6-7.tar.gz  core-8-6-7.tar.bz2  dgp7 years
bg-tip-282bg-tip-282.zip  bg-tip-282.tar.gz  bg-tip-282.tar.bz2  ferrieux8 years
bg_tip_282bg_tip_282.zip  bg_tip_282.tar.gz  bg_tip_282.tar.bz2  8 years
mistakemistake.zip  mistake.tar.gz  mistake.tar.bz2  8 years
tip_456tip_456.zip  tip_456.tar.gz  tip_456.tar.bz2  8 years
tip-456tip-456.zip  tip-456.tar.gz  tip-456.tar.bz2  jan.nijtmans8 years
core_8_6_6core_8_6_6.zip  core_8_6_6.tar.gz  core_8_6_6.tar.bz2  8 years
core-8-6-6core-8-6-6.zip  core-8-6-6.tar.gz  core-8-6-6.tar.bz2  dgp8 years
minor_changeminor_change.zip  minor_change.tar.gz  minor_change.tar.bz2  8 years
bug-3154ea2759bug-3154ea2759.zip  bug-3154ea2759.tar.gz  bug-3154ea2759.tar.bz2  kbk9 years
bug_3154ea2759bug_3154ea2759.zip  bug_3154ea2759.tar.gz  bug_3154ea2759.tar.bz2  9 years
potential_incompatibilitypotential_incompatibility.zip  potential_incompatibility.tar.gz  potential_incompatibility.tar.bz2  9 years
core_8_6_5core_8_6_5.zip  core_8_6_5.tar.gz  core_8_6_5.tar.bz2  9 years
core-8-6-5core-8-6-5.zip  core-8-6-5.tar.gz  core-8-6-5.tar.bz2  dgp9 years
gahr_bug_5f71353740gahr_bug_5f71353740.zip  gahr_bug_5f71353740.tar.gz  gahr_bug_5f71353740.tar.bz2  9 years
core_8_5_19core_8_5_19.zip  core_8_5_19.tar.gz  core_8_5_19.tar.bz2  9 years
core-8-5-19core-8-5-19.zip  core-8-5-19.tar.gz  core-8-5-19.tar.bz2  dgp9 years
tip_412tip_412.zip  tip_412.tar.gz  tip_412.tar.bz2  9 years
tip-412tip-412.zip  tip-412.tar.gz  tip-412.tar.bz2  oehhar9 years
testedtested.zip  tested.tar.gz  tested.tar.bz2  10 years
core_8_6_4core_8_6_4.zip  core_8_6_4.tar.gz  core_8_6_4.tar.bz2  10 years
core-8-6-4core-8-6-4.zip  core-8-6-4.tar.gz  core-8-6-4.tar.bz2  dgp10 years
core_8_5_18core_8_5_18.zip  core_8_5_18.tar.gz  core_8_5_18.tar.bz2  10 years
core-8-5-18core-8-5-18.zip  core-8-5-18.tar.gz  core-8-5-18.tar.bz2  dgp10 years
core_8_6_3core_8_6_3.zip  core_8_6_3.tar.gz  core_8_6_3.tar.bz2  10 years
core-8-6-3core-8-6-3.zip  core-8-6-3.tar.gz  core-8-6-3.tar.bz2  dgp10 years
core_8_5_17core_8_5_17.zip  core_8_5_17.tar.gz  core_8_5_17.tar.bz2  10 years
core-8-5-17core-8-5-17.zip  core-8-5-17.tar.gz  core-8-5-17.tar.bz2  dgp10 years
core_8_6_2core_8_6_2.zip  core_8_6_2.tar.gz  core_8_6_2.tar.bz2  10 years
rc3rc3.zip  rc3.tar.gz  rc3.tar.bz2  10 years
core-8-6-2core-8-6-2.zip  core-8-6-2.tar.gz  core-8-6-2.tar.bz2  dgp10 years
core_8_5_16core_8_5_16.zip  core_8_5_16.tar.gz  core_8_5_16.tar.bz2  10 years
core-8-5-16core-8-5-16.zip  core-8-5-16.tar.gz  core-8-5-16.tar.bz2  dgp10 years
tip_99tip_99.zip  tip_99.tar.gz  tip_99.tar.bz2  11 years
core_8_6_1core_8_6_1.zip  core_8_6_1.tar.gz  core_8_6_1.tar.bz2  11 years
core-8-6-1core-8-6-1.zip  core-8-6-1.tar.gz  core-8-6-1.tar.bz2  dgp11 years
core_8_5_15core_8_5_15.zip  core_8_5_15.tar.gz  core_8_5_15.tar.bz2  11 years
core-8-5-15core-8-5-15.zip  core-8-5-15.tar.gz  core-8-5-15.tar.bz2  dgp11 years
mig_reviewmig_review.zip  mig_review.tar.gz  mig_review.tar.bz2  11 years
mig-reviewmig-review.zip  mig-review.tar.gz  mig-review.tar.bz2  dgp11 years
core-8-4-20core-8-4-20.zip  core-8-4-20.tar.gz  core-8-4-20.tar.bz2  dgp12 years
core_8_4_20core_8_4_20.zip  core_8_4_20.tar.gz  core_8_4_20.tar.bz2  12 years
rc2rc2.zip  rc2.tar.gz  rc2.tar.bz2  12 years
core-8-5-14core-8-5-14.zip  core-8-5-14.tar.gz  core-8-5-14.tar.bz2  dgp12 years
core_8_5_14core_8_5_14.zip  core_8_5_14.tar.gz  core_8_5_14.tar.bz2  12 years
mig_retestmig_retest.zip  mig_retest.tar.gz  mig_retest.tar.bz2  12 years
mig-retestmig-retest.zip  mig-retest.tar.gz  mig-retest.tar.bz2  mig12 years
mig_no280_mistakemig_no280_mistake.zip  mig_no280_mistake.tar.gz  mig_no280_mistake.tar.bz2  12 years
mig-no280-mistakemig-no280-mistake.zip  mig-no280-mistake.tar.gz  mig-no280-mistake.tar.bz2  mig12 years
mig_alloc_reform_Z2mig_alloc_reform_Z2.zip  mig_alloc_reform_Z2.tar.gz  mig_alloc_reform_Z2.tar.bz2  12 years
mig-alloc-reform-Z2mig-alloc-reform-Z2.zip  mig-alloc-reform-Z2.tar.gz  mig-alloc-reform-Z2.tar.bz2  mig12 years
bug_3598385bug_3598385.zip  bug_3598385.tar.gz  bug_3598385.tar.bz2  12 years
bug-3598385bug-3598385.zip  bug-3598385.tar.gz  bug-3598385.tar.bz2  hypnotoad12 years
core_8_6_0core_8_6_0.zip  core_8_6_0.tar.gz  core_8_6_0.tar.bz2  12 years
core-8-6-0core-8-6-0.zip  core-8-6-0.tar.gz  core-8-6-0.tar.bz2  dgp12 years
core_8_5_13core_8_5_13.zip  core_8_5_13.tar.gz  core_8_5_13.tar.bz2  12 years
core-8-5-13core-8-5-13.zip  core-8-5-13.tar.gz  core-8-5-13.tar.bz2  dgp12 years
merge_to_trunkmerge_to_trunk.zip  merge_to_trunk.tar.gz  merge_to_trunk.tar.bz2  12 years
merge-to-trunkmerge-to-trunk.zip  merge-to-trunk.tar.gz  merge-to-trunk.tar.bz2  dkf12 years
tip_votetip_vote.zip  tip_vote.tar.gz  tip_vote.tar.bz2  12 years
tip-votetip-vote.zip  tip-vote.tar.gz  tip-vote.tar.bz2  dkf12 years
core_8_6_b3core_8_6_b3.zip  core_8_6_b3.tar.gz  core_8_6_b3.tar.bz2  12 years
core-8-6-b3core-8-6-b3.zip  core-8-6-b3.tar.gz  core-8-6-b3.tar.bz2  dgp12 years
core_8_5_12core_8_5_12.zip  core_8_5_12.tar.gz  core_8_5_12.tar.bz2  12 years
core-8-5-12core-8-5-12.zip  core-8-5-12.tar.gz  core-8-5-12.tar.bz2  dgp12 years
core_8_5_11core_8_5_11.zip  core_8_5_11.tar.gz  core_8_5_11.tar.bz2  13 years
core-8-5-11core-8-5-11.zip  core-8-5-11.tar.gz  core-8-5-11.tar.bz2  dgp13 years
core_8_6_b2core_8_6_b2.zip  core_8_6_b2.tar.gz  core_8_6_b2.tar.bz2  13 years
core-8-6-b2core-8-6-b2.zip  core-8-6-b2.tar.gz  core-8-6-b2.tar.bz2  dgp13 years
core_8_5_10core_8_5_10.zip  core_8_5_10.tar.gz  core_8_5_10.tar.bz2  13 years
core-8-5-10core-8-5-10.zip  core-8-5-10.tar.gz  core-8-5-10.tar.bz2  dgp13 years
corresponds_to_TclOO_0_6_3corresponds_to_TclOO_0_6_3.zip  corresponds_to_TclOO_0_6_3.tar.gz  corresponds_to_TclOO_0_6_3.tar.bz2  14 years
corresponds-to-TclOO-0-6-3corresponds-to-TclOO-0-6-3.zip  corresponds-to-TclOO-0-6-3.tar.gz  corresponds-to-TclOO-0-6-3.tar.bz2  dkf14 years
libtommath_merge_0_42_0libtommath_merge_0_42_0.zip  libtommath_merge_0_42_0.tar.gz  libtommath_merge_0_42_0.tar.bz2  14 years
libtommath-merge-0-42-0libtommath-merge-0-42-0.zip  libtommath-merge-0-42-0.tar.gz  libtommath-merge-0-42-0.tar.bz2  dkf14 years
Bug_3185009Bug_3185009.zip  Bug_3185009.tar.gz  Bug_3185009.tar.bz2  14 years
core_8_1_0core_8_1_0.zip  core_8_1_0.tar.gz  core_8_1_0.tar.bz2  14 years
core_8_1_1core_8_1_1.zip  core_8_1_1.tar.gz  core_8_1_1.tar.bz2  14 years
core_8_1_b3core_8_1_b3.zip  core_8_1_b3.tar.gz  core_8_1_b3.tar.bz2  14 years
core_8_4_a1core_8_4_a1.zip  core_8_4_a1.tar.gz  core_8_4_a1.tar.bz2  14 years
core_8_4_a2core_8_4_a2.zip  core_8_4_a2.tar.gz  core_8_4_a2.tar.bz2  14 years
core_8_4_a3core_8_4_a3.zip  core_8_4_a3.tar.gz  core_8_4_a3.tar.bz2  14 years
core_8_4_a4core_8_4_a4.zip  core_8_4_a4.tar.gz  core_8_4_a4.tar.bz2  14 years
core_8_4_b1core_8_4_b1.zip  core_8_4_b1.tar.gz  core_8_4_b1.tar.bz2  14 years
core_8_5_0core_8_5_0.zip  core_8_5_0.tar.gz  core_8_5_0.tar.bz2  14 years
core_8_5_1core_8_5_1.zip  core_8_5_1.tar.gz  core_8_5_1.tar.bz2  14 years
core_8_5_2core_8_5_2.zip  core_8_5_2.tar.gz  core_8_5_2.tar.bz2  14 years
core_stabilizer_mergecore_stabilizer_merge.zip  core_stabilizer_merge.tar.gz  core_stabilizer_merge.tar.bz2  14 years
dogeen_assembler_splitdogeen_assembler_split.zip  dogeen_assembler_split.tar.gz  dogeen_assembler_split.tar.bz2  14 years
macosx_8_4_premerge_2002_08_31_branchmacosx_8_4_premerge_2002_08_31_branch.zip  macosx_8_4_premerge_2002_08_31_branch.tar.gz  macosx_8_4_premerge_2002_08_31_branch.tar.bz2  14 years
macosx_premerge_6_9_02macosx_premerge_6_9_02.zip  macosx_premerge_6_9_02.tar.gz  macosx_premerge_6_9_02.tar.bz2  14 years
merge_8_3_1_io_rewrite_07_26_00merge_8_3_1_io_rewrite_07_26_00.zip  merge_8_3_1_io_rewrite_07_26_00.tar.gz  merge_8_3_1_io_rewrite_07_26_00.tar.bz2  14 years
tclpro_1_5_0tclpro_1_5_0.zip  tclpro_1_5_0.tar.gz  tclpro_1_5_0.tar.bz2  14 years
tip_257_implementation_branch_roottip_257_implementation_branch_root.zip  tip_257_implementation_branch_root.tar.gz  tip_257_implementation_branch_root.tar.bz2  14 years
tip_278_branch_roottip_278_branch_root.zip  tip_278_branch_root.tar.gz  tip_278_branch_root.tar.bz2  14 years
core_8_0_2core_8_0_2.zip  core_8_0_2.tar.gz  core_8_0_2.tar.bz2  14 years
core_8_0_3core_8_0_3.zip  core_8_0_3.tar.gz  core_8_0_3.tar.bz2  14 years
core_8_0_4core_8_0_4.zip  core_8_0_4.tar.gz  core_8_0_4.tar.bz2  14 years
core_8_0_5core_8_0_5.zip  core_8_0_5.tar.gz  core_8_0_5.tar.bz2  14 years
core_8_0_5_basecore_8_0_5_base.zip  core_8_0_5_base.tar.gz  core_8_0_5_base.tar.bz2  14 years
core_8_1_b1core_8_1_b1.zip  core_8_1_b1.tar.gz  core_8_1_b1.tar.bz2  14 years
core_8_1_b2core_8_1_b2.zip  core_8_1_b2.tar.gz  core_8_1_b2.tar.bz2  14 years
core_8_4_0core_8_4_0.zip  core_8_4_0.tar.gz  core_8_4_0.tar.bz2  14 years
core_8_4_1core_8_4_1.zip  core_8_4_1.tar.gz  core_8_4_1.tar.bz2  14 years
core_8_4_2core_8_4_2.zip  core_8_4_2.tar.gz  core_8_4_2.tar.bz2  14 years
core_8_4_3core_8_4_3.zip  core_8_4_3.tar.gz  core_8_4_3.tar.bz2  14 years
core_8_4_4core_8_4_4.zip  core_8_4_4.tar.gz  core_8_4_4.tar.bz2  14 years
core_8_4_5core_8_4_5.zip  core_8_4_5.tar.gz  core_8_4_5.tar.bz2  14 years
core_8_4_6core_8_4_6.zip  core_8_4_6.tar.gz  core_8_4_6.tar.bz2  14 years
core_8_4_7core_8_4_7.zip  core_8_4_7.tar.gz  core_8_4_7.tar.bz2  14 years
core_8_4_8core_8_4_8.zip  core_8_4_8.tar.gz  core_8_4_8.tar.bz2  14 years
core_8_4_9core_8_4_9.zip  core_8_4_9.tar.gz  core_8_4_9.tar.bz2  14 years
core_8_6_b1core_8_6_b1.zip  core_8_6_b1.tar.gz  core_8_6_b1.tar.bz2  14 years
rmax_ipv6_mergermax_ipv6_merge.zip  rmax_ipv6_merge.tar.gz  rmax_ipv6_merge.tar.bz2  14 years
scriptics_sc_1_0_basescriptics_sc_1_0_base.zip  scriptics_sc_1_0_base.tar.gz  scriptics_sc_1_0_base.tar.bz2  14 years
scriptics_tclpro_1_2_b1scriptics_tclpro_1_2_b1.zip  scriptics_tclpro_1_2_b1.tar.gz  scriptics_tclpro_1_2_b1.tar.bz2  14 years
scriptics_tclpro_1_2_b2scriptics_tclpro_1_2_b2.zip  scriptics_tclpro_1_2_b2.tar.gz  scriptics_tclpro_1_2_b2.tar.bz2  14 years
tip_278_20061009tip_278_20061009.zip  tip_278_20061009.tar.gz  tip_278_20061009.tar.bz2  14 years
ajuba_ajuba2_2_1_baseajuba_ajuba2_2_1_base.zip  ajuba_ajuba2_2_1_base.tar.gz  ajuba_ajuba2_2_1_base.tar.bz2  14 years
core_8_0_6_basecore_8_0_6_base.zip  core_8_0_6_base.tar.gz  core_8_0_6_base.tar.bz2  14 years
core_8_1_merge_3_9_99core_8_1_merge_3_9_99.zip  core_8_1_merge_3_9_99.tar.gz  core_8_1_merge_3_9_99.tar.bz2  14 years
core_8_2_b3_basecore_8_2_b3_base.zip  core_8_2_b3_base.tar.gz  core_8_2_b3_base.tar.bz2  14 years
core_8_3_1core_8_3_1.zip  core_8_3_1.tar.gz  core_8_3_1.tar.bz2  14 years
core_8_3_2core_8_3_2.zip  core_8_3_2.tar.gz  core_8_3_2.tar.bz2  14 years
core_8_3_3core_8_3_3.zip  core_8_3_3.tar.gz  core_8_3_3.tar.bz2  14 years
core_8_3_4core_8_3_4.zip  core_8_3_4.tar.gz  core_8_3_4.tar.bz2  14 years
core_8_3_5core_8_3_5.zip  core_8_3_5.tar.gz  core_8_3_5.tar.bz2  14 years
core_8_3_b1core_8_3_b1.zip  core_8_3_b1.tar.gz  core_8_3_b1.tar.bz2  14 years
core_8_3_b2core_8_3_b2.zip  core_8_3_b2.tar.gz  core_8_3_b2.tar.bz2  14 years
core_8_6_a1core_8_6_a1.zip  core_8_6_a1.tar.gz  core_8_6_a1.tar.bz2  14 years
core_8_6_a2core_8_6_a2.zip  core_8_6_a2.tar.gz  core_8_6_a2.tar.bz2  14 years
core_8_6_a3core_8_6_a3.zip  core_8_6_a3.tar.gz  core_8_6_a3.tar.bz2  14 years
dev_stubs_merge_8_1_3_9_99dev_stubs_merge_8_1_3_9_99.zip  dev_stubs_merge_8_1_3_9_99.tar.gz  dev_stubs_merge_8_1_3_9_99.tar.bz2  14 years
dogeen_assembler_mergedogeen_assembler_merge.zip  dogeen_assembler_merge.tar.gz  dogeen_assembler_merge.tar.bz2  14 years
macosx_8_4_branchpointmacosx_8_4_branchpoint.zip  macosx_8_4_branchpoint.tar.gz  macosx_8_4_branchpoint.tar.bz2  14 years
macosx_8_4_merge_2002_08_20_trunkmacosx_8_4_merge_2002_08_20_trunk.zip  macosx_8_4_merge_2002_08_20_trunk.tar.gz  macosx_8_4_merge_2002_08_20_trunk.tar.bz2  14 years
macosx_8_4_merge_2002_08_30_trunkmacosx_8_4_merge_2002_08_30_trunk.zip  macosx_8_4_merge_2002_08_30_trunk.tar.gz  macosx_8_4_merge_2002_08_30_trunk.tar.bz2  14 years
scriptics_bc_1_0_b1scriptics_bc_1_0_b1.zip  scriptics_bc_1_0_b1.tar.gz  scriptics_bc_1_0_b1.tar.bz2  14 years
scriptics_sc_1_0scriptics_sc_1_0.zip  scriptics_sc_1_0.tar.gz  scriptics_sc_1_0.tar.bz2  14 years
scriptics_sc_1_1scriptics_sc_1_1.zip  scriptics_sc_1_1.tar.gz  scriptics_sc_1_1.tar.bz2  14 years
scriptics_sc_2_0_b2scriptics_sc_2_0_b2.zip  scriptics_sc_2_0_b2.tar.gz  scriptics_sc_2_0_b2.tar.bz2  14 years
scriptics_sc_2_0_b5scriptics_sc_2_0_b5.zip  scriptics_sc_2_0_b5.tar.gz  scriptics_sc_2_0_b5.tar.bz2  14 years
scriptics_tclpro_1_2_a1scriptics_tclpro_1_2_a1.zip  scriptics_tclpro_1_2_a1.tar.gz  scriptics_tclpro_1_2_a1.tar.bz2  14 years
tclpro_1_4_0tclpro_1_4_0.zip  tclpro_1_4_0.tar.gz  tclpro_1_4_0.tar.bz2  14 years
tclpro_1_4_1tclpro_1_4_1.zip  tclpro_1_4_1.tar.gz  tclpro_1_4_1.tar.bz2  14 years
tip_257_implementation_branch_patchpoint_20061020T1300tip_257_implementation_branch_patchpoint_20061020T1300.zip  tip_257_implementation_branch_patchpoint_20061020T1300.tar.gz  tip_257_implementation_branch_patchpoint_20061020T1300.tar.bz2  14 years
ajuba_ajuba2_2_0ajuba_ajuba2_2_0.zip  ajuba_ajuba2_2_0.tar.gz  ajuba_ajuba2_2_0.tar.bz2  14 years
core_8_1_merge_latestcore_8_1_merge_latest.zip  core_8_1_merge_latest.tar.gz  core_8_1_merge_latest.tar.bz2  14 years
core_8_2_b1core_8_2_b1.zip  core_8_2_b1.tar.gz  core_8_2_b1.tar.bz2  14 years
core_8_2_b2core_8_2_b2.zip  core_8_2_b2.tar.gz  core_8_2_b2.tar.bz2  14 years
core_8_3_0core_8_3_0.zip  core_8_3_0.tar.gz  core_8_3_0.tar.bz2  14 years
core_8_4_18core_8_4_18.zip  core_8_4_18.tar.gz  core_8_4_18.tar.bz2  14 years
core_8_4_19core_8_4_19.zip  core_8_4_19.tar.gz  core_8_4_19.tar.bz2  14 years
core_8_5_a1core_8_5_a1.zip  core_8_5_a1.tar.gz  core_8_5_a1.tar.bz2  14 years
core_8_5_a2core_8_5_a2.zip  core_8_5_a2.tar.gz  core_8_5_a2.tar.bz2  14 years
core_8_5_a3core_8_5_a3.zip  core_8_5_a3.tar.gz  core_8_5_a3.tar.bz2  14 years
core_8_5_a4core_8_5_a4.zip  core_8_5_a4.tar.gz  core_8_5_a4.tar.bz2  14 years
core_8_5_a5core_8_5_a5.zip  core_8_5_a5.tar.gz  core_8_5_a5.tar.bz2  14 years
core_8_5_a6core_8_5_a6.zip  core_8_5_a6.tar.gz  core_8_5_a6.tar.bz2  14 years
core_8_5_b1core_8_5_b1.zip  core_8_5_b1.tar.gz  core_8_5_b1.tar.bz2  14 years
core_8_5_b2core_8_5_b2.zip  core_8_5_b2.tar.gz  core_8_5_b2.tar.bz2  14 years
core_8_5_b3core_8_5_b3.zip  core_8_5_b3.tar.gz  core_8_5_b3.tar.bz2  14 years
dgp_refactor_mergedgp_refactor_merge.zip  dgp_refactor_merge.tar.gz  dgp_refactor_merge.tar.bz2  14 years
kennykb_numerics_branch_20050915kennykb_numerics_branch_20050915.zip  kennykb_numerics_branch_20050915.tar.gz  kennykb_numerics_branch_20050915.tar.bz2  14 years
kennykb_numerics_branch_20051008kennykb_numerics_branch_20051008.zip  kennykb_numerics_branch_20051008.tar.gz  kennykb_numerics_branch_20051008.tar.bz2  14 years
macosx_8_4_merge_2002_08_20_branchmacosx_8_4_merge_2002_08_20_branch.zip  macosx_8_4_merge_2002_08_20_branch.tar.gz  macosx_8_4_merge_2002_08_20_branch.tar.bz2  14 years
macosx_8_4_merge_2002_08_30_branchmacosx_8_4_merge_2002_08_30_branch.zip  macosx_8_4_merge_2002_08_30_branch.tar.gz  macosx_8_4_merge_2002_08_30_branch.tar.bz2  14 years
macosx_8_4_merge_2002_08_31_trunkmacosx_8_4_merge_2002_08_31_trunk.zip  macosx_8_4_merge_2002_08_31_trunk.tar.gz  macosx_8_4_merge_2002_08_31_trunk.tar.bz2  14 years
merge_to_mainline_5_21_99merge_to_mainline_5_21_99.zip  merge_to_mainline_5_21_99.tar.gz  merge_to_mainline_5_21_99.tar.bz2  14 years
msofer_wcodes_20050611msofer_wcodes_20050611.zip  msofer_wcodes_20050611.tar.gz  msofer_wcodes_20050611.tar.bz2  14 years
msofer_wcodes_branch_20051007msofer_wcodes_branch_20051007.zip  msofer_wcodes_branch_20051007.tar.gz  msofer_wcodes_branch_20051007.tar.bz2  14 years
scriptics_sc_1_1_basescriptics_sc_1_1_base.zip  scriptics_sc_1_1_base.tar.gz  scriptics_sc_1_1_base.tar.bz2  14 years
scriptics_sc_2_0_b1scriptics_sc_2_0_b1.zip  scriptics_sc_2_0_b1.tar.gz  scriptics_sc_2_0_b1.tar.bz2  14 years
scriptics_tclpro_1_2scriptics_tclpro_1_2.zip  scriptics_tclpro_1_2.tar.gz  scriptics_tclpro_1_2.tar.bz2  14 years
scriptics_tclpro_1_3_0scriptics_tclpro_1_3_0.zip  scriptics_tclpro_1_3_0.tar.gz  scriptics_tclpro_1_3_0.tar.bz2  14 years
core_8_1_1_basecore_8_1_1_base.zip  core_8_1_1_base.tar.gz  core_8_1_1_base.tar.bz2  14 years
core_8_2_0core_8_2_0.zip  core_8_2_0.tar.gz  core_8_2_0.tar.bz2  14 years
core_8_2_1core_8_2_1.zip  core_8_2_1.tar.gz  core_8_2_1.tar.bz2  14 years
core_8_2_2core_8_2_2.zip  core_8_2_2.tar.gz  core_8_2_2.tar.bz2  14 years
core_8_2_3core_8_2_3.zip  core_8_2_3.tar.gz  core_8_2_3.tar.bz2  14 years
core_8_4_10core_8_4_10.zip  core_8_4_10.tar.gz  core_8_4_10.tar.bz2  14 years
core_8_4_11core_8_4_11.zip  core_8_4_11.tar.gz  core_8_4_11.tar.bz2  14 years
core_8_4_12core_8_4_12.zip  core_8_4_12.tar.gz  core_8_4_12.tar.bz2  14 years
core_8_4_13core_8_4_13.zip  core_8_4_13.tar.gz  core_8_4_13.tar.bz2  14 years
core_8_4_14core_8_4_14.zip  core_8_4_14.tar.gz  core_8_4_14.tar.bz2  14 years
core_8_4_15core_8_4_15.zip  core_8_4_15.tar.gz  core_8_4_15.tar.bz2  14 years
core_8_4_16core_8_4_16.zip  core_8_4_16.tar.gz  core_8_4_16.tar.bz2  14 years
core_8_4_17core_8_4_17.zip  core_8_4_17.tar.gz  core_8_4_17.tar.bz2  14 years
core_8_5_8core_8_5_8.zip  core_8_5_8.tar.gz  core_8_5_8.tar.bz2  14 years
core_8_5_9core_8_5_9.zip  core_8_5_9.tar.gz  core_8_5_9.tar.bz2  14 years
macosx_8_4_premerge_2002_08_31_trunkmacosx_8_4_premerge_2002_08_31_trunk.zip  macosx_8_4_premerge_2002_08_31_trunk.tar.gz  macosx_8_4_premerge_2002_08_31_trunk.tar.bz2  14 years
scriptics_sc_1_1_b1scriptics_sc_1_1_b1.zip  scriptics_sc_1_1_b1.tar.gz  scriptics_sc_1_1_b1.tar.bz2  14 years
scriptics_sc_2_0_fixedscriptics_sc_2_0_fixed.zip  scriptics_sc_2_0_fixed.tar.gz  scriptics_sc_2_0_fixed.tar.bz2  14 years
scriptics_tclpro_1_3_b3scriptics_tclpro_1_3_b3.zip  scriptics_tclpro_1_3_b3.tar.gz  scriptics_tclpro_1_3_b3.tar.bz2  14 years
scriptics_tclpro_1_3_b4scriptics_tclpro_1_3_b4.zip  scriptics_tclpro_1_3_b4.tar.gz  scriptics_tclpro_1_3_b4.tar.bz2  14 years
core_8_4_b2core_8_4_b2.zip  core_8_4_b2.tar.gz  core_8_4_b2.tar.bz2  14 years
core_8_5_3core_8_5_3.zip  core_8_5_3.tar.gz  core_8_5_3.tar.bz2  14 years
core_8_5_4core_8_5_4.zip  core_8_5_4.tar.gz  core_8_5_4.tar.bz2  14 years
core_8_5_5core_8_5_5.zip  core_8_5_5.tar.gz  core_8_5_5.tar.bz2  14 years
core_8_5_6core_8_5_6.zip  core_8_5_6.tar.gz  core_8_5_6.tar.bz2  14 years
core_8_5_7core_8_5_7.zip  core_8_5_7.tar.gz  core_8_5_7.tar.bz2  14 years
scriptics_tclpro_1_3_b1scriptics_tclpro_1_3_b1.zip  scriptics_tclpro_1_3_b1.tar.gz  scriptics_tclpro_1_3_b1.tar.bz2  14 years
scriptics_tclpro_1_3_b2scriptics_tclpro_1_3_b2.zip  scriptics_tclpro_1_3_b2.tar.gz  scriptics_tclpro_1_3_b2.tar.bz2  14 years
dgp-refactor-mergedgp-refactor-merge.zip  dgp-refactor-merge.tar.gz  dgp-refactor-merge.tar.bz2  cvs2fossil14 years
dogeen-assembler-mergedogeen-assembler-merge.zip  dogeen-assembler-merge.tar.gz  dogeen-assembler-merge.tar.bz2  cvs2fossil14 years
rmax-ipv6-mergermax-ipv6-merge.zip  rmax-ipv6-merge.tar.gz  rmax-ipv6-merge.tar.bz2  cvs2fossil14 years
dogeen-assembler-splitdogeen-assembler-split.zip  dogeen-assembler-split.tar.gz  dogeen-assembler-split.tar.bz2  nijtmans14 years
core-8-5-9core-8-5-9.zip  core-8-5-9.tar.gz  core-8-5-9.tar.bz2  dgp14 years
core-8-5-8core-8-5-8.zip  core-8-5-8.tar.gz  core-8-5-8.tar.bz2  dgp15 years
core-8-5-7core-8-5-7.zip  core-8-5-7.tar.gz  core-8-5-7.tar.bz2  dgp16 years
core-8-6-b1core-8-6-b1.zip  core-8-6-b1.tar.gz  core-8-6-b1.tar.bz2  dgp16 years
core-8-5-6core-8-5-6.zip  core-8-5-6.tar.gz  core-8-5-6.tar.bz2  dgp16 years
core-8-5-5core-8-5-5.zip  core-8-5-5.tar.gz  core-8-5-5.tar.bz2  dgp16 years
core-8-6-a3core-8-6-a3.zip  core-8-6-a3.tar.gz  core-8-6-a3.tar.bz2  dgp16 years
core-8-6-a2core-8-6-a2.zip  core-8-6-a2.tar.gz  core-8-6-a2.tar.bz2  dgp16 years
core-8-5-4core-8-5-4.zip  core-8-5-4.tar.gz  core-8-5-4.tar.bz2  dgp16 years
core-stabilizer-mergecore-stabilizer-merge.zip  core-stabilizer-merge.tar.gz  core-stabilizer-merge.tar.bz2  cvs2fossil16 years
core-8-5-3core-8-5-3.zip  core-8-5-3.tar.gz  core-8-5-3.tar.bz2  dgp16 years
core-8-6-a1core-8-6-a1.zip  core-8-6-a1.tar.gz  core-8-6-a1.tar.bz2  dgp16 years
core-8-4-19core-8-4-19.zip  core-8-4-19.tar.gz  core-8-4-19.tar.bz2  dgp17 years
core-8-5-2core-8-5-2.zip  core-8-5-2.tar.gz  core-8-5-2.tar.bz2  dgp17 years
core-8-4-18core-8-4-18.zip  core-8-4-18.tar.gz  core-8-4-18.tar.bz2  dgp17 years
core-8-5-1core-8-5-1.zip  core-8-5-1.tar.gz  core-8-5-1.tar.bz2  dgp17 years
core-8-4-17core-8-4-17.zip  core-8-4-17.tar.gz  core-8-4-17.tar.bz2  dgp17 years
core-8-5-0core-8-5-0.zip  core-8-5-0.tar.gz  core-8-5-0.tar.bz2  dgp17 years
core-8-5-b3core-8-5-b3.zip  core-8-5-b3.tar.gz  core-8-5-b3.tar.bz2  dgp17 years
core-8-5-b2core-8-5-b2.zip  core-8-5-b2.tar.gz  core-8-5-b2.tar.bz2  dgp17 years
core-8-5-b1core-8-5-b1.zip  core-8-5-b1.tar.gz  core-8-5-b1.tar.bz2  das17 years
core-8-4-16core-8-4-16.zip  core-8-4-16.tar.gz  core-8-4-16.tar.bz2  das17 years
core-8-4-15core-8-4-15.zip  core-8-4-15.tar.gz  core-8-4-15.tar.bz2  dgp18 years
core-8-5-a6core-8-5-a6.zip  core-8-5-a6.tar.gz  core-8-5-a6.tar.bz2  hobbs18 years
core-8-5-a5core-8-5-a5.zip  core-8-5-a5.tar.gz  core-8-5-a5.tar.bz2  cvs2fossil18 years
tip-257-implementation-branch-patchpoint-20061020T1300tip-257-implementation-branch-patchpoint-20061020T1300.zip  tip-257-implementation-branch-patchpoint-20061020T1300.tar.gz  tip-257-implementation-branch-patchpoint-20061020T1300.tar.bz2  dkf18 years
core-8-4-14core-8-4-14.zip  core-8-4-14.tar.gz  core-8-4-14.tar.bz2  dgp18 years
tip-278-20061009tip-278-20061009.zip  tip-278-20061009.tar.gz  tip-278-20061009.tar.bz2  msofer18 years
tip-278-branch-roottip-278-branch-root.zip  tip-278-branch-root.tar.gz  tip-278-branch-root.tar.bz2  patthoyts18 years
tip-257-implementation-branch-roottip-257-implementation-branch-root.zip  tip-257-implementation-branch-root.tar.gz  tip-257-implementation-branch-root.tar.bz2  cvs2fossil18 years
core-8-5-a4core-8-5-a4.zip  core-8-5-a4.tar.gz  core-8-5-a4.tar.bz2  dgp19 years
core-8-4-13core-8-4-13.zip  core-8-4-13.tar.gz  core-8-4-13.tar.bz2  dgp19 years
core-8-4-12core-8-4-12.zip  core-8-4-12.tar.gz  core-8-4-12.tar.bz2  dgp19 years
kennykb-numerics-branch-20051008kennykb-numerics-branch-20051008.zip  kennykb-numerics-branch-20051008.tar.gz  kennykb-numerics-branch-20051008.tar.bz2  hobbs19 years
msofer-wcodes-branch-20051007msofer-wcodes-branch-20051007.zip  msofer-wcodes-branch-20051007.tar.gz  msofer-wcodes-branch-20051007.tar.bz2  hobbs19 years
kennykb-numerics-branch-20050915kennykb-numerics-branch-20050915.zip  kennykb-numerics-branch-20050915.tar.gz  kennykb-numerics-branch-20050915.tar.bz2  dgp19 years
core-8-4-11core-8-4-11.zip  core-8-4-11.tar.gz  core-8-4-11.tar.bz2  dgp19 years
msofer-wcodes-20050611msofer-wcodes-20050611.zip  msofer-wcodes-20050611.tar.gz  msofer-wcodes-20050611.tar.bz2  dkf19 years
core-8-5-a3core-8-5-a3.zip  core-8-5-a3.tar.gz  core-8-5-a3.tar.bz2  hobbs20 years
core-8-4-10core-8-4-10.zip  core-8-4-10.tar.gz  core-8-4-10.tar.bz2  das20 years
core-8-5-a2core-8-5-a2.zip  core-8-5-a2.tar.gz  core-8-5-a2.tar.bz2  hobbs20 years
core-8-4-9core-8-4-9.zip  core-8-4-9.tar.gz  core-8-4-9.tar.bz2  hobbs20 years
core-8-4-8core-8-4-8.zip  core-8-4-8.tar.gz  core-8-4-8.tar.bz2  rmax20 years
core-8-4-7core-8-4-7.zip  core-8-4-7.tar.gz  core-8-4-7.tar.bz2  hobbs20 years
core-8-5-a1core-8-5-a1.zip  core-8-5-a1.tar.gz  core-8-5-a1.tar.bz2  hobbs21 years
core-8-4-6core-8-4-6.zip  core-8-4-6.tar.gz  core-8-4-6.tar.bz2  dgp21 years
core-8-4-5core-8-4-5.zip  core-8-4-5.tar.gz  core-8-4-5.tar.bz2  hobbs21 years
core-8-4-4core-8-4-4.zip  core-8-4-4.tar.gz  core-8-4-4.tar.bz2  hobbs21 years
core-8-4-3core-8-4-3.zip  core-8-4-3.tar.gz  core-8-4-3.tar.bz2  hobbs22 years
core-8-4-2core-8-4-2.zip  core-8-4-2.tar.gz  core-8-4-2.tar.bz2  das22 years
core-8-4-1core-8-4-1.zip  core-8-4-1.tar.gz  core-8-4-1.tar.bz2  hobbs22 years
core-8-3-5core-8-3-5.zip  core-8-3-5.tar.gz  core-8-3-5.tar.bz2  hobbs22 years
core-8-4-0core-8-4-0.zip  core-8-4-0.tar.gz  core-8-4-0.tar.bz2  hobbs22 years
macosx-8-4-merge-2002-08-31-trunkmacosx-8-4-merge-2002-08-31-trunk.zip  macosx-8-4-merge-2002-08-31-trunk.tar.gz  macosx-8-4-merge-2002-08-31-trunk.tar.bz2  das22 years
macosx-8-4-premerge-2002-08-31-branchmacosx-8-4-premerge-2002-08-31-branch.zip  macosx-8-4-premerge-2002-08-31-branch.tar.gz  macosx-8-4-premerge-2002-08-31-branch.tar.bz2  das22 years
macosx-8-4-merge-2002-08-30-branchmacosx-8-4-merge-2002-08-30-branch.zip  macosx-8-4-merge-2002-08-30-branch.tar.gz  macosx-8-4-merge-2002-08-30-branch.tar.bz2  das22 years
macosx-8-4-merge-2002-08-30-trunkmacosx-8-4-merge-2002-08-30-trunk.zip  macosx-8-4-merge-2002-08-30-trunk.tar.gz  macosx-8-4-merge-2002-08-30-trunk.tar.bz2  andreas_kupries22 years
macosx-8-4-premerge-2002-08-31-trunkmacosx-8-4-premerge-2002-08-31-trunk.zip  macosx-8-4-premerge-2002-08-31-trunk.tar.gz  macosx-8-4-premerge-2002-08-31-trunk.tar.bz2  andreas_kupries22 years
macosx-8-4-merge-2002-08-20-branchmacosx-8-4-merge-2002-08-20-branch.zip  macosx-8-4-merge-2002-08-20-branch.tar.gz  macosx-8-4-merge-2002-08-20-branch.tar.bz2  das22 years
macosx-8-4-merge-2002-08-20-trunkmacosx-8-4-merge-2002-08-20-trunk.zip  macosx-8-4-merge-2002-08-20-trunk.tar.gz  macosx-8-4-merge-2002-08-20-trunk.tar.bz2  dgp22 years
core-8-4-b2core-8-4-b2.zip  core-8-4-b2.tar.gz  core-8-4-b2.tar.bz2  hobbs22 years
core-8-4-b1core-8-4-b1.zip  core-8-4-b1.tar.gz  core-8-4-b1.tar.bz2  hobbs22 years
tip-99tip-99.zip  tip-99.tar.gz  tip-99.tar.bz2  vincentdarley22 years
core-8-4-a4core-8-4-a4.zip  core-8-4-a4.tar.gz  core-8-4-a4.tar.bz2  hobbs23 years
macosx-premerge-6-9-02macosx-premerge-6-9-02.zip  macosx-premerge-6-9-02.tar.gz  macosx-premerge-6-9-02.tar.bz2  das23 years
core-8-3-4core-8-3-4.zip  core-8-3-4.tar.gz  core-8-3-4.tar.bz2  hobbs23 years
macosx-8-4-branchpointmacosx-8-4-branchpoint.zip  macosx-8-4-branchpoint.tar.gz  macosx-8-4-branchpoint.tar.bz2  dgp23 years
core-8-4-a3core-8-4-a3.zip  core-8-4-a3.tar.gz  core-8-4-a3.tar.bz2  hobbs23 years
core-8-3-3core-8-3-3.zip  core-8-3-3.tar.gz  core-8-3-3.tar.bz2  hobbs24 years
core-8-4-a2core-8-4-a2.zip  core-8-4-a2.tar.gz  core-8-4-a2.tar.bz2  cvs2fossil24 years
core-8-3-2core-8-3-2.zip  core-8-3-2.tar.gz  core-8-3-2.tar.bz2  hobbs24 years
tclpro-1-4-1tclpro-1-4-1.zip  tclpro-1-4-1.tar.gz  tclpro-1-4-1.tar.bz2  hobbs24 years
tclpro-1-5-0tclpro-1-5-0.zip  tclpro-1-5-0.tar.gz  tclpro-1-5-0.tar.bz2  cvs2fossil24 years
tclpro-1-4-0tclpro-1-4-0.zip  tclpro-1-4-0.tar.gz  tclpro-1-4-0.tar.bz2  hobbs24 years
ajuba-ajuba2-2-1-baseajuba-ajuba2-2-1-base.zip  ajuba-ajuba2-2-1-base.tar.gz  ajuba-ajuba2-2-1-base.tar.bz2  cvs2fossil24 years
merge-8-3-1-io-rewrite-07-26-00merge-8-3-1-io-rewrite-07-26-00.zip  merge-8-3-1-io-rewrite-07-26-00.tar.gz  merge-8-3-1-io-rewrite-07-26-00.tar.bz2  hobbs24 years
core-8-4-a1core-8-4-a1.zip  core-8-4-a1.tar.gz  core-8-4-a1.tar.bz2  hobbs25 years
ajuba-ajuba2-2-0ajuba-ajuba2-2-0.zip  ajuba-ajuba2-2-0.tar.gz  ajuba-ajuba2-2-0.tar.bz2  cvs2fossil25 years
core-8-3-1core-8-3-1.zip  core-8-3-1.tar.gz  core-8-3-1.tar.bz2  cvs2fossil25 years
scriptics-sc-2-0-b2scriptics-sc-2-0-b2.zip  scriptics-sc-2-0-b2.tar.gz  scriptics-sc-2-0-b2.tar.bz2  cvs2fossil25 years
scriptics-sc-2-0-b5scriptics-sc-2-0-b5.zip  scriptics-sc-2-0-b5.tar.gz  scriptics-sc-2-0-b5.tar.bz2  cvs2fossil25 years
scriptics-sc-2-0-fixedscriptics-sc-2-0-fixed.zip  scriptics-sc-2-0-fixed.tar.gz  scriptics-sc-2-0-fixed.tar.bz2  cvs2fossil25 years
scriptics-sc-2-0-b1scriptics-sc-2-0-b1.zip  scriptics-sc-2-0-b1.tar.gz  scriptics-sc-2-0-b1.tar.bz2  sandeep25 years
core-8-3-0core-8-3-0.zip  core-8-3-0.tar.gz  core-8-3-0.tar.bz2  hobbs25 years
core-8-3-b2core-8-3-b2.zip  core-8-3-b2.tar.gz  core-8-3-b2.tar.bz2  hobbs25 years
core-8-3-b1core-8-3-b1.zip  core-8-3-b1.tar.gz  core-8-3-b1.tar.bz2  hobbs25 years
core-8-2-3core-8-2-3.zip  core-8-2-3.tar.gz  core-8-2-3.tar.bz2  jenn25 years
scriptics-sc-1-1scriptics-sc-1-1.zip  scriptics-sc-1-1.tar.gz  scriptics-sc-1-1.tar.bz2  jenn25 years
scriptics-sc-1-1-b1scriptics-sc-1-1-b1.zip  scriptics-sc-1-1-b1.tar.gz  scriptics-sc-1-1-b1.tar.bz2  cvs25 years
scriptics-sc-1-1-basescriptics-sc-1-1-base.zip  scriptics-sc-1-1-base.tar.gz  scriptics-sc-1-1-base.tar.bz2  cvs25 years
core-8-2-2core-8-2-2.zip  core-8-2-2.tar.gz  core-8-2-2.tar.bz2  cvs25 years
scriptics-sc-1-0scriptics-sc-1-0.zip  scriptics-sc-1-0.tar.gz  scriptics-sc-1-0.tar.bz2  cvs25 years
scriptics-sc-1-0-basescriptics-sc-1-0-base.zip  scriptics-sc-1-0-base.tar.gz  scriptics-sc-1-0-base.tar.bz2  cvs25 years
core-8-2-1core-8-2-1.zip  core-8-2-1.tar.gz  core-8-2-1.tar.bz2  hobbs25 years
scriptics-bc-1-0-b1scriptics-bc-1-0-b1.zip  scriptics-bc-1-0-b1.tar.gz  scriptics-bc-1-0-b1.tar.bz2  hobbs25 years
core-8-2-0core-8-2-0.zip  core-8-2-0.tar.gz  core-8-2-0.tar.bz2  welch25 years
scriptics-tclpro-1-3-0scriptics-tclpro-1-3-0.zip  scriptics-tclpro-1-3-0.tar.gz  scriptics-tclpro-1-3-0.tar.bz2  welch25 years
core-8-2-b3-basecore-8-2-b3-base.zip  core-8-2-b3-base.tar.gz  core-8-2-b3-base.tar.bz2  redman25 years
core-8-2-b2core-8-2-b2.zip  core-8-2-b2.tar.gz  core-8-2-b2.tar.bz2  redman25 years
scriptics-tclpro-1-3-b4scriptics-tclpro-1-3-b4.zip  scriptics-tclpro-1-3-b4.tar.gz  scriptics-tclpro-1-3-b4.tar.bz2  redman25 years
core-8-2-b1core-8-2-b1.zip  core-8-2-b1.tar.gz  core-8-2-b1.tar.bz2  cvs2fossil25 years
scriptics-tclpro-1-3-b3scriptics-tclpro-1-3-b3.zip  scriptics-tclpro-1-3-b3.tar.gz  scriptics-tclpro-1-3-b3.tar.bz2  cvs2fossil25 years
core-8-1-1core-8-1-1.zip  core-8-1-1.tar.gz  core-8-1-1.tar.bz2  stanton26 years
merge-to-mainline-5/21/99merge-to-mainline-5/21/99.zip  merge-to-mainline-5/21/99.tar.gz  merge-to-mainline-5/21/99.tar.bz2  redman26 years
scriptics-tclpro-1-3-b2scriptics-tclpro-1-3-b2.zip  scriptics-tclpro-1-3-b2.tar.gz  scriptics-tclpro-1-3-b2.tar.bz2  redman26 years
core-8-1-1-basecore-8-1-1-base.zip  core-8-1-1-base.tar.gz  core-8-1-1-base.tar.bz2  redman26 years
scriptics-tclpro-1-3-b1scriptics-tclpro-1-3-b1.zip  scriptics-tclpro-1-3-b1.tar.gz  scriptics-tclpro-1-3-b1.tar.bz2  redman26 years
core-8-1-0core-8-1-0.zip  core-8-1-0.tar.gz  core-8-1-0.tar.bz2  cvs2fossil26 years
core-8-0-6-basecore-8-0-6-base.zip  core-8-0-6-base.tar.gz  core-8-0-6-base.tar.bz2  cvs26 years
core-8-1-b3core-8-1-b3.zip  core-8-1-b3.tar.gz  core-8-1-b3.tar.bz2  cvs2fossil26 years
core-8-0-5core-8-0-5.zip  core-8-0-5.tar.gz  core-8-0-5.tar.bz2  cvs2fossil26 years
core-8-1-b2core-8-1-b2.zip  core-8-1-b2.tar.gz  core-8-1-b2.tar.bz2  cvs2fossil26 years
core-8-1-merge-latestcore-8-1-merge-latest.zip  core-8-1-merge-latest.tar.gz  core-8-1-merge-latest.tar.bz2  stanton26 years
core-8-1-merge-3/9/99core-8-1-merge-3/9/99.zip  core-8-1-merge-3/9/99.tar.gz  core-8-1-merge-3/9/99.tar.bz2  stanton26 years
dev-stubs-merge-8-1-3/9/99dev-stubs-merge-8-1-3/9/99.zip  dev-stubs-merge-8-1-3/9/99.tar.gz  dev-stubs-merge-8-1-3/9/99.tar.bz2  stanton26 years
scriptics-tclpro-1-2scriptics-tclpro-1-2.zip  scriptics-tclpro-1-2.tar.gz  scriptics-tclpro-1-2.tar.bz2  cvs2fossil26 years
scriptics-tclpro-1-2-b2scriptics-tclpro-1-2-b2.zip  scriptics-tclpro-1-2-b2.tar.gz  scriptics-tclpro-1-2-b2.tar.bz2  stanton26 years
core-8-0-5-basecore-8-0-5-base.zip  core-8-0-5-base.tar.gz  core-8-0-5-base.tar.bz2  cvs2fossil26 years
scriptics-tclpro-1-2-b1scriptics-tclpro-1-2-b1.zip  scriptics-tclpro-1-2-b1.tar.gz  scriptics-tclpro-1-2-b1.tar.bz2  welch26 years
scriptics-tclpro-1-2-a1scriptics-tclpro-1-2-a1.zip  scriptics-tclpro-1-2-a1.tar.gz  scriptics-tclpro-1-2-a1.tar.bz2  surles26 years
core-8-1-b1core-8-1-b1.zip  core-8-1-b1.tar.gz  core-8-1-b1.tar.bz2  cvs2fossil26 years
core-8-0-4core-8-0-4.zip  core-8-0-4.tar.gz  core-8-0-4.tar.bz2  cvs2fossil26 years
core-8-0-3core-8-0-3.zip  core-8-0-3.tar.gz  core-8-0-3.tar.bz2  stanton26 years
core-8-0-2core-8-0-2.zip  core-8-0-2.tar.gz  core-8-0-2.tar.bz2  cvs2fossil27 years
span>topmost); case WMATT_ZOOMED: return Tcl_NewBooleanObj(wmPtr->attributes.zoomed); case WMATT_FULLSCREEN: return Tcl_NewBooleanObj(wmPtr->attributes.fullscreen); case WMATT_TYPE: return GetNetWmType(winPtr); case _WMATT_LAST_ATTRIBUTE: /*NOTREACHED*/ break; } /*NOTREACHED*/ return NULL; } /* *---------------------------------------------------------------------- * * WmAttributesCmd -- * * This function is invoked to process the "wm attributes" Tcl command. * * Syntax: * * wm attributes $win ?-attribute ?value attribute value...?? * * Notes: * * Attributes of mapped windows are set by sending a _NET_WM_STATE * ClientMessage to the root window (see SetNetWmState). For withdrawn * windows, we keep track of the requested attribute state, and set the * _NET_WM_STATE property ourselves immediately prior to mapping the * window. * * See also: TIP#231, EWMH. * *---------------------------------------------------------------------- */ static int WmAttributesCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { int attribute = 0; if (objc == 3) { /* wm attributes $win */ Tcl_Obj *result = Tcl_NewListObj(0,0); for (attribute = 0; attribute < _WMATT_LAST_ATTRIBUTE; ++attribute) { Tcl_ListObjAppendElement(interp, result, Tcl_NewStringObj(WmAttributeNames[attribute], -1)); Tcl_ListObjAppendElement(interp, result, WmGetAttribute(winPtr, attribute)); } Tcl_SetObjResult(interp, result); return TCL_OK; } else if (objc == 4) { /* wm attributes $win -attribute */ if (Tcl_GetIndexFromObj(interp, objv[3], WmAttributeNames, "attribute", 0, &attribute) != TCL_OK) { return TCL_ERROR; } Tcl_SetObjResult(interp, WmGetAttribute(winPtr, attribute)); return TCL_OK; } else if ((objc - 3) % 2 == 0) { /* wm attributes $win -att value... */ int i; for (i = 3; i < objc; i += 2) { if (Tcl_GetIndexFromObj(interp, objv[i], WmAttributeNames, "attribute", 0, &attribute) != TCL_OK) { return TCL_ERROR; } if (WmSetAttribute(winPtr,interp,attribute,objv[i+1]) != TCL_OK) { return TCL_ERROR; } } return TCL_OK; } Tcl_WrongNumArgs(interp, 2, objv, "window ?-attribute ?value ...??"); return TCL_ERROR; } /* *---------------------------------------------------------------------- * * WmClientCmd -- * * This function is invoked to process the "wm client" Tcl command. See * the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmClientCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; const char *argv3; int length; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?name?"); return TCL_ERROR; } if (objc == 3) { if (wmPtr->clientMachine != NULL) { Tcl_SetResult(interp, wmPtr->clientMachine, TCL_STATIC); } return TCL_OK; } argv3 = Tcl_GetStringFromObj(objv[3], &length); if (argv3[0] == 0) { if (wmPtr->clientMachine != NULL) { ckfree(wmPtr->clientMachine); wmPtr->clientMachine = NULL; if (!(wmPtr->flags & WM_NEVER_MAPPED)) { XDeleteProperty(winPtr->display, wmPtr->wrapperPtr->window, Tk_InternAtom((Tk_Window) winPtr, "WM_CLIENT_MACHINE")); } } return TCL_OK; } if (wmPtr->clientMachine != NULL) { ckfree(wmPtr->clientMachine); } wmPtr->clientMachine = ckalloc(length + 1); strcpy(wmPtr->clientMachine, argv3); if (!(wmPtr->flags & WM_NEVER_MAPPED)) { XTextProperty textProp; Tcl_DString ds; Tcl_UtfToExternalDString(NULL, wmPtr->clientMachine, -1, &ds); if (XStringListToTextProperty(&(Tcl_DStringValue(&ds)), 1, &textProp) != 0) { unsigned long pid = (unsigned long) getpid(); XSetWMClientMachine(winPtr->display, wmPtr->wrapperPtr->window, &textProp); XFree((char *) textProp.value); /* * Inform the server (and more particularly any session manager) * what our process ID is. We only do this when the CLIENT_MACHINE * property is set since the spec for _NET_WM_PID requires that to * be set too. */ XChangeProperty(winPtr->display, wmPtr->wrapperPtr->window, Tk_InternAtom((Tk_Window) winPtr, "_NET_WM_PID"), XA_CARDINAL,32, PropModeReplace, (unsigned char*)&pid, 1); } Tcl_DStringFree(&ds); } return TCL_OK; } /* *---------------------------------------------------------------------- * * WmColormapwindowsCmd -- * * This function is invoked to process the "wm colormapwindows" Tcl * command. See the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmColormapwindowsCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; Window *cmapList; TkWindow *winPtr2; int count, i, windowObjc, gotToplevel; Tcl_Obj **windowObjv; char buffer[20]; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?windowList?"); return TCL_ERROR; } Tk_MakeWindowExist((Tk_Window) winPtr); if (wmPtr->wrapperPtr == NULL) { CreateWrapper(wmPtr); } if (objc == 3) { if (XGetWMColormapWindows(winPtr->display, wmPtr->wrapperPtr->window, &cmapList, &count) == 0) { return TCL_OK; } for (i = 0; i < count; i++) { if ((i == (count-1)) && (wmPtr->flags & WM_ADDED_TOPLEVEL_COLORMAP)) { break; } winPtr2 = (TkWindow *) Tk_IdToWindow(winPtr->display, cmapList[i]); if (winPtr2 == NULL) { sprintf(buffer, "0x%lx", cmapList[i]); Tcl_AppendElement(interp, buffer); } else { Tcl_AppendElement(interp, winPtr2->pathName); } } XFree((char *) cmapList); return TCL_OK; } if (Tcl_ListObjGetElements(interp, objv[3], &windowObjc, &windowObjv) != TCL_OK) { return TCL_ERROR; } cmapList = ckalloc((windowObjc+1) * sizeof(Window)); gotToplevel = 0; for (i = 0; i < windowObjc; i++) { Tk_Window mapWin; if (TkGetWindowFromObj(interp, tkwin, windowObjv[i], &mapWin) != TCL_OK) { ckfree(cmapList); return TCL_ERROR; } winPtr2 = (TkWindow *) mapWin; if (winPtr2 == winPtr) { gotToplevel = 1; } if (winPtr2->window == None) { Tk_MakeWindowExist((Tk_Window) winPtr2); } cmapList[i] = winPtr2->window; } if (!gotToplevel) { wmPtr->flags |= WM_ADDED_TOPLEVEL_COLORMAP; cmapList[windowObjc] = wmPtr->wrapperPtr->window; windowObjc++; } else { wmPtr->flags &= ~WM_ADDED_TOPLEVEL_COLORMAP; } wmPtr->flags |= WM_COLORMAPS_EXPLICIT; XSetWMColormapWindows(winPtr->display, wmPtr->wrapperPtr->window, cmapList, windowObjc); ckfree(cmapList); return TCL_OK; } /* *---------------------------------------------------------------------- * * WmCommandCmd -- * * This function is invoked to process the "wm command" Tcl command. See * the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmCommandCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; const char *argv3; int cmdArgc; const char **cmdArgv; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?value?"); return TCL_ERROR; } if (objc == 3) { if (wmPtr->cmdArgv != NULL) { char *arg = Tcl_Merge(wmPtr->cmdArgc, wmPtr->cmdArgv); Tcl_SetResult(interp, arg, TCL_DYNAMIC); } return TCL_OK; } argv3 = Tcl_GetString(objv[3]); if (argv3[0] == 0) { if (wmPtr->cmdArgv != NULL) { ckfree(wmPtr->cmdArgv); wmPtr->cmdArgv = NULL; if (!(wmPtr->flags & WM_NEVER_MAPPED)) { XDeleteProperty(winPtr->display, wmPtr->wrapperPtr->window, Tk_InternAtom((Tk_Window) winPtr, "WM_COMMAND")); } } return TCL_OK; } if (Tcl_SplitList(interp, argv3, &cmdArgc, &cmdArgv) != TCL_OK) { return TCL_ERROR; } if (wmPtr->cmdArgv != NULL) { ckfree(wmPtr->cmdArgv); } wmPtr->cmdArgc = cmdArgc; wmPtr->cmdArgv = cmdArgv; if (!(wmPtr->flags & WM_NEVER_MAPPED)) { UpdateCommand(winPtr); } return TCL_OK; } /* *---------------------------------------------------------------------- * * WmDeiconifyCmd -- * * This function is invoked to process the "wm deiconify" Tcl command. * See the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmDeiconifyCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "window"); return TCL_ERROR; } if (wmPtr->iconFor != NULL) { Tcl_AppendResult(interp, "can't deiconify ", Tcl_GetString(objv[2]), ": it is an icon for ", Tk_PathName(wmPtr->iconFor), NULL); return TCL_ERROR; } if (winPtr->flags & TK_EMBEDDED) { Tcl_AppendResult(interp, "can't deiconify ", winPtr->pathName, ": it is an embedded window", NULL); return TCL_ERROR; } wmPtr->flags &= ~WM_WITHDRAWN; TkpWmSetState(winPtr, NormalState); return TCL_OK; } /* *---------------------------------------------------------------------- * * WmFocusmodelCmd -- * * This function is invoked to process the "wm focusmodel" Tcl command. * See the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmFocusmodelCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; static const char *const optionStrings[] = { "active", "passive", NULL }; enum options { OPT_ACTIVE, OPT_PASSIVE }; int index; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?active|passive?"); return TCL_ERROR; } if (objc == 3) { Tcl_SetResult(interp, (wmPtr->hints.input ? "passive" : "active"), TCL_STATIC); return TCL_OK; } if (Tcl_GetIndexFromObj(interp, objv[3], optionStrings, "argument", 0, &index) != TCL_OK) { return TCL_ERROR; } if (index == OPT_ACTIVE) { wmPtr->hints.input = False; } else { /* OPT_PASSIVE */ wmPtr->hints.input = True; } UpdateHints(winPtr); return TCL_OK; } /* *---------------------------------------------------------------------- * * WmForgetCmd -- * * This procedure is invoked to process the "wm forget" Tcl command. See * the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmForgetCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel or Frame to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register Tk_Window frameWin = (Tk_Window) winPtr; if (Tk_IsTopLevel(frameWin)) { TkFocusJoin(winPtr); Tk_UnmapWindow(frameWin); TkWmDeadWindow(winPtr); winPtr->flags &= ~(TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED); RemapWindows(winPtr, winPtr->parentPtr); /* * Flags (above) must be cleared before calling TkMapTopFrame (below). */ TkMapTopFrame(frameWin); } else { /* * Already not managed by wm - ignore it. */ } return TCL_OK; } /* *---------------------------------------------------------------------- * * WmFrameCmd -- * * This function is invoked to process the "wm frame" Tcl command. See * the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmFrameCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; Window window; char buf[TCL_INTEGER_SPACE]; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "window"); return TCL_ERROR; } window = wmPtr->reparent; if (window == None) { window = Tk_WindowId((Tk_Window) winPtr); } sprintf(buf, "0x%x", (unsigned) window); Tcl_SetResult(interp, buf, TCL_VOLATILE); return TCL_OK; } /* *---------------------------------------------------------------------- * * WmGeometryCmd -- * * This function is invoked to process the "wm geometry" Tcl command. * See the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmGeometryCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; char xSign, ySign; int width, height; const char *argv3; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?newGeometry?"); return TCL_ERROR; } if (objc == 3) { char buf[16 + TCL_INTEGER_SPACE * 4]; xSign = (wmPtr->flags & WM_NEGATIVE_X) ? '-' : '+'; ySign = (wmPtr->flags & WM_NEGATIVE_Y) ? '-' : '+'; if (wmPtr->gridWin != NULL) { width = wmPtr->reqGridWidth + (winPtr->changes.width - winPtr->reqWidth)/wmPtr->widthInc; height = wmPtr->reqGridHeight + (winPtr->changes.height - winPtr->reqHeight)/wmPtr->heightInc; } else { width = winPtr->changes.width; height = winPtr->changes.height; } sprintf(buf, "%dx%d%c%d%c%d", width, height, xSign, wmPtr->x, ySign, wmPtr->y); Tcl_SetResult(interp, buf, TCL_VOLATILE); return TCL_OK; } argv3 = Tcl_GetString(objv[3]); if (*argv3 == '\0') { wmPtr->width = -1; wmPtr->height = -1; WmUpdateGeom(wmPtr, winPtr); return TCL_OK; } return ParseGeometry(interp, argv3, winPtr); } /* *---------------------------------------------------------------------- * * WmGridCmd -- * * This function is invoked to process the "wm grid" Tcl command. See the * user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmGridCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; int reqWidth, reqHeight, widthInc, heightInc; if ((objc != 3) && (objc != 7)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?baseWidth baseHeight widthInc heightInc?"); return TCL_ERROR; } if (objc == 3) { if (wmPtr->sizeHintsFlags & PBaseSize) { char buf[TCL_INTEGER_SPACE * 4]; sprintf(buf, "%d %d %d %d", wmPtr->reqGridWidth, wmPtr->reqGridHeight, wmPtr->widthInc, wmPtr->heightInc); Tcl_SetResult(interp, buf, TCL_VOLATILE); } return TCL_OK; } if (*Tcl_GetString(objv[3]) == '\0') { /* * Turn off gridding and reset the width and height to make sense as * ungridded numbers. */ wmPtr->sizeHintsFlags &= ~(PBaseSize|PResizeInc); if (wmPtr->width != -1) { wmPtr->width = winPtr->reqWidth + (wmPtr->width - wmPtr->reqGridWidth)*wmPtr->widthInc; wmPtr->height = winPtr->reqHeight + (wmPtr->height - wmPtr->reqGridHeight)*wmPtr->heightInc; } wmPtr->widthInc = 1; wmPtr->heightInc = 1; } else { if ((Tcl_GetIntFromObj(interp, objv[3], &reqWidth) != TCL_OK) || (Tcl_GetIntFromObj(interp, objv[4], &reqHeight) != TCL_OK) || (Tcl_GetIntFromObj(interp, objv[5], &widthInc) != TCL_OK) || (Tcl_GetIntFromObj(interp, objv[6], &heightInc) !=TCL_OK)) { return TCL_ERROR; } if (reqWidth < 0) { Tcl_SetResult(interp, "baseWidth can't be < 0", TCL_STATIC); return TCL_ERROR; } if (reqHeight < 0) { Tcl_SetResult(interp, "baseHeight can't be < 0", TCL_STATIC); return TCL_ERROR; } if (widthInc <= 0) { Tcl_SetResult(interp, "widthInc can't be <= 0", TCL_STATIC); return TCL_ERROR; } if (heightInc <= 0) { Tcl_SetResult(interp, "heightInc can't be <= 0", TCL_STATIC); return TCL_ERROR; } Tk_SetGrid((Tk_Window) winPtr, reqWidth, reqHeight, widthInc, heightInc); } wmPtr->flags |= WM_UPDATE_SIZE_HINTS; WmUpdateGeom(wmPtr, winPtr); return TCL_OK; } /* *---------------------------------------------------------------------- * * WmGroupCmd -- * * This function is invoked to process the "wm group" Tcl command. See * the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmGroupCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; Tk_Window tkwin2; WmInfo *wmPtr2; const char *argv3; int length; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?pathName?"); return TCL_ERROR; } if (objc == 3) { if (wmPtr->hints.flags & WindowGroupHint) { Tcl_SetResult(interp, wmPtr->leaderName, TCL_STATIC); } return TCL_OK; } argv3 = Tcl_GetStringFromObj(objv[3], &length); if (*argv3 == '\0') { wmPtr->hints.flags &= ~WindowGroupHint; if (wmPtr->leaderName != NULL) { ckfree(wmPtr->leaderName); } wmPtr->leaderName = NULL; } else { if (TkGetWindowFromObj(interp, tkwin, objv[3], &tkwin2) != TCL_OK) { return TCL_ERROR; } while (!Tk_TopWinHierarchy(tkwin2)) { /* * Ensure that the group leader is actually a Tk toplevel. */ tkwin2 = Tk_Parent(tkwin2); } Tk_MakeWindowExist(tkwin2); wmPtr2 = ((TkWindow *) tkwin2)->wmInfoPtr; if (wmPtr2->wrapperPtr == NULL) { CreateWrapper(wmPtr2); } if (wmPtr->leaderName != NULL) { ckfree(wmPtr->leaderName); } wmPtr->hints.window_group = Tk_WindowId(wmPtr2->wrapperPtr); wmPtr->hints.flags |= WindowGroupHint; wmPtr->leaderName = ckalloc(length + 1); strcpy(wmPtr->leaderName, argv3); } UpdateHints(winPtr); return TCL_OK; } /* *---------------------------------------------------------------------- * * WmIconbitmapCmd -- * * This function is invoked to process the "wm iconbitmap" Tcl command. * See the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmIconbitmapCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; Pixmap pixmap; const char *argv3; if ((objc < 3) || (objc > 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?bitmap?"); return TCL_ERROR; } if (objc == 3) { if (wmPtr->hints.flags & IconPixmapHint) { Tcl_SetResult(interp, (char *) Tk_NameOfBitmap(winPtr->display, wmPtr->hints.icon_pixmap), TCL_STATIC); } return TCL_OK; } argv3 = Tcl_GetString(objv[3]); if (*argv3 == '\0') { if (wmPtr->hints.icon_pixmap != None) { Tk_FreeBitmap(winPtr->display, wmPtr->hints.icon_pixmap); wmPtr->hints.icon_pixmap = None; } wmPtr->hints.flags &= ~IconPixmapHint; } else { pixmap = Tk_GetBitmap(interp, (Tk_Window) winPtr, argv3); if (pixmap == None) { return TCL_ERROR; } wmPtr->hints.icon_pixmap = pixmap; wmPtr->hints.flags |= IconPixmapHint; } UpdateHints(winPtr); return TCL_OK; } /* *---------------------------------------------------------------------- * * WmIconifyCmd -- * * This function is invoked to process the "wm iconify" Tcl command. See * the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmIconifyCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "window"); return TCL_ERROR; } if (Tk_Attributes((Tk_Window) winPtr)->override_redirect) { Tcl_AppendResult(interp, "can't iconify \"", winPtr->pathName, "\": override-redirect flag is set", NULL); return TCL_ERROR; } if (wmPtr->masterPtr != NULL) { Tcl_AppendResult(interp, "can't iconify \"", winPtr->pathName, "\": it is a transient", NULL); return TCL_ERROR; } if (wmPtr->iconFor != NULL) { Tcl_AppendResult(interp, "can't iconify ", winPtr->pathName, ": it is an icon for ", Tk_PathName(wmPtr->iconFor), NULL); return TCL_ERROR; } if (winPtr->flags & TK_EMBEDDED) { Tcl_AppendResult(interp, "can't iconify ", winPtr->pathName, ": it is an embedded window", NULL); return TCL_ERROR; } if (TkpWmSetState(winPtr, IconicState) == 0) { Tcl_SetResult(interp, "couldn't send iconify message to window manager", TCL_STATIC); return TCL_ERROR; } return TCL_OK; } /* *---------------------------------------------------------------------- * * WmIconmaskCmd -- * * This function is invoked to process the "wm iconmask" Tcl command. * See the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmIconmaskCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; Pixmap pixmap; const char *argv3; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?bitmap?"); return TCL_ERROR; } if (objc == 3) { if (wmPtr->hints.flags & IconMaskHint) { Tcl_SetResult(interp, (char *) Tk_NameOfBitmap(winPtr->display, wmPtr->hints.icon_mask), TCL_STATIC); } return TCL_OK; } argv3 = Tcl_GetString(objv[3]); if (*argv3 == '\0') { if (wmPtr->hints.icon_mask != None) { Tk_FreeBitmap(winPtr->display, wmPtr->hints.icon_mask); } wmPtr->hints.flags &= ~IconMaskHint; } else { pixmap = Tk_GetBitmap(interp, tkwin, argv3); if (pixmap == None) { return TCL_ERROR; } wmPtr->hints.icon_mask = pixmap; wmPtr->hints.flags |= IconMaskHint; } UpdateHints(winPtr); return TCL_OK; } /* *---------------------------------------------------------------------- * * WmIconnameCmd -- * * This function is invoked to process the "wm iconname" Tcl command. * See the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmIconnameCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; const char *argv3; int length; if (objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "window ?newName?"); return TCL_ERROR; } if (objc == 3) { Tcl_SetResult(interp, ((wmPtr->iconName != NULL) ? wmPtr->iconName : ""), TCL_STATIC); return TCL_OK; } else { if (wmPtr->iconName != NULL) { ckfree(wmPtr->iconName); } argv3 = Tcl_GetStringFromObj(objv[3], &length); wmPtr->iconName = ckalloc(length + 1); strcpy(wmPtr->iconName, argv3); if (!(wmPtr->flags & WM_NEVER_MAPPED)) { UpdateTitle(winPtr); } } return TCL_OK; } /* *---------------------------------------------------------------------- * * WmIconphotoCmd -- * * This function is invoked to process the "wm iconphoto" Tcl command. * See the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmIconphotoCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; Tk_PhotoHandle photo; Tk_PhotoImageBlock block; int i, size = 0, width, height, index = 0, x, y, isDefault = 0; unsigned long *iconPropertyData; if (objc < 4) { Tcl_WrongNumArgs(interp, 2, objv, "window ?-default? image1 ?image2 ...?"); return TCL_ERROR; } if (strcmp(Tcl_GetString(objv[3]), "-default") == 0) { isDefault = 1; if (objc == 4) { Tcl_WrongNumArgs(interp, 2, objv, "window ?-default? image1 ?image2 ...?"); return TCL_ERROR; } } /* * Iterate over all images to retrieve their sizes, in order to allocate a * buffer large enough to hold all images. */ for (i = 3 + isDefault; i < objc; i++) { photo = Tk_FindPhoto(interp, Tcl_GetString(objv[i])); if (photo == NULL) { Tcl_AppendResult(interp, "can't use \"", Tcl_GetString(objv[i]), "\" as iconphoto: not a photo image", NULL); return TCL_ERROR; } Tk_PhotoGetSize(photo, &width, &height); /* * We need to cardinals for width & height and one cardinal for each * image pixel. */ size += 2 + width * height; } /* * We have calculated the size of the data. Try to allocate the needed * memory space. This is an unsigned long array (despite this being twice * as much as is really needed on LP64 platforms) because that's what X * defines CARD32 arrays to use. [Bug 2902814] */ iconPropertyData = attemptckalloc(sizeof(unsigned long) * size); if (iconPropertyData == NULL) { return TCL_ERROR; } memset(iconPropertyData, 0, sizeof(unsigned long) * size); for (i = 3 + isDefault; i < objc; i++) { photo = Tk_FindPhoto(interp, Tcl_GetString(objv[i])); if (photo == NULL) { Tcl_Free((char *) iconPropertyData); return TCL_ERROR; } Tk_PhotoGetSize(photo, &width, &height); Tk_PhotoGetImage(photo, &block); /* * Each image data will be placed as an array of 32bit packed * CARDINAL, in a window property named "_NET_WM_ICON": _NET_WM_ICON * * _NET_WM_ICON CARDINAL[][2+n]/32 * * This is an array of possible icons for the client. This spec. does * not stipulate what size these icons should be, but individual * desktop environments or toolkits may do so. The Window Manager MAY * scale any of these icons to an appropriate size. * * This is an array of 32bit packed CARDINAL ARGB with high byte being * A, low byte being B. The first two cardinals are width, height. * Data is in rows, left to right and top to bottom. The data will be * endian-swapped going to the server if necessary. [Bug 2830420] * * The image data will be encoded in the iconPropertyData array. */ iconPropertyData[index++] = (unsigned long) width; iconPropertyData[index++] = (unsigned long) height; for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { register unsigned char *pixelPtr = block.pixelPtr + x*block.pixelSize + y*block.pitch; register unsigned long R, G, B, A; R = pixelPtr[block.offset[0]]; G = pixelPtr[block.offset[1]]; B = pixelPtr[block.offset[2]]; A = pixelPtr[block.offset[3]]; iconPropertyData[index++] = A<<24 | R<<16 | G<<8 | B<<0; } } } if (wmPtr->iconDataPtr != NULL) { ckfree(wmPtr->iconDataPtr); wmPtr->iconDataPtr = NULL; } if (isDefault) { if (winPtr->dispPtr->iconDataPtr != NULL) { ckfree(winPtr->dispPtr->iconDataPtr); } winPtr->dispPtr->iconDataPtr = (unsigned char *) iconPropertyData; winPtr->dispPtr->iconDataSize = size; } else { wmPtr->iconDataPtr = (unsigned char *) iconPropertyData; wmPtr->iconDataSize = size; } if (!(wmPtr->flags & WM_NEVER_MAPPED)) { UpdatePhotoIcon(winPtr); } return TCL_OK; } /* *---------------------------------------------------------------------- * * WmIconpositionCmd -- * * This function is invoked to process the "wm iconposition" Tcl command. * See the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmIconpositionCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; int x, y; if ((objc != 3) && (objc != 5)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?x y?"); return TCL_ERROR; } if (objc == 3) { if (wmPtr->hints.flags & IconPositionHint) { char buf[TCL_INTEGER_SPACE * 2]; sprintf(buf, "%d %d", wmPtr->hints.icon_x, wmPtr->hints.icon_y); Tcl_SetResult(interp, buf, TCL_VOLATILE); } return TCL_OK; } if (Tcl_GetString(objv[3])[0] == '\0') { wmPtr->hints.flags &= ~IconPositionHint; } else { if ((Tcl_GetIntFromObj(interp, objv[3], &x) != TCL_OK) || (Tcl_GetIntFromObj(interp, objv[4], &y) != TCL_OK)) { return TCL_ERROR; } wmPtr->hints.icon_x = x; wmPtr->hints.icon_y = y; wmPtr->hints.flags |= IconPositionHint; } UpdateHints(winPtr); return TCL_OK; } /* *---------------------------------------------------------------------- * * WmIconwindowCmd -- * * This function is invoked to process the "wm iconwindow" Tcl command. * See the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmIconwindowCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; Tk_Window tkwin2; WmInfo *wmPtr2; XSetWindowAttributes atts; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?pathName?"); return TCL_ERROR; } if (objc == 3) { if (wmPtr->icon != NULL) { Tcl_SetObjResult(interp, TkNewWindowObj(wmPtr->icon)); } return TCL_OK; } if (*Tcl_GetString(objv[3]) == '\0') { wmPtr->hints.flags &= ~IconWindowHint; if (wmPtr->icon != NULL) { /* * Remove the icon window relationship. In principle we should * also re-enable button events for the window, but this doesn't * work in general because the window manager is probably * selecting on them (we'll get an error if we try to re-enable * the events). So, just leave the icon window event-challenged; * the user will have to recreate it if they want button events. */ wmPtr2 = ((TkWindow *) wmPtr->icon)->wmInfoPtr; wmPtr2->iconFor = NULL; wmPtr2->withdrawn = 1; wmPtr2->hints.initial_state = WithdrawnState; } wmPtr->icon = NULL; } else { if (TkGetWindowFromObj(interp, tkwin, objv[3], &tkwin2) != TCL_OK) { return TCL_ERROR; } if (!Tk_IsTopLevel(tkwin2)) { Tcl_AppendResult(interp, "can't use ", Tcl_GetString(objv[3]), " as icon window: not at top level", NULL); return TCL_ERROR; } wmPtr2 = ((TkWindow *) tkwin2)->wmInfoPtr; if (wmPtr2->iconFor != NULL) { Tcl_AppendResult(interp, Tcl_GetString(objv[3]), " is already an icon for ", Tk_PathName(wmPtr2->iconFor), NULL); return TCL_ERROR; } if (wmPtr->icon != NULL) { WmInfo *wmPtr3 = ((TkWindow *) wmPtr->icon)->wmInfoPtr; wmPtr3->iconFor = NULL; wmPtr3->withdrawn = 1; wmPtr3->hints.initial_state = WithdrawnState; } /* * Disable button events in the icon window: some window managers * (like olvwm) want to get the events themselves, but X only allows * one application at a time to receive button events for a window. */ atts.event_mask = Tk_Attributes(tkwin2)->event_mask & ~ButtonPressMask; Tk_ChangeWindowAttributes(tkwin2, CWEventMask, &atts); Tk_MakeWindowExist(tkwin2); if (wmPtr2->wrapperPtr == NULL) { CreateWrapper(wmPtr2); } wmPtr->hints.icon_window = Tk_WindowId(wmPtr2->wrapperPtr); wmPtr->hints.flags |= IconWindowHint; wmPtr->icon = tkwin2; wmPtr2->iconFor = (Tk_Window) winPtr; if (!wmPtr2->withdrawn && !(wmPtr2->flags & WM_NEVER_MAPPED)) { wmPtr2->withdrawn = 0; if (XWithdrawWindow(Tk_Display(tkwin2), Tk_WindowId(wmPtr2->wrapperPtr), Tk_ScreenNumber(tkwin2)) == 0) { Tcl_SetResult(interp, "couldn't send withdraw message to window manager", TCL_STATIC); return TCL_ERROR; } WaitForMapNotify((TkWindow *) tkwin2, 0); } } UpdateHints(winPtr); return TCL_OK; } /* *---------------------------------------------------------------------- * * WmManageCmd -- * * This procedure is invoked to process the "wm manage" Tcl command. See * the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmManageCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel or Frame to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register Tk_Window frameWin = (Tk_Window) winPtr; register WmInfo *wmPtr = winPtr->wmInfoPtr; if (!Tk_IsTopLevel(frameWin)) { if (!Tk_IsManageable(frameWin)) { Tcl_AppendResult(interp, "window \"", Tk_PathName(frameWin), "\" is not manageable: must be a frame, labelframe or " "toplevel", NULL); return TCL_ERROR; } TkFocusSplit(winPtr); Tk_UnmapWindow(frameWin); winPtr->flags |= TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED; if (wmPtr == NULL) { TkWmNewWindow(winPtr); TkWmMapWindow(winPtr); Tk_UnmapWindow(frameWin); } wmPtr = winPtr->wmInfoPtr; winPtr->flags &= ~TK_MAPPED; RemapWindows(winPtr, wmPtr->wrapperPtr); /* * Flags (above) must be set before calling TkMapTopFrame (below). */ TkMapTopFrame(frameWin); } else if (Tk_IsTopLevel(frameWin)) { /* * Already managed by wm - ignore it. */ } return TCL_OK; } /* *---------------------------------------------------------------------- * * WmMaxsizeCmd -- * * This function is invoked to process the "wm maxsize" Tcl command. See * the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmMaxsizeCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; int width, height; if ((objc != 3) && (objc != 5)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?width height?"); return TCL_ERROR; } if (objc == 3) { char buf[TCL_INTEGER_SPACE * 2]; GetMaxSize(wmPtr, &width, &height); sprintf(buf, "%d %d", width, height); Tcl_SetResult(interp, buf, TCL_VOLATILE); return TCL_OK; } if ((Tcl_GetIntFromObj(interp, objv[3], &width) != TCL_OK) || (Tcl_GetIntFromObj(interp, objv[4], &height) != TCL_OK)) { return TCL_ERROR; } wmPtr->maxWidth = width; wmPtr->maxHeight = height; wmPtr->flags |= WM_UPDATE_SIZE_HINTS; if (width <= 0 && height <= 0) { wmPtr->sizeHintsFlags &= ~PMaxSize; } else { wmPtr->sizeHintsFlags |= PMaxSize; } WmUpdateGeom(wmPtr, winPtr); return TCL_OK; } /* *---------------------------------------------------------------------- * * WmMinsizeCmd -- * * This function is invoked to process the "wm minsize" Tcl command. See * the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmMinsizeCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; int width, height; if ((objc != 3) && (objc != 5)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?width height?"); return TCL_ERROR; } if (objc == 3) { char buf[TCL_INTEGER_SPACE * 2]; sprintf(buf, "%d %d", wmPtr->minWidth, wmPtr->minHeight); Tcl_SetResult(interp, buf, TCL_VOLATILE); return TCL_OK; } if ((Tcl_GetIntFromObj(interp, objv[3], &width) != TCL_OK) || (Tcl_GetIntFromObj(interp, objv[4], &height) != TCL_OK)) { return TCL_ERROR; } wmPtr->minWidth = width; wmPtr->minHeight = height; wmPtr->flags |= WM_UPDATE_SIZE_HINTS; WmUpdateGeom(wmPtr, winPtr); return TCL_OK; } /* *---------------------------------------------------------------------- * * WmOverrideredirectCmd -- * * This function is invoked to process the "wm overrideredirect" Tcl * command. See the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmOverrideredirectCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { int boolean, curValue; XSetWindowAttributes atts; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?boolean?"); return TCL_ERROR; } curValue = Tk_Attributes((Tk_Window) winPtr)->override_redirect; if (objc == 3) { Tcl_SetObjResult(interp, Tcl_NewBooleanObj(curValue)); return TCL_OK; } if (Tcl_GetBooleanFromObj(interp, objv[3], &boolean) != TCL_OK) { return TCL_ERROR; } if (curValue != boolean) { /* * Only do this if we are really changing value, because it causes * some funky stuff to occur */ atts.override_redirect = (boolean) ? True : False; Tk_ChangeWindowAttributes((Tk_Window) winPtr, CWOverrideRedirect, &atts); if (winPtr->wmInfoPtr->wrapperPtr != NULL) { Tk_ChangeWindowAttributes( (Tk_Window) winPtr->wmInfoPtr->wrapperPtr, CWOverrideRedirect, &atts); } } return TCL_OK; } /* *---------------------------------------------------------------------- * * WmPositionfromCmd -- * * This function is invoked to process the "wm positionfrom" Tcl command. * See the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmPositionfromCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; static const char *const optionStrings[] = { "program", "user", NULL }; enum options { OPT_PROGRAM, OPT_USER }; int index; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?user/program?"); return TCL_ERROR; } if (objc == 3) { if (wmPtr->sizeHintsFlags & USPosition) { Tcl_SetResult(interp, "user", TCL_STATIC); } else if (wmPtr->sizeHintsFlags & PPosition) { Tcl_SetResult(interp, "program", TCL_STATIC); } return TCL_OK; } if (*Tcl_GetString(objv[3]) == '\0') { wmPtr->sizeHintsFlags &= ~(USPosition|PPosition); } else { if (Tcl_GetIndexFromObj(interp, objv[3], optionStrings, "argument", 0, &index) != TCL_OK) { return TCL_ERROR; } if (index == OPT_USER) { wmPtr->sizeHintsFlags &= ~PPosition; wmPtr->sizeHintsFlags |= USPosition; } else { wmPtr->sizeHintsFlags &= ~USPosition; wmPtr->sizeHintsFlags |= PPosition; } } wmPtr->flags |= WM_UPDATE_SIZE_HINTS; WmUpdateGeom(wmPtr, winPtr); return TCL_OK; } /* *---------------------------------------------------------------------- * * WmProtocolCmd -- * * This function is invoked to process the "wm protocol" Tcl command. See * the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmProtocolCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; register ProtocolHandler *protPtr, *prevPtr; Atom protocol; const char *cmd; int cmdLength; if ((objc < 3) || (objc > 5)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?name? ?command?"); return TCL_ERROR; } if (objc == 3) { /* * Return a list of all defined protocols for the window. */ for (protPtr = wmPtr->protPtr; protPtr != NULL; protPtr = protPtr->nextPtr) { Tcl_AppendElement(interp, Tk_GetAtomName((Tk_Window) winPtr, protPtr->protocol)); } return TCL_OK; } protocol = Tk_InternAtom((Tk_Window) winPtr, Tcl_GetString(objv[3])); if (objc == 4) { /* * Return the command to handle a given protocol. */ for (protPtr = wmPtr->protPtr; protPtr != NULL; protPtr = protPtr->nextPtr) { if (protPtr->protocol == protocol) { Tcl_SetResult(interp, protPtr->command, TCL_STATIC); return TCL_OK; } } return TCL_OK; } /* * Special case for _NET_WM_PING: that's always handled directly. */ if (strcmp(Tcl_GetString(objv[3]), "_NET_WM_PING") == 0) { Tcl_SetResult(interp, "may not alter handling of that protocol", TCL_STATIC); return TCL_ERROR; } /* * Delete any current protocol handler, then create a new one with the * specified command, unless the command is empty. */ for (protPtr = wmPtr->protPtr, prevPtr = NULL; protPtr != NULL; prevPtr = protPtr, protPtr = protPtr->nextPtr) { if (protPtr->protocol == protocol) { if (prevPtr == NULL) { wmPtr->protPtr = protPtr->nextPtr; } else { prevPtr->nextPtr = protPtr->nextPtr; } Tcl_EventuallyFree(protPtr, TCL_DYNAMIC); break; } } cmd = Tcl_GetStringFromObj(objv[4], &cmdLength); if (cmdLength > 0) { protPtr = ckalloc(HANDLER_SIZE(cmdLength)); protPtr->protocol = protocol; protPtr->nextPtr = wmPtr->protPtr; wmPtr->protPtr = protPtr; protPtr->interp = interp; memcpy(protPtr->command, cmd, cmdLength + 1); } if (!(wmPtr->flags & WM_NEVER_MAPPED)) { UpdateWmProtocols(wmPtr); } return TCL_OK; } /* *---------------------------------------------------------------------- * * WmResizableCmd -- * * This function is invoked to process the "wm resizable" Tcl command. * See the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmResizableCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; int width, height; if ((objc != 3) && (objc != 5)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?width height?"); return TCL_ERROR; } if (objc == 3) { char buf[TCL_INTEGER_SPACE * 2]; sprintf(buf, "%d %d", (wmPtr->flags & WM_WIDTH_NOT_RESIZABLE) ? 0 : 1, (wmPtr->flags & WM_HEIGHT_NOT_RESIZABLE) ? 0 : 1); Tcl_SetResult(interp, buf, TCL_VOLATILE); return TCL_OK; } if ((Tcl_GetBooleanFromObj(interp, objv[3], &width) != TCL_OK) || (Tcl_GetBooleanFromObj(interp, objv[4], &height) != TCL_OK)) { return TCL_ERROR; } if (width) { wmPtr->flags &= ~WM_WIDTH_NOT_RESIZABLE; } else { wmPtr->flags |= WM_WIDTH_NOT_RESIZABLE; } if (height) { wmPtr->flags &= ~WM_HEIGHT_NOT_RESIZABLE; } else { wmPtr->flags |= WM_HEIGHT_NOT_RESIZABLE; } wmPtr->flags |= WM_UPDATE_SIZE_HINTS; WmUpdateGeom(wmPtr, winPtr); return TCL_OK; } /* *---------------------------------------------------------------------- * * WmSizefromCmd -- * * This function is invoked to process the "wm sizefrom" Tcl command. See * the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmSizefromCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; static const char *const optionStrings[] = { "program", "user", NULL }; enum options { OPT_PROGRAM, OPT_USER }; int index; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?user|program?"); return TCL_ERROR; } if (objc == 3) { if (wmPtr->sizeHintsFlags & USSize) { Tcl_SetResult(interp, "user", TCL_STATIC); } else if (wmPtr->sizeHintsFlags & PSize) { Tcl_SetResult(interp, "program", TCL_STATIC); } return TCL_OK; } if (*Tcl_GetString(objv[3]) == '\0') { wmPtr->sizeHintsFlags &= ~(USSize|PSize); } else { if (Tcl_GetIndexFromObj(interp, objv[3], optionStrings, "argument", 0, &index) != TCL_OK) { return TCL_ERROR; } if (index == OPT_USER) { wmPtr->sizeHintsFlags &= ~PSize; wmPtr->sizeHintsFlags |= USSize; } else { /* OPT_PROGRAM */ wmPtr->sizeHintsFlags &= ~USSize; wmPtr->sizeHintsFlags |= PSize; } } wmPtr->flags |= WM_UPDATE_SIZE_HINTS; WmUpdateGeom(wmPtr, winPtr); return TCL_OK; } /* *---------------------------------------------------------------------- * * WmStackorderCmd -- * * This function is invoked to process the "wm stackorder" Tcl command. * See the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmStackorderCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { TkWindow **windows, **window_ptr; static const char *const optionStrings[] = { "isabove", "isbelow", NULL }; enum options { OPT_ISABOVE, OPT_ISBELOW }; int index; if ((objc != 3) && (objc != 5)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?isabove|isbelow window?"); return TCL_ERROR; } if (objc == 3) { windows = TkWmStackorderToplevel(winPtr); if (windows != NULL) { /* ASSERT: true [Bug 1789819]*/ for (window_ptr = windows; *window_ptr ; window_ptr++) { Tcl_AppendElement(interp, (*window_ptr)->pathName); } ckfree(windows); return TCL_OK; } } else { Tk_Window relWin; TkWindow *winPtr2; int index1=-1, index2=-1, result; if (TkGetWindowFromObj(interp, tkwin, objv[4], &relWin) != TCL_OK) { return TCL_ERROR; } winPtr2 = (TkWindow *) relWin; if (!Tk_IsTopLevel(winPtr2)) { Tcl_AppendResult(interp, "window \"", winPtr2->pathName, "\" isn't a top-level window", NULL); return TCL_ERROR; } if (!Tk_IsMapped(winPtr)) { Tcl_AppendResult(interp, "window \"", winPtr->pathName, "\" isn't mapped", NULL); return TCL_ERROR; } if (!Tk_IsMapped(winPtr2)) { Tcl_AppendResult(interp, "window \"", winPtr2->pathName, "\" isn't mapped", NULL); return TCL_ERROR; } /* * Lookup stacking order of all toplevels that are children of "." and * find the position of winPtr and winPtr2 in the stacking order. */ windows = TkWmStackorderToplevel(winPtr->mainPtr->winPtr); if (windows == NULL) { Tcl_AppendResult(interp, "TkWmStackorderToplevel failed", NULL); return TCL_ERROR; } for (window_ptr = windows; *window_ptr ; window_ptr++) { if (*window_ptr == winPtr) { index1 = (window_ptr - windows); } if (*window_ptr == winPtr2) { index2 = (window_ptr - windows); } } /* ASSERT: index1 != -1 && index2 != -2 [Bug 1789819] */ ckfree(windows); if (Tcl_GetIndexFromObj(interp, objv[3], optionStrings, "argument", 0, &index) != TCL_OK) { return TCL_ERROR; } if (index == OPT_ISABOVE) { result = index1 > index2; } else { /* OPT_ISBELOW */ result = index1 < index2; } Tcl_SetObjResult(interp, Tcl_NewBooleanObj(result)); return TCL_OK; } return TCL_OK; } /* *---------------------------------------------------------------------- * * WmStateCmd -- * * This function is invoked to process the "wm state" Tcl command. See * the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmStateCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; static const char *const optionStrings[] = { "normal", "iconic", "withdrawn", NULL }; enum options { OPT_NORMAL, OPT_ICONIC, OPT_WITHDRAWN }; int index; if ((objc < 3) || (objc > 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?state?"); return TCL_ERROR; } if (objc == 4) { if (wmPtr->iconFor != NULL) { Tcl_AppendResult(interp, "can't change state of ", Tcl_GetString(objv[2]), ": it is an icon for ", Tk_PathName(wmPtr->iconFor), NULL); return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[3], optionStrings, "argument", 0, &index) != TCL_OK) { return TCL_ERROR; } if (index == OPT_NORMAL) { wmPtr->flags &= ~WM_WITHDRAWN; (void) TkpWmSetState(winPtr, NormalState); } else if (index == OPT_ICONIC) { if (Tk_Attributes((Tk_Window) winPtr)->override_redirect) { Tcl_AppendResult(interp, "can't iconify \"", winPtr->pathName, "\": override-redirect flag is set", NULL); return TCL_ERROR; } if (wmPtr->masterPtr != NULL) { Tcl_AppendResult(interp, "can't iconify \"", winPtr->pathName, "\": it is a transient", NULL); return TCL_ERROR; } if (TkpWmSetState(winPtr, IconicState) == 0) { Tcl_SetResult(interp, "couldn't send iconify message to window manager", TCL_STATIC); return TCL_ERROR; } } else { /* OPT_WITHDRAWN */ wmPtr->flags |= WM_WITHDRAWN; if (TkpWmSetState(winPtr, WithdrawnState) == 0) { Tcl_SetResult(interp, "couldn't send withdraw message to window manager", TCL_STATIC); return TCL_ERROR; } } } else { if (wmPtr->iconFor != NULL) { Tcl_SetResult(interp, "icon", TCL_STATIC); } else if (wmPtr->withdrawn) { Tcl_SetResult(interp, "withdrawn", TCL_STATIC); } else if (Tk_IsMapped((Tk_Window) winPtr) || ((wmPtr->flags & WM_NEVER_MAPPED) && (wmPtr->hints.initial_state == NormalState))) { Tcl_SetResult(interp, "normal", TCL_STATIC); } else { Tcl_SetResult(interp, "iconic", TCL_STATIC); } } return TCL_OK; } /* *---------------------------------------------------------------------- * * WmTitleCmd -- * * This function is invoked to process the "wm title" Tcl command. See * the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmTitleCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; const char *argv3; int length; if (objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "window ?newTitle?"); return TCL_ERROR; } if (objc == 3) { Tcl_SetResult(interp, (char *) ((wmPtr->title != NULL) ? wmPtr->title : winPtr->nameUid), TCL_STATIC); return TCL_OK; } else { if (wmPtr->title != NULL) { ckfree(wmPtr->title); } argv3 = Tcl_GetStringFromObj(objv[3], &length); wmPtr->title = ckalloc(length + 1); strcpy(wmPtr->title, argv3); if (!(wmPtr->flags & WM_NEVER_MAPPED)) { UpdateTitle(winPtr); } } return TCL_OK; } /* *---------------------------------------------------------------------- * * WmTransientCmd -- * * This function is invoked to process the "wm transient" Tcl command. * See the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmTransientCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; TkWindow *masterPtr = wmPtr->masterPtr; WmInfo *wmPtr2; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?master?"); return TCL_ERROR; } if (objc == 3) { if (masterPtr != NULL) { Tcl_SetObjResult(interp, TkNewWindowObj((Tk_Window) masterPtr)); } return TCL_OK; } if (Tcl_GetString(objv[3])[0] == '\0') { if (masterPtr != NULL) { /* * If we had a master, tell them that we aren't tied to them * anymore */ masterPtr->wmInfoPtr->numTransients--; Tk_DeleteEventHandler((Tk_Window) masterPtr, StructureNotifyMask, WmWaitMapProc, winPtr); /* * FIXME: Need a call like Win32's UpdateWrapper() so we can * recreate the wrapper and get rid of the transient window * decorations. */ } wmPtr->masterPtr = NULL; } else { Tk_Window masterWin; if (TkGetWindowFromObj(interp, tkwin, objv[3], &masterWin)!=TCL_OK) { return TCL_ERROR; } masterPtr = (TkWindow *) masterWin; while (!Tk_TopWinHierarchy(masterPtr)) { /* * Ensure that the master window is actually a Tk toplevel. */ masterPtr = masterPtr->parentPtr; } Tk_MakeWindowExist((Tk_Window) masterPtr); if (wmPtr->iconFor != NULL) { Tcl_AppendResult(interp, "can't make \"", Tcl_GetString(objv[2]), "\" a transient: it is an icon for ", Tk_PathName(wmPtr->iconFor), NULL); return TCL_ERROR; } wmPtr2 = masterPtr->wmInfoPtr; if (wmPtr2->wrapperPtr == NULL) { CreateWrapper(wmPtr2); } if (wmPtr2->iconFor != NULL) { Tcl_AppendResult(interp, "can't make \"", Tcl_GetString(objv[3]), "\" a master: it is an icon for ", Tk_PathName(wmPtr2->iconFor), NULL); return TCL_ERROR; } if (masterPtr == winPtr) { Tcl_AppendResult(interp, "can't make \"", Tk_PathName(winPtr), "\" its own master", NULL); return TCL_ERROR; } else if (masterPtr != wmPtr->masterPtr) { /* * Remove old master map/unmap binding before setting the new * master. The event handler will ensure that transient states * reflect the state of the master. */ if (wmPtr->masterPtr != NULL) { wmPtr->masterPtr->wmInfoPtr->numTransients--; Tk_DeleteEventHandler((Tk_Window) wmPtr->masterPtr, StructureNotifyMask, WmWaitMapProc, winPtr); } masterPtr->wmInfoPtr->numTransients++; Tk_CreateEventHandler((Tk_Window) masterPtr, StructureNotifyMask, WmWaitMapProc, winPtr); wmPtr->masterPtr = masterPtr; } } if (!(wmPtr->flags & WM_NEVER_MAPPED)) { if (wmPtr->masterPtr != NULL && !Tk_IsMapped(wmPtr->masterPtr)) { if (TkpWmSetState(winPtr, WithdrawnState) == 0) { Tcl_SetResult(interp, "couldn't send withdraw message to window manager", TCL_STATIC); return TCL_ERROR; } } else { if (wmPtr->masterPtr != NULL) { XSetTransientForHint(winPtr->display, wmPtr->wrapperPtr->window, wmPtr->masterPtr->wmInfoPtr->wrapperPtr->window); } else { XDeleteProperty(winPtr->display, wmPtr->wrapperPtr->window, Tk_InternAtom((Tk_Window) winPtr,"WM_TRANSIENT_FOR")); } } } return TCL_OK; } /* *---------------------------------------------------------------------- * * WmWithdrawCmd -- * * This function is invoked to process the "wm withdraw" Tcl command. See * the user documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ static int WmWithdrawCmd( Tk_Window tkwin, /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "window"); return TCL_ERROR; } if (wmPtr->iconFor != NULL) { Tcl_AppendResult(interp, "can't withdraw ", Tcl_GetString(objv[2]), ": it is an icon for ", Tk_PathName(wmPtr->iconFor), NULL); return TCL_ERROR; } wmPtr->flags |= WM_WITHDRAWN; if (TkpWmSetState(winPtr, WithdrawnState) == 0) { Tcl_SetResult(interp, "couldn't send withdraw message to window manager", TCL_STATIC); return TCL_ERROR; } return TCL_OK; } /* * Invoked by those wm subcommands that affect geometry. Schedules a geometry * update. */ static void WmUpdateGeom( WmInfo *wmPtr, TkWindow *winPtr) { if (!(wmPtr->flags & (WM_UPDATE_PENDING|WM_NEVER_MAPPED))) { Tcl_DoWhenIdle(UpdateGeometryInfo, winPtr); wmPtr->flags |= WM_UPDATE_PENDING; } } /* * Invoked when a MapNotify or UnmapNotify event is delivered for a toplevel * that is the master of a transient toplevel. */ static void WmWaitMapProc( ClientData clientData, /* Pointer to window. */ XEvent *eventPtr) /* Information about event. */ { TkWindow *winPtr = clientData; TkWindow *masterPtr = winPtr->wmInfoPtr->masterPtr; if (masterPtr == NULL) { return; } if (eventPtr->type == MapNotify) { if (!(winPtr->wmInfoPtr->flags & WM_WITHDRAWN)) { (void) TkpWmSetState(winPtr, NormalState); } } else if (eventPtr->type == UnmapNotify) { (void) TkpWmSetState(winPtr, WithdrawnState); } } /* *---------------------------------------------------------------------- * * Tk_SetGrid -- * * This function is invoked by a widget when it wishes to set a grid * coordinate system that controls the size of a top-level window. It * provides a C interface equivalent to the "wm grid" command and is * usually asscoiated with the -setgrid option. * * Results: * None. * * Side effects: * Grid-related information will be passed to the window manager, so that * the top-level window associated with tkwin will resize on even grid * units. If some other window already controls gridding for the * top-level window then this function call has no effect. * *---------------------------------------------------------------------- */ void Tk_SetGrid( Tk_Window tkwin, /* Token for window. New window mgr info will * be posted for the top-level window * associated with this window. */ int reqWidth, /* Width (in grid units) corresponding to the * requested geometry for tkwin. */ int reqHeight, /* Height (in grid units) corresponding to the * requested geometry for tkwin. */ int widthInc, int heightInc)/* Pixel increments corresponding to a change * of one grid unit. */ { TkWindow *winPtr = (TkWindow *) tkwin; register WmInfo *wmPtr; /* * Ensure widthInc and heightInc are greater than 0 */ if (widthInc <= 0) { widthInc = 1; } if (heightInc <= 0) { heightInc = 1; } /* * Find the top-level window for tkwin, plus the window manager * information. */ while (!(winPtr->flags & TK_TOP_HIERARCHY)) { winPtr = winPtr->parentPtr; if (winPtr == NULL) { /* * The window is being deleted... just skip this operation. */ return; } } wmPtr = winPtr->wmInfoPtr; if (wmPtr == NULL) { return; } if ((wmPtr->gridWin != NULL) && (wmPtr->gridWin != tkwin)) { return; } if ((wmPtr->reqGridWidth == reqWidth) && (wmPtr->reqGridHeight == reqHeight) && (wmPtr->widthInc == widthInc) && (wmPtr->heightInc == heightInc) && ((wmPtr->sizeHintsFlags & (PBaseSize|PResizeInc)) == (PBaseSize|PResizeInc))) { return; } /* * If gridding was previously off, then forget about any window size * requests made by the user or via "wm geometry": these are in pixel * units and there's no easy way to translate them to grid units since the * new requested size of the top-level window in pixels may not yet have * been registered yet (it may filter up the hierarchy in DoWhenIdle * handlers). However, if the window has never been mapped yet then just * leave the window size alone: assume that it is intended to be in grid * units but just happened to have been specified before this function was * called. */ if ((wmPtr->gridWin == NULL) && !(wmPtr->flags & WM_NEVER_MAPPED)) { wmPtr->width = -1; wmPtr->height = -1; } /* * Set the new gridding information, and start the process of passing all * of this information to the window manager. */ wmPtr->gridWin = tkwin; wmPtr->reqGridWidth = reqWidth; wmPtr->reqGridHeight = reqHeight; wmPtr->widthInc = widthInc; wmPtr->heightInc = heightInc; wmPtr->sizeHintsFlags |= PBaseSize|PResizeInc; wmPtr->flags |= WM_UPDATE_SIZE_HINTS; if (!(wmPtr->flags & (WM_UPDATE_PENDING|WM_NEVER_MAPPED))) { Tcl_DoWhenIdle(UpdateGeometryInfo, winPtr); wmPtr->flags |= WM_UPDATE_PENDING; } } /* *---------------------------------------------------------------------- * * Tk_UnsetGrid -- * * This function cancels the effect of a previous call to Tk_SetGrid. * * Results: * None. * * Side effects: * If tkwin currently controls gridding for its top-level window, * gridding is cancelled for that top-level window; if some other window * controls gridding then this function has no effect. * *---------------------------------------------------------------------- */ void Tk_UnsetGrid( Tk_Window tkwin) /* Token for window that is currently * controlling gridding. */ { TkWindow *winPtr = (TkWindow *) tkwin; register WmInfo *wmPtr; /* * Find the top-level window for tkwin, plus the window manager * information. */ while (!(winPtr->flags & TK_TOP_HIERARCHY)) { winPtr = winPtr->parentPtr; if (winPtr == NULL) { /* * The window is being deleted... just skip this operation. */ return; } } wmPtr = winPtr->wmInfoPtr; if (wmPtr == NULL) { return; } if (tkwin != wmPtr->gridWin) { return; } wmPtr->gridWin = NULL; wmPtr->sizeHintsFlags &= ~(PBaseSize|PResizeInc); if (wmPtr->width != -1) { wmPtr->width = winPtr->reqWidth + (wmPtr->width - wmPtr->reqGridWidth)*wmPtr->widthInc; wmPtr->height = winPtr->reqHeight + (wmPtr->height - wmPtr->reqGridHeight)*wmPtr->heightInc; } wmPtr->widthInc = 1; wmPtr->heightInc = 1; wmPtr->flags |= WM_UPDATE_SIZE_HINTS; if (!(wmPtr->flags & (WM_UPDATE_PENDING|WM_NEVER_MAPPED))) { Tcl_DoWhenIdle(UpdateGeometryInfo, winPtr); wmPtr->flags |= WM_UPDATE_PENDING; } } /* *---------------------------------------------------------------------- * * ConfigureEvent -- * * This function is called to handle ConfigureNotify events on wrapper * windows. * * Results: * None. * * Side effects: * Information gets updated in the WmInfo structure for the window and * the toplevel itself gets repositioned within the wrapper. * *---------------------------------------------------------------------- */ static void ConfigureEvent( WmInfo *wmPtr, /* Information about toplevel window. */ XConfigureEvent *configEventPtr) /* Event that just occurred for * wmPtr->wrapperPtr. */ { TkWindow *wrapperPtr = wmPtr->wrapperPtr; TkWindow *winPtr = wmPtr->winPtr; TkDisplay *dispPtr = wmPtr->winPtr->dispPtr; Tk_ErrorHandler handler; /* * Update size information from the event. There are a couple of tricky * points here: * * 1. If the user changed the size externally then set wmPtr->width and * wmPtr->height just as if a "wm geometry" command had been invoked * with the same information. * 2. However, if the size is changing in response to a request coming * from us (WM_SYNC_PENDING is set), then don't set wmPtr->width or * wmPtr->height if they were previously -1 (otherwise the window will * stop tracking geometry manager requests). */ if (((wrapperPtr->changes.width != configEventPtr->width) || (wrapperPtr->changes.height != configEventPtr->height)) && !(wmPtr->flags & WM_SYNC_PENDING)) { if (dispPtr->flags & TK_DISPLAY_WM_TRACING) { printf("TopLevelEventProc: user changed %s size to %dx%d\n", winPtr->pathName, configEventPtr->width, configEventPtr->height); } if ((wmPtr->width == -1) && (configEventPtr->width == winPtr->reqWidth)) { /* * Don't set external width, since the user didn't change it from * what the widgets asked for. */ } else { /* * Note: if this window is embedded then don't set the external * size, since it came from the containing application, not the * user. In this case we want to keep sending our size requests to * the containing application; if the user fixes the size of that * application then it will still percolate down to us in the * right way. */ if (!(winPtr->flags & TK_EMBEDDED)) { if (wmPtr->gridWin != NULL) { wmPtr->width = wmPtr->reqGridWidth + (configEventPtr->width - winPtr->reqWidth)/wmPtr->widthInc; if (wmPtr->width < 0) { wmPtr->width = 0; } } else { wmPtr->width = configEventPtr->width; } } } if ((wmPtr->height == -1) && (configEventPtr->height == (winPtr->reqHeight + wmPtr->menuHeight))) { /* * Don't set external height, since the user didn't change it from * what the widgets asked for. */ } else { /* * See note for wmPtr->width about not setting external size for * embedded windows. */ if (!(winPtr->flags & TK_EMBEDDED)) { if (wmPtr->gridWin != NULL) { wmPtr->height = wmPtr->reqGridHeight + (configEventPtr->height - wmPtr->menuHeight - winPtr->reqHeight)/wmPtr->heightInc; if (wmPtr->height < 0) { wmPtr->height = 0; } } else { wmPtr->height = configEventPtr->height - wmPtr->menuHeight; } } } wmPtr->configWidth = configEventPtr->width; wmPtr->configHeight = configEventPtr->height; } if (dispPtr->flags & TK_DISPLAY_WM_TRACING) { printf("ConfigureEvent: %s x = %d y = %d, width = %d, height = %d\n", winPtr->pathName, configEventPtr->x, configEventPtr->y, configEventPtr->width, configEventPtr->height); printf(" send_event = %d, serial = %ld (win %p, wrapper %p)\n", configEventPtr->send_event, configEventPtr->serial, winPtr, wrapperPtr); } wrapperPtr->changes.width = configEventPtr->width; wrapperPtr->changes.height = configEventPtr->height; wrapperPtr->changes.border_width = configEventPtr->border_width; wrapperPtr->changes.sibling = configEventPtr->above; wrapperPtr->changes.stack_mode = Above; /* * Reparenting window managers make life difficult. If the window manager * reparents a top-level window then the x and y information that comes in * events for the window is wrong: it gives the location of the window * inside its decorative parent, rather than the location of the window in * root coordinates, which is what we want. Window managers are supposed * to send synthetic events with the correct information, but ICCCM * doesn't require them to do this under all conditions, and the * information provided doesn't include everything we need here. So, the * code below maintains a bunch of information about the parent window. * If the window hasn't been reparented, we pretend that there is a parent * shrink-wrapped around the window. */ if (dispPtr->flags & TK_DISPLAY_WM_TRACING) { printf(" %s parent == %p, above %p\n", winPtr->pathName, (void *) wmPtr->reparent, (void *) configEventPtr->above); } if ((wmPtr->reparent == None) || !ComputeReparentGeometry(wmPtr)) { wmPtr->parentWidth = configEventPtr->width + 2*configEventPtr->border_width; wmPtr->parentHeight = configEventPtr->height + 2*configEventPtr->border_width; wrapperPtr->changes.x = wmPtr->x = configEventPtr->x; wrapperPtr->changes.y = wmPtr->y = configEventPtr->y; if (wmPtr->flags & WM_NEGATIVE_X) { wmPtr->x = wmPtr->vRootWidth - (wmPtr->x + wmPtr->parentWidth); } if (wmPtr->flags & WM_NEGATIVE_Y) { wmPtr->y = wmPtr->vRootHeight - (wmPtr->y + wmPtr->parentHeight); } } /* * Make sure that the toplevel and menubar are properly positioned within * the wrapper. If the menuHeight happens to be zero, we'll get a BadValue * X error that we want to ignore [Bug: 3377] */ handler = Tk_CreateErrorHandler(winPtr->display, -1, -1, -1, NULL, NULL); XMoveResizeWindow(winPtr->display, winPtr->window, 0, wmPtr->menuHeight, (unsigned) wrapperPtr->changes.width, (unsigned) (wrapperPtr->changes.height - wmPtr->menuHeight)); Tk_DeleteErrorHandler(handler); if ((wmPtr->menubar != NULL) && ((Tk_Width(wmPtr->menubar) != wrapperPtr->changes.width) || (Tk_Height(wmPtr->menubar) != wmPtr->menuHeight))) { Tk_MoveResizeWindow(wmPtr->menubar, 0, 0, wrapperPtr->changes.width, wmPtr->menuHeight); } /* * Update the coordinates in the toplevel (they should refer to the * position in root window coordinates, not the coordinates of the wrapper * window). Then synthesize a ConfigureNotify event to tell the * application about the change. */ winPtr->changes.x = wrapperPtr->changes.x; winPtr->changes.y = wrapperPtr->changes.y + wmPtr->menuHeight; winPtr->changes.width = wrapperPtr->changes.width; winPtr->changes.height = wrapperPtr->changes.height - wmPtr->menuHeight; TkDoConfigureNotify(winPtr); } /* *---------------------------------------------------------------------- * * ReparentEvent -- * * This function is called to handle ReparentNotify events on wrapper * windows. * * Results: * None. * * Side effects: * Information gets updated in the WmInfo structure for the window. * *---------------------------------------------------------------------- */ static void ReparentEvent( WmInfo *wmPtr, /* Information about toplevel window. */ XReparentEvent *reparentEventPtr) /* Event that just occurred for * wmPtr->wrapperPtr. */ { TkWindow *wrapperPtr = wmPtr->wrapperPtr; Window vRoot, ancestor, *children, dummy2, *virtualRootPtr, **vrPtrPtr; Atom actualType; int actualFormat; unsigned long numItems, bytesAfter; unsigned dummy; Tk_ErrorHandler handler; TkDisplay *dispPtr = wmPtr->winPtr->dispPtr; /* * Identify the root window for wrapperPtr. This is tricky because of * virtual root window managers like tvtwm. If the window has a property * named __SWM_ROOT or __WM_ROOT then this property gives the id for a * virtual root window that should be used instead of the root window of * the screen. */ vRoot = RootWindow(wrapperPtr->display, wrapperPtr->screenNum); wmPtr->vRoot = None; handler = Tk_CreateErrorHandler(wrapperPtr->display, -1,-1,-1, NULL,NULL); vrPtrPtr = &virtualRootPtr; /* Silence GCC warning */ if (((XGetWindowProperty(wrapperPtr->display, wrapperPtr->window, Tk_InternAtom((Tk_Window) wrapperPtr, "__WM_ROOT"), 0, (long) 1, False, XA_WINDOW, &actualType, &actualFormat, &numItems, &bytesAfter, (unsigned char **) vrPtrPtr) == Success) && (actualType == XA_WINDOW)) || ((XGetWindowProperty(wrapperPtr->display, wrapperPtr->window, Tk_InternAtom((Tk_Window) wrapperPtr, "__SWM_ROOT"), 0, (long) 1, False, XA_WINDOW, &actualType, &actualFormat, &numItems, &bytesAfter, (unsigned char **) vrPtrPtr) == Success) && (actualType == XA_WINDOW))) { if ((actualFormat == 32) && (numItems == 1)) { vRoot = wmPtr->vRoot = *virtualRootPtr; } else if (dispPtr->flags & TK_DISPLAY_WM_TRACING) { printf("%s format %d numItems %ld\n", "ReparentEvent got bogus VROOT property:", actualFormat, numItems); } XFree((char *) virtualRootPtr); } Tk_DeleteErrorHandler(handler); if (dispPtr->flags & TK_DISPLAY_WM_TRACING) { printf("ReparentEvent: %s (%p) reparented to 0x%x, vRoot = 0x%x\n", wmPtr->winPtr->pathName, wmPtr->winPtr, (unsigned) reparentEventPtr->parent, (unsigned) vRoot); } /* * Fetch correct geometry information for the new virtual root. */ UpdateVRootGeometry(wmPtr); /* * If the window's new parent is the root window, then mark it as no * longer reparented. */ if (reparentEventPtr->parent == vRoot) { noReparent: wmPtr->reparent = None; wmPtr->parentWidth = wrapperPtr->changes.width; wmPtr->parentHeight = wrapperPtr->changes.height; wmPtr->xInParent = wmPtr->yInParent = 0; wrapperPtr->changes.x = reparentEventPtr->x; wrapperPtr->changes.y = reparentEventPtr->y; wmPtr->winPtr->changes.x = reparentEventPtr->x; wmPtr->winPtr->changes.y = reparentEventPtr->y + wmPtr->menuHeight; return; } /* * Search up the window hierarchy to find the ancestor of this window that * is just below the (virtual) root. This is tricky because it's possible * that things have changed since the event was generated so that the * ancestry indicated by the event no longer exists. If this happens then * an error will occur and we just discard the event (there will be a more * up-to-date ReparentNotify event coming later). */ handler = Tk_CreateErrorHandler(wrapperPtr->display, -1,-1,-1, NULL,NULL); wmPtr->reparent = reparentEventPtr->parent; while (1) { if (XQueryTree(wrapperPtr->display, wmPtr->reparent, &dummy2, &ancestor, &children, &dummy) == 0) { Tk_DeleteErrorHandler(handler); goto noReparent; } XFree((char *) children); if ((ancestor == vRoot) || (ancestor == RootWindow(wrapperPtr->display, wrapperPtr->screenNum))) { break; } wmPtr->reparent = ancestor; } Tk_DeleteErrorHandler(handler); if (!ComputeReparentGeometry(wmPtr)) { goto noReparent; } } /* *---------------------------------------------------------------------- * * ComputeReparentGeometry -- * * This function is invoked to recompute geometry information related to * a reparented top-level window, such as the position and total size of * the parent and the position within it of the top-level window. * * Results: * The return value is 1 if everything completed successfully and 0 if an * error occurred while querying information about winPtr's parents. In * this case winPtr is marked as no longer being reparented. * * Side effects: * Geometry information in wmPtr, wmPtr->winPtr, and wmPtr->wrapperPtr * gets updated. * *---------------------------------------------------------------------- */ static int ComputeReparentGeometry( WmInfo *wmPtr) /* Information about toplevel window whose * reparent info is to be recomputed. */ { TkWindow *wrapperPtr = wmPtr->wrapperPtr; int width, height, bd; unsigned dummy; int xOffset, yOffset, x, y; Window dummy2; Status status; Tk_ErrorHandler handler; TkDisplay *dispPtr = wmPtr->winPtr->dispPtr; handler = Tk_CreateErrorHandler(wrapperPtr->display, -1,-1,-1, NULL,NULL); (void) XTranslateCoordinates(wrapperPtr->display, wrapperPtr->window, wmPtr->reparent, 0, 0, &xOffset, &yOffset, &dummy2); status = XGetGeometry(wrapperPtr->display, wmPtr->reparent, &dummy2, &x, &y, (unsigned *) &width, (unsigned *) &height, (unsigned *) &bd, &dummy); Tk_DeleteErrorHandler(handler); if (status == 0) { /* * It appears that the reparented parent went away and no-one told us. * Reset the window to indicate that it's not reparented. */ wmPtr->reparent = None; wmPtr->xInParent = wmPtr->yInParent = 0; return 0; } wmPtr->xInParent = xOffset + bd; wmPtr->yInParent = yOffset + bd; wmPtr->parentWidth = width + 2*bd; wmPtr->parentHeight = height + 2*bd; /* * Some tricky issues in updating wmPtr->x and wmPtr->y: * * 1. Don't update them if the event occurred because of something we did * (i.e. WM_SYNC_PENDING and WM_MOVE_PENDING are both set). This is * because window managers treat coords differently than Tk, and no two * window managers are alike. If the window manager moved the window * because we told it to, remember the coordinates we told it, not the * ones it actually moved it to. This allows us to move the window back to * the same coordinates later and get the same result. Without this check, * windows can "walk" across the screen under some conditions. * * 2. Don't update wmPtr->x and wmPtr->y unless wrapperPtr->changes.x or * wrapperPtr->changes.y has changed (otherwise a size change can spoof us * into thinking that the position changed too and defeat the intent of * (1) above. * * (As of 9/96 the above 2 comments appear to be stale. They're being left * in place as a reminder of what was once true (and perhaps should still * be true?)). * * 3. Ignore size changes coming from the window system if we're about to * change the size ourselves but haven't seen the event for it yet: our * size change is supposed to take priority. */ if (!(wmPtr->flags & WM_MOVE_PENDING) && ((wrapperPtr->changes.x != (x + wmPtr->xInParent)) || (wrapperPtr->changes.y != (y + wmPtr->yInParent)))) { wmPtr->x = x; if (wmPtr->flags & WM_NEGATIVE_X) { wmPtr->x = wmPtr->vRootWidth - (wmPtr->x + wmPtr->parentWidth); } wmPtr->y = y; if (wmPtr->flags & WM_NEGATIVE_Y) { wmPtr->y = wmPtr->vRootHeight - (wmPtr->y + wmPtr->parentHeight); } } wrapperPtr->changes.x = x + wmPtr->xInParent; wrapperPtr->changes.y = y + wmPtr->yInParent; if (dispPtr->flags & TK_DISPLAY_WM_TRACING) { printf("wrapperPtr %p coords %d,%d\n", wrapperPtr, wrapperPtr->changes.x, wrapperPtr->changes.y); printf(" wmPtr %p coords %d,%d, offsets %d %d\n", wmPtr, wmPtr->x, wmPtr->y, wmPtr->xInParent, wmPtr->yInParent); } return 1; } /* *---------------------------------------------------------------------- * * PropertyEvent -- * * Handle PropertyNotify events on wrapper windows. The following * properties are of interest: * * _NET_WM_STATE: * Used to keep wmPtr->attributes up to date. * *---------------------------------------------------------------------- */ static void PropertyEvent( WmInfo *wmPtr, /* Information about toplevel window. */ XPropertyEvent *eventPtr) /* PropertyNotify event structure */ { TkWindow *wrapperPtr = wmPtr->wrapperPtr; Atom _NET_WM_STATE = Tk_InternAtom((Tk_Window) wmPtr->winPtr, "_NET_WM_STATE"); if (eventPtr->atom == _NET_WM_STATE) { Atom actualType; int actualFormat; unsigned long numItems, bytesAfter; unsigned char *propertyValue = 0; long maxLength = 1024; if (XGetWindowProperty( wrapperPtr->display, wrapperPtr->window, _NET_WM_STATE, 0l, maxLength, False, XA_ATOM, &actualType, &actualFormat, &numItems, &bytesAfter, &propertyValue) == Success) { CheckNetWmState(wmPtr, (Atom *) propertyValue, (int) numItems); XFree(propertyValue); } } } /* *---------------------------------------------------------------------- * * WrapperEventProc -- * * This function is invoked by the event loop when a wrapper window is * restructured. * * Results: * None. * * Side effects: * Tk's internal data structures for the window get modified to reflect * the structural change. * *---------------------------------------------------------------------- */ static const unsigned WrapperEventMask = (StructureNotifyMask | PropertyChangeMask); static void WrapperEventProc( ClientData clientData, /* Information about toplevel window. */ XEvent *eventPtr) /* Event that just happened. */ { WmInfo *wmPtr = clientData; XEvent mapEvent; TkDisplay *dispPtr = wmPtr->winPtr->dispPtr; wmPtr->flags |= WM_VROOT_OFFSET_STALE; if (eventPtr->type == DestroyNotify) { Tk_ErrorHandler handler; if (!(wmPtr->wrapperPtr->flags & TK_ALREADY_DEAD)) { /* * A top-level window was deleted externally (e.g., by the window * manager). This is probably not a good thing, but cleanup as * best we can. The error handler is needed because * Tk_DestroyWindow will try to destroy the window, but of course * it's already gone. */ handler = Tk_CreateErrorHandler(wmPtr->winPtr->display, -1, -1, -1, NULL, NULL); Tk_DestroyWindow((Tk_Window) wmPtr->winPtr); Tk_DeleteErrorHandler(handler); } if (dispPtr->flags & TK_DISPLAY_WM_TRACING) { printf("TopLevelEventProc: %s deleted\n", wmPtr->winPtr->pathName); } } else if (eventPtr->type == ConfigureNotify) { /* * Ignore the event if the window has never been mapped yet. Such an * event occurs only in weird cases like changing the internal border * width of a top-level window, which results in a synthetic Configure * event. These events are not relevant to us, and if we process them * confusion may result (e.g. we may conclude erroneously that the * user repositioned or resized the window). */ if (!(wmPtr->flags & WM_NEVER_MAPPED)) { ConfigureEvent(wmPtr, &eventPtr->xconfigure); } } else if (eventPtr->type == MapNotify) { wmPtr->wrapperPtr->flags |= TK_MAPPED; wmPtr->winPtr->flags |= TK_MAPPED; XMapWindow(wmPtr->winPtr->display, wmPtr->winPtr->window); goto doMapEvent; } else if (eventPtr->type == UnmapNotify) { wmPtr->wrapperPtr->flags &= ~TK_MAPPED; wmPtr->winPtr->flags &= ~TK_MAPPED; XUnmapWindow(wmPtr->winPtr->display, wmPtr->winPtr->window); goto doMapEvent; } else if (eventPtr->type == ReparentNotify) { ReparentEvent(wmPtr, &eventPtr->xreparent); } else if (eventPtr->type == PropertyNotify) { PropertyEvent(wmPtr, &eventPtr->xproperty); } return; doMapEvent: mapEvent = *eventPtr; mapEvent.xmap.event = wmPtr->winPtr->window; mapEvent.xmap.window = wmPtr->winPtr->window; Tk_HandleEvent(&mapEvent); } /* *---------------------------------------------------------------------- * * TopLevelReqProc -- * * This function is invoked by the geometry manager whenever the * requested size for a top-level window is changed. * * Results: * None. * * Side effects: * Arrange for the window to be resized to satisfy the request (this * happens as a when-idle action). * *---------------------------------------------------------------------- */ /* ARGSUSED */ static void TopLevelReqProc( ClientData dummy, /* Not used. */ Tk_Window tkwin) /* Information about window. */ { TkWindow *winPtr = (TkWindow *) tkwin; WmInfo *wmPtr = winPtr->wmInfoPtr; if (wmPtr == NULL) { return; } if ((wmPtr->width >= 0) && (wmPtr->height >= 0)) { /* * Explicit dimensions have been set for this window, so we should * ignore the geometry request. It's actually important to ignore the * geometry request because, due to quirks in window managers, * invoking UpdateGeometryInfo may cause the window to move. For * example, if "wm geometry -10-20" was invoked, the window may be * positioned incorrectly the first time it appears (because we didn't * know the proper width of the window manager borders); if we invoke * UpdateGeometryInfo again, the window will be positioned correctly, * which may cause it to jump on the screen. */ return; } wmPtr->flags |= WM_UPDATE_SIZE_HINTS; if (!(wmPtr->flags & (WM_UPDATE_PENDING|WM_NEVER_MAPPED))) { Tcl_DoWhenIdle(UpdateGeometryInfo, winPtr); wmPtr->flags |= WM_UPDATE_PENDING; } /* * If the window isn't being positioned by its upper left corner then we * have to move it as well. */ if (wmPtr->flags & (WM_NEGATIVE_X | WM_NEGATIVE_Y)) { wmPtr->flags |= WM_MOVE_PENDING; } } /* *---------------------------------------------------------------------- * * UpdateGeometryInfo -- * * This function is invoked when a top-level window is first mapped, and * also as a when-idle function, to bring the geometry and/or position of * a top-level window back into line with what has been requested by the * user and/or widgets. This function doesn't return until the window * manager has responded to the geometry change. * * Results: * None. * * Side effects: * The size and location of both the toplevel window and its wrapper may * change, unless the WM prevents that from happening. * *---------------------------------------------------------------------- */ static void UpdateGeometryInfo( ClientData clientData) /* Pointer to the window's record. */ { register TkWindow *winPtr = clientData; register WmInfo *wmPtr = winPtr->wmInfoPtr; int x, y, width, height, min, max; unsigned long serial; wmPtr->flags &= ~WM_UPDATE_PENDING; /* * Compute the new size for the top-level window. See the user * documentation for details on this, but the size requested depends on * (a) the size requested internally by the window's widgets, (b) the size * requested by the user in a "wm geometry" command or via wm-based * interactive resizing (if any), (c) whether or not the window is * gridded, and (d) the current min or max size for the toplevel. Don't * permit sizes <= 0 because this upsets the X server. */ if (wmPtr->width == -1) { width = winPtr->reqWidth; } else if (wmPtr->gridWin != NULL) { width = winPtr->reqWidth + (wmPtr->width - wmPtr->reqGridWidth)*wmPtr->widthInc; } else { width = wmPtr->width; } if (width <= 0) { width = 1; } /* * Account for window max/min width */ if (wmPtr->gridWin != NULL) { min = winPtr->reqWidth + (wmPtr->minWidth - wmPtr->reqGridWidth)*wmPtr->widthInc; if (wmPtr->maxWidth > 0) { max = winPtr->reqWidth + (wmPtr->maxWidth - wmPtr->reqGridWidth)*wmPtr->widthInc; } else { max = 0; } } else { min = wmPtr->minWidth; max = wmPtr->maxWidth; } if (width < min) { width = min; } else if ((max > 0) && (width > max)) { width = max; } if (wmPtr->height == -1) { height = winPtr->reqHeight; } else if (wmPtr->gridWin != NULL) { height = winPtr->reqHeight + (wmPtr->height - wmPtr->reqGridHeight)*wmPtr->heightInc; } else { height = wmPtr->height; } if (height <= 0) { height = 1; } /* * Account for window max/min height */ if (wmPtr->gridWin != NULL) { min = winPtr->reqHeight + (wmPtr->minHeight - wmPtr->reqGridHeight)*wmPtr->heightInc; if (wmPtr->maxHeight > 0) { max = winPtr->reqHeight + (wmPtr->maxHeight - wmPtr->reqGridHeight)*wmPtr->heightInc; } else { max = 0; } } else { min = wmPtr->minHeight; max = wmPtr->maxHeight; } if (height < min) { height = min; } else if ((max > 0) && (height > max)) { height = max; } /* * Compute the new position for the upper-left pixel of the window's * decorative frame. This is tricky, because we need to include the border * widths supplied by a reparented parent in this calculation, but can't * use the parent's current overall size since that may change as a result * of this code. */ if (wmPtr->flags & WM_NEGATIVE_X) { x = wmPtr->vRootWidth - wmPtr->x - (width + (wmPtr->parentWidth - winPtr->changes.width)); } else { x = wmPtr->x; } if (wmPtr->flags & WM_NEGATIVE_Y) { y = wmPtr->vRootHeight - wmPtr->y - (height + (wmPtr->parentHeight - winPtr->changes.height)); } else { y = wmPtr->y; } /* * If the window's size is going to change and the window is supposed to * not be resizable by the user, then we have to update the size hints. * There may also be a size-hint-update request pending from somewhere * else, too. */ if (((width != winPtr->changes.width) || (height != winPtr->changes.height)) && (wmPtr->gridWin == NULL) && ((wmPtr->sizeHintsFlags & (PMinSize|PMaxSize)) == 0)) { wmPtr->flags |= WM_UPDATE_SIZE_HINTS; } if (wmPtr->flags & WM_UPDATE_SIZE_HINTS) { UpdateSizeHints(winPtr, width, height); } /* * Reconfigure the wrapper if it isn't already configured correctly. A few * tricky points: * * 1. If the window is embedded and the container is also in this process, * don't actually reconfigure the window; just pass the desired size on * to the container. Also, zero out any position information, since * embedded windows are not allowed to move. * 2. Sometimes the window manager will give us a different size than we * asked for (e.g. mwm has a minimum size for windows), so base the * size check on what we *asked for* last time, not what we got. * 3. Can't just reconfigure always, because we may not get a * ConfigureNotify event back if nothing changed, so * WaitForConfigureNotify will hang a long time. * 4. Don't move window unless a new position has been requested for it. * This is because of "features" in some window managers (e.g. twm, as * of 4/24/91) where they don't interpret coordinates according to * ICCCM. Moving a window to its current location may cause it to shift * position on the screen. */ if ((winPtr->flags & (TK_EMBEDDED|TK_BOTH_HALVES)) == (TK_EMBEDDED|TK_BOTH_HALVES)) { TkWindow *childPtr = TkpGetOtherWindow(winPtr); /* * This window is embedded and the container is also in this process, * so we don't need to do anything special about the geometry, except * to make sure that the desired size is known by the container. Also, * zero out any position information, since embedded windows are not * allowed to move. */ wmPtr->x = wmPtr->y = 0; wmPtr->flags &= ~(WM_NEGATIVE_X|WM_NEGATIVE_Y); height += wmPtr->menuHeight; if (childPtr != NULL) { Tk_GeometryRequest((Tk_Window) childPtr, width, height); } return; } serial = NextRequest(winPtr->display); height += wmPtr->menuHeight; if (wmPtr->flags & WM_MOVE_PENDING) { if ((x + wmPtr->xInParent == winPtr->changes.x) && (y+wmPtr->yInParent+wmPtr->menuHeight == winPtr->changes.y) && (width == wmPtr->wrapperPtr->changes.width) && (height == wmPtr->wrapperPtr->changes.height)) { /* * The window already has the correct geometry, so don't bother to * configure it; the X server appears to ignore these requests, so * we won't get back a ConfigureNotify and the * WaitForConfigureNotify call below will hang for a while. */ wmPtr->flags &= ~WM_MOVE_PENDING; return; } wmPtr->configWidth = width; wmPtr->configHeight = height; if (winPtr->dispPtr->flags & TK_DISPLAY_WM_TRACING) { printf("UpdateGeometryInfo moving to %d %d, resizing to %dx%d,\n", x, y, width, height); } XMoveResizeWindow(winPtr->display, wmPtr->wrapperPtr->window, x, y, (unsigned) width, (unsigned) height); } else if ((width != wmPtr->configWidth) || (height != wmPtr->configHeight)) { if ((width == wmPtr->wrapperPtr->changes.width) && (height == wmPtr->wrapperPtr->changes.height)) { /* * The window is already just the size we want, so don't bother to * configure it; the X server appears to ignore these requests, so * we won't get back a ConfigureNotify and the * WaitForConfigureNotify call below will hang for a while. */ return; } wmPtr->configWidth = width; wmPtr->configHeight = height; if (winPtr->dispPtr->flags & TK_DISPLAY_WM_TRACING) { printf("UpdateGeometryInfo resizing %p to %d x %d\n", (void *) wmPtr->wrapperPtr->window, width, height); } XResizeWindow(winPtr->display, wmPtr->wrapperPtr->window, (unsigned) width, (unsigned) height); } else if ((wmPtr->menubar != NULL) && ((Tk_Width(wmPtr->menubar) != wmPtr->wrapperPtr->changes.width) || (Tk_Height(wmPtr->menubar) != wmPtr->menuHeight))) { /* * It is possible that the window's overall size has not changed but * the menu size has. */ Tk_MoveResizeWindow(wmPtr->menubar, 0, 0, wmPtr->wrapperPtr->changes.width, wmPtr->menuHeight); XResizeWindow(winPtr->display, wmPtr->wrapperPtr->window, (unsigned) width, (unsigned) height); } else { return; } /* * Wait for the configure operation to complete. Don't need to do this, * however, if the window is about to be mapped: it will be taken care of * elsewhere. */ if (!(wmPtr->flags & WM_ABOUT_TO_MAP)) { WaitForConfigureNotify(winPtr, serial); } } /* *-------------------------------------------------------------- * * UpdateSizeHints -- * * This function is called to update the window manager's size hints * information from the information in a WmInfo structure. * * Results: * None. * * Side effects: * Properties get changed for winPtr. * *-------------------------------------------------------------- */ static void UpdateSizeHints( TkWindow *winPtr, int newWidth, int newHeight) { register WmInfo *wmPtr = winPtr->wmInfoPtr; XSizeHints *hintsPtr; int maxWidth, maxHeight; wmPtr->flags &= ~WM_UPDATE_SIZE_HINTS; hintsPtr = XAllocSizeHints(); if (hintsPtr == NULL) { return; } /* * Compute the pixel-based sizes for the various fields in the size hints * structure, based on the grid-based sizes in our structure. */ GetMaxSize(wmPtr, &maxWidth, &maxHeight); if (wmPtr->gridWin != NULL) { hintsPtr->base_width = winPtr->reqWidth - (wmPtr->reqGridWidth * wmPtr->widthInc); if (hintsPtr->base_width < 0) { hintsPtr->base_width = 0; } hintsPtr->base_height = winPtr->reqHeight + wmPtr->menuHeight - (wmPtr->reqGridHeight * wmPtr->heightInc); if (hintsPtr->base_height < 0) { hintsPtr->base_height = 0; } hintsPtr->min_width = hintsPtr->base_width + (wmPtr->minWidth * wmPtr->widthInc); hintsPtr->min_height = hintsPtr->base_height + (wmPtr->minHeight * wmPtr->heightInc); hintsPtr->max_width = hintsPtr->base_width + (maxWidth * wmPtr->widthInc); hintsPtr->max_height = hintsPtr->base_height + (maxHeight * wmPtr->heightInc); } else { hintsPtr->min_width = wmPtr->minWidth; hintsPtr->min_height = wmPtr->minHeight; hintsPtr->max_width = maxWidth; hintsPtr->max_height = maxHeight; hintsPtr->base_width = 0; hintsPtr->base_height = 0; } hintsPtr->width_inc = wmPtr->widthInc; hintsPtr->height_inc = wmPtr->heightInc; hintsPtr->min_aspect.x = wmPtr->minAspect.x; hintsPtr->min_aspect.y = wmPtr->minAspect.y; hintsPtr->max_aspect.x = wmPtr->maxAspect.x; hintsPtr->max_aspect.y = wmPtr->maxAspect.y; hintsPtr->win_gravity = wmPtr->gravity; hintsPtr->flags = wmPtr->sizeHintsFlags | PMinSize; /* * If the window isn't supposed to be resizable, then set the minimum and * maximum dimensions to be the same. */ if (wmPtr->flags & WM_WIDTH_NOT_RESIZABLE) { hintsPtr->max_width = hintsPtr->min_width = newWidth; hintsPtr->flags |= PMaxSize; } if (wmPtr->flags & WM_HEIGHT_NOT_RESIZABLE) { hintsPtr->max_height = hintsPtr->min_height = newHeight + wmPtr->menuHeight; hintsPtr->flags |= PMaxSize; } XSetWMNormalHints(winPtr->display, wmPtr->wrapperPtr->window, hintsPtr); XFree((char *) hintsPtr); } /* *-------------------------------------------------------------- * * UpdateTitle -- * * This function is called to update the window title and icon name. It * sets the ICCCM-defined properties WM_NAME and WM_ICON_NAME for older * window managers, and the freedesktop.org-defined _NET_WM_NAME and * _NET_WM_ICON_NAME properties for newer ones. The ICCCM properties are * stored in the system encoding, the newer properties are stored in * UTF-8. * * NOTE: the ICCCM specifies that WM_NAME and WM_ICON_NAME are stored in * ISO-Latin-1. Tk has historically used the default system encoding * (since 8.1). It's not clear whether this is correct or not. * * Side effects: * Properties get changed for winPtr. * *-------------------------------------------------------------- */ static void UpdateTitle( TkWindow *winPtr) { WmInfo *wmPtr = winPtr->wmInfoPtr; Atom XA_UTF8_STRING = Tk_InternAtom((Tk_Window) winPtr, "UTF8_STRING"); const char *string; Tcl_DString ds; /* * Set window title: */ string = (wmPtr->title != NULL) ? wmPtr->title : winPtr->nameUid; Tcl_UtfToExternalDString(NULL, string, -1, &ds); XStoreName(winPtr->display, wmPtr->wrapperPtr->window, Tcl_DStringValue(&ds)); Tcl_DStringFree(&ds); XChangeProperty(winPtr->display, wmPtr->wrapperPtr->window, Tk_InternAtom((Tk_Window) winPtr, "_NET_WM_NAME"), XA_UTF8_STRING, 8, PropModeReplace, (const unsigned char *) string, (signed int) strlen(string)); /* * Set icon name: */ if (wmPtr->iconName != NULL) { Tcl_UtfToExternalDString(NULL, wmPtr->iconName, -1, &ds); XSetIconName(winPtr->display, wmPtr->wrapperPtr->window, Tcl_DStringValue(&ds)); Tcl_DStringFree(&ds); XChangeProperty(winPtr->display, wmPtr->wrapperPtr->window, Tk_InternAtom((Tk_Window) winPtr, "_NET_WM_ICON_NAME"), XA_UTF8_STRING, 8, PropModeReplace, (const unsigned char *) wmPtr->iconName, (signed int) strlen(wmPtr->iconName)); } } /* *-------------------------------------------------------------- * * UpdatePhotoIcon -- * * This function is called to update the window photo icon. It sets the * EWMH-defined properties _NET_WM_ICON. * * Side effects: * Properties get changed for winPtr. * *-------------------------------------------------------------- */ static void UpdatePhotoIcon( TkWindow *winPtr) { WmInfo *wmPtr = winPtr->wmInfoPtr; unsigned char *data = wmPtr->iconDataPtr; int size = wmPtr->iconDataSize; if (data == NULL) { data = winPtr->dispPtr->iconDataPtr; size = winPtr->dispPtr->iconDataSize; } if (data != NULL) { /* * Set icon: */ XChangeProperty(winPtr->display, wmPtr->wrapperPtr->window, Tk_InternAtom((Tk_Window) winPtr, "_NET_WM_ICON"), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) data, size); } } /* *---------------------------------------------------------------------- * * SetNetWmState -- * * Sets the specified state property by sending a _NET_WM_STATE * ClientMessage to the root window. * * Preconditions: * Wrapper window must be created. * * See also: * UpdateNetWmState; EWMH spec, section _NET_WM_STATE. * *---------------------------------------------------------------------- */ #define _NET_WM_STATE_REMOVE 0l #define _NET_WM_STATE_ADD 1l #define _NET_WM_STATE_TOGGLE 2l static void SetNetWmState( TkWindow *winPtr, const char *atomName, int on) { Tk_Window tkwin = (Tk_Window) winPtr; Atom messageType = Tk_InternAtom(tkwin, "_NET_WM_STATE"); Atom action = on ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE; Atom property = Tk_InternAtom(tkwin, atomName); XEvent e; if (!winPtr->wmInfoPtr->wrapperPtr) { return; } e.xany.type = ClientMessage; e.xany.window = winPtr->wmInfoPtr->wrapperPtr->window; e.xclient.message_type = messageType; e.xclient.format = 32; e.xclient.data.l[0] = action; e.xclient.data.l[1] = property; e.xclient.data.l[2] = e.xclient.data.l[3] = e.xclient.data.l[4] = 0l; XSendEvent(winPtr->display, RootWindow(winPtr->display, winPtr->screenNum), 0, SubstructureNotifyMask|SubstructureRedirectMask, &e); } /* *---------------------------------------------------------------------- * * CheckNetWmState -- * * Updates the window attributes whenever the _NET_WM_STATE property * changes. * * Notes: * * Tk uses a single -zoomed state, while the EWMH spec supports separate * vertical and horizontal maximization. We consider the window to be * "zoomed" if _NET_WM_STATE_MAXIMIZED_VERT and * _NET_WM_STATE_MAXIMIZED_HORZ are both set. * *---------------------------------------------------------------------- */ static void CheckNetWmState( WmInfo *wmPtr, Atom *atoms, int numAtoms) { Tk_Window tkwin = (Tk_Window) wmPtr->wrapperPtr; int i; Atom _NET_WM_STATE_ABOVE = Tk_InternAtom(tkwin, "_NET_WM_STATE_ABOVE"), _NET_WM_STATE_MAXIMIZED_VERT = Tk_InternAtom(tkwin, "_NET_WM_STATE_MAXIMIZED_VERT"), _NET_WM_STATE_MAXIMIZED_HORZ = Tk_InternAtom(tkwin, "_NET_WM_STATE_MAXIMIZED_HORZ"), _NET_WM_STATE_FULLSCREEN = Tk_InternAtom(tkwin, "_NET_WM_STATE_FULLSCREEN"); wmPtr->attributes.topmost = 0; wmPtr->attributes.zoomed = 0; wmPtr->attributes.fullscreen = 0; for (i = 0; i < numAtoms; ++i) { if (atoms[i] == _NET_WM_STATE_ABOVE) { wmPtr->attributes.topmost = 1; } else if (atoms[i] == _NET_WM_STATE_MAXIMIZED_VERT) { wmPtr->attributes.zoomed |= 1; } else if (atoms[i] == _NET_WM_STATE_MAXIMIZED_HORZ) { wmPtr->attributes.zoomed |= 2; } else if (atoms[i] == _NET_WM_STATE_FULLSCREEN) { wmPtr->attributes.fullscreen = 1; } } wmPtr->attributes.zoomed = (wmPtr->attributes.zoomed == 3); return; } /* *---------------------------------------------------------------------- * * UpdateNetWmState -- * * Sets the _NET_WM_STATE property to match the requested attribute state * just prior to mapping a withdrawn window. * *---------------------------------------------------------------------- */ #define NET_WM_STATE_MAX_ATOMS 4 static void UpdateNetWmState( WmInfo *wmPtr) { Tk_Window tkwin = (Tk_Window) wmPtr->wrapperPtr; Atom atoms[NET_WM_STATE_MAX_ATOMS]; long numAtoms = 0; if (wmPtr->reqState.topmost) { atoms[numAtoms++] = Tk_InternAtom(tkwin,"_NET_WM_STATE_ABOVE"); } if (wmPtr->reqState.zoomed) { atoms[numAtoms++] = Tk_InternAtom(tkwin,"_NET_WM_STATE_MAXIMIZED_VERT"); atoms[numAtoms++] = Tk_InternAtom(tkwin,"_NET_WM_STATE_MAXIMIZED_HORZ"); } if (wmPtr->reqState.fullscreen) { atoms[numAtoms++] = Tk_InternAtom(tkwin, "_NET_WM_STATE_FULLSCREEN"); } XChangeProperty(Tk_Display(tkwin), wmPtr->wrapperPtr->window, Tk_InternAtom(tkwin, "_NET_WM_STATE"), XA_ATOM, 32, PropModeReplace, (unsigned char *) atoms, numAtoms); } /* *---------------------------------------------------------------------- * * WaitForConfigureNotify -- * * This function is invoked in order to synchronize with the window * manager. It waits for a ConfigureNotify event to arrive, signalling * that the window manager has seen an attempt on our part to move or * resize a top-level window. * * Results: * None. * * Side effects: * Delays the execution of the process until a ConfigureNotify event * arrives with serial number at least as great as serial. This is useful * for two reasons: * * 1. It's important to distinguish ConfigureNotify events that are * coming in response to a request we've made from those generated * spontaneously by the user. The reason for this is that if the user * resizes the window we take that as an order to ignore geometry * requests coming from inside the window hierarchy. If we * accidentally interpret a response to our request as a user- * initiated action, the window will stop responding to new geometry * requests. To make this distinction, (a) this function sets a flag * for TopLevelEventProc to indicate that we're waiting to sync with * the wm, and (b) all changes to the size of a top-level window are * followed by calls to this function. * 2. Races and confusion can come about if there are multiple operations * outstanding at a time (e.g. two different resizes of the top-level * window: it's hard to tell which of the ConfigureNotify events * coming back is for which request). * While waiting, some events covered by StructureNotifyMask are * processed (ConfigureNotify, MapNotify, and UnmapNotify) and all others * are deferred. * *---------------------------------------------------------------------- */ static void WaitForConfigureNotify( TkWindow *winPtr, /* Top-level window for which we want to see a * ConfigureNotify. */ unsigned long serial) /* Serial number of resize request. Want to be * sure wm has seen this. */ { WmInfo *wmPtr = winPtr->wmInfoPtr; XEvent event; int diff, code; int gotConfig = 0; /* * One more tricky detail about this function. In some cases the window * manager will decide to ignore a configure request (e.g. because it * thinks the window is already in the right place). To avoid hanging in * this situation, only wait for a few seconds, then give up. */ while (!gotConfig) { wmPtr->flags |= WM_SYNC_PENDING; code = WaitForEvent(winPtr->display, wmPtr, ConfigureNotify, &event); wmPtr->flags &= ~WM_SYNC_PENDING; if (code != TCL_OK) { if (winPtr->dispPtr->flags & TK_DISPLAY_WM_TRACING) { printf("WaitForConfigureNotify giving up on %s\n", winPtr->pathName); } break; } diff = event.xconfigure.serial - serial; if (diff >= 0) { gotConfig = 1; } } wmPtr->flags &= ~WM_MOVE_PENDING; if (winPtr->dispPtr->flags & TK_DISPLAY_WM_TRACING) { printf("WaitForConfigureNotify finished with %s, serial %ld\n", winPtr->pathName, serial); } } /* *---------------------------------------------------------------------- * * WaitForEvent -- * * This function is used by WaitForConfigureNotify and WaitForMapNotify * to wait for an event of a certain type to arrive. * * Results: * Under normal conditions, TCL_OK is returned and an event for display * and window that matches "mask" is stored in *eventPtr. This event has * already been processed by Tk before this function returns. If a long * time goes by with no event of the right type arriving, or if an error * occurs while waiting for the event to arrive, then TCL_ERROR is * returned. * * Side effects: * While waiting for the desired event to occur, Configurenotify, * MapNotify, and UnmapNotify events for window are processed, as are all * ReparentNotify events. * *---------------------------------------------------------------------- */ static int WaitForEvent( Display *display, /* Display event is coming from. */ WmInfo *wmInfoPtr, /* Window for which event is desired. */ int type, /* Type of event that is wanted. */ XEvent *eventPtr) /* Place to store event. */ { WaitRestrictInfo info; Tk_RestrictProc *prevProc; ClientData prevArg; Tcl_Time timeout; /* * Set up an event filter to select just the events we want, and a timer * handler, then wait for events until we get the event we want or a * timeout happens. */ info.display = display; info.wmInfoPtr = wmInfoPtr; info.type = type; info.eventPtr = eventPtr; info.foundEvent = 0; prevProc = Tk_RestrictEvents(WaitRestrictProc, &info, &prevArg); Tcl_GetTime(&timeout); timeout.sec += 2; while (!info.foundEvent) { if (!TkUnixDoOneXEvent(&timeout)) { break; } } Tk_RestrictEvents(prevProc, prevArg, &prevArg); if (info.foundEvent) { return TCL_OK; } return TCL_ERROR; } /* *---------------------------------------------------------------------- * * WaitRestrictProc -- * * This function is a Tk_RestrictProc that is used to filter events while * WaitForEvent is active. * * Results: * Returns TK_PROCESS_EVENT if the right event is found. Also returns * TK_PROCESS_EVENT if any ReparentNotify event is found or if the event * is a ConfigureNotify, MapNotify, or UnmapNotify for window. Otherwise * returns TK_DEFER_EVENT. * * Side effects: * An event may get stored in the area indicated by the caller of * WaitForEvent. * *---------------------------------------------------------------------- */ static Tk_RestrictAction WaitRestrictProc( ClientData clientData, /* Pointer to WaitRestrictInfo structure. */ XEvent *eventPtr) /* Event that is about to be handled. */ { WaitRestrictInfo *infoPtr = clientData; if (eventPtr->type == ReparentNotify) { return TK_PROCESS_EVENT; } if (((eventPtr->xany.window != infoPtr->wmInfoPtr->wrapperPtr->window) && (eventPtr->xany.window != infoPtr->wmInfoPtr->reparent)) || (eventPtr->xany.display != infoPtr->display)) { return TK_DEFER_EVENT; } if (eventPtr->type == infoPtr->type) { *infoPtr->eventPtr = *eventPtr; infoPtr->foundEvent = 1; return TK_PROCESS_EVENT; } if (eventPtr->type == ConfigureNotify || eventPtr->type == MapNotify || eventPtr->type == UnmapNotify) { return TK_PROCESS_EVENT; } return TK_DEFER_EVENT; } /* *---------------------------------------------------------------------- * * WaitForMapNotify -- * * This function is invoked in order to synchronize with the window * manager. It waits for the window's mapped state to reach the value * given by mapped. * * Results: * None. * * Side effects: * Delays the execution of the process until winPtr becomes mapped or * unmapped, depending on the "mapped" argument. This allows us to * synchronize with the window manager, and allows us to identify changes * in window size that come about when the window manager first starts * managing the window (as opposed to those requested interactively by * the user later). See the comments for WaitForConfigureNotify and * WM_SYNC_PENDING. While waiting, some events covered by * StructureNotifyMask are processed and all others are deferred. * *---------------------------------------------------------------------- */ static void WaitForMapNotify( TkWindow *winPtr, /* Top-level window for which we want to see a * particular mapping state. */ int mapped) /* If non-zero, wait for window to become * mapped, otherwise wait for it to become * unmapped. */ { WmInfo *wmPtr = winPtr->wmInfoPtr; XEvent event; int code; while (1) { if (mapped) { if (winPtr->flags & TK_MAPPED) { break; } } else if (!(winPtr->flags & TK_MAPPED)) { break; } wmPtr->flags |= WM_SYNC_PENDING; code = WaitForEvent(winPtr->display, wmPtr, mapped ? MapNotify : UnmapNotify, &event); wmPtr->flags &= ~WM_SYNC_PENDING; if (code != TCL_OK) { /* * There are some bizarre situations in which the window manager * can't respond or chooses not to (e.g. if we've got a grab set * it can't respond). If this happens then just quit. */ if (winPtr->dispPtr->flags & TK_DISPLAY_WM_TRACING) { printf("WaitForMapNotify giving up on %s\n", winPtr->pathName); } break; } } wmPtr->flags &= ~WM_MOVE_PENDING; if (winPtr->dispPtr->flags & TK_DISPLAY_WM_TRACING) { printf("WaitForMapNotify finished with %s (winPtr %p, wmPtr %p)\n", winPtr->pathName, winPtr, wmPtr); } } /* *-------------------------------------------------------------- * * UpdateHints -- * * This function is called to update the window manager's hints * information from the information in a WmInfo structure. * * Results: * None. * * Side effects: * Properties get changed for winPtr. * *-------------------------------------------------------------- */ static void UpdateHints( TkWindow *winPtr) { WmInfo *wmPtr = winPtr->wmInfoPtr; if (wmPtr->flags & WM_NEVER_MAPPED) { return; } XSetWMHints(winPtr->display, wmPtr->wrapperPtr->window, &wmPtr->hints); } /* *---------------------------------------------------------------------- * * SetNetWmType -- * * Set the extended window manager hints for a toplevel window * to the types provided. The specification states that this * may be a list of window types in preferred order. To permit * for future type definitions, the set of names is unconstrained * and names are converted to upper-case and appended to * "_NET_WM_WINDOW_TYPE_" before being converted to an Atom. * *---------------------------------------------------------------------- */ static int SetNetWmType(TkWindow *winPtr, Tcl_Obj *typePtr) { Atom typeAtom, *atoms = NULL; WmInfo *wmPtr; TkWindow *wrapperPtr; Tcl_Obj **objv; int objc, n; Tk_Window tkwin = (Tk_Window)winPtr; Tcl_Interp *interp = Tk_Interp(tkwin); if (TCL_OK != Tcl_ListObjGetElements(interp, typePtr, &objc, &objv)) { return TCL_ERROR; } if (!Tk_HasWrapper(tkwin)) { return TCL_OK; /* error?? */ } if (objc > 0) { atoms = ckalloc(sizeof(Atom) * objc); } for (n = 0; n < objc; ++n) { Tcl_DString ds, dsName; int len; char *name = Tcl_GetStringFromObj(objv[n], &len); Tcl_UtfToUpper(name); Tcl_UtfToExternalDString(NULL, name, len, &dsName); Tcl_DStringInit(&ds); Tcl_DStringAppend(&ds, "_NET_WM_WINDOW_TYPE_", 20); Tcl_DStringAppend(&ds, Tcl_DStringValue(&dsName), Tcl_DStringLength(&dsName)); Tcl_DStringFree(&dsName); atoms[n] = Tk_InternAtom(tkwin, Tcl_DStringValue(&ds)); Tcl_DStringFree(&ds); } wmPtr = winPtr->wmInfoPtr; if (wmPtr->wrapperPtr == NULL) { CreateWrapper(wmPtr); } wrapperPtr = wmPtr->wrapperPtr; typeAtom = Tk_InternAtom(tkwin, "_NET_WM_WINDOW_TYPE"); XChangeProperty(Tk_Display(tkwin), wrapperPtr->window, typeAtom, XA_ATOM, 32, PropModeReplace, (unsigned char *) atoms, objc); ckfree(atoms); return TCL_OK; } /* *---------------------------------------------------------------------- * * GetNetWmType -- * * Read the extended window manager type hint from a window * and return as a list of names suitable for use with * SetNetWmType. * *---------------------------------------------------------------------- */ static Tcl_Obj * GetNetWmType(TkWindow *winPtr) { Atom typeAtom, actualType, *atoms; int actualFormat; unsigned long n, count, bytesAfter; unsigned char *propertyValue = NULL; long maxLength = 1024; Tk_Window tkwin = (Tk_Window)winPtr; TkWindow *wrapperPtr; Tcl_Obj *typePtr; Tcl_Interp *interp; Tcl_DString ds; interp = Tk_Interp(tkwin); typePtr = Tcl_NewListObj(0, NULL); if (winPtr->wmInfoPtr->wrapperPtr == NULL) { CreateWrapper(winPtr->wmInfoPtr); } wrapperPtr = winPtr->wmInfoPtr->wrapperPtr; typeAtom = Tk_InternAtom(tkwin, "_NET_WM_WINDOW_TYPE"); if (Success == XGetWindowProperty(wrapperPtr->display, wrapperPtr->window, typeAtom, 0L, maxLength, False, XA_ATOM, &actualType, &actualFormat, &count, &bytesAfter, &propertyValue)) { atoms = (Atom *)propertyValue; for (n = 0; n < count; ++n) { const char *name = Tk_GetAtomName(tkwin, atoms[n]); if (strncmp("_NET_WM_WINDOW_TYPE_", name, 20) == 0) { Tcl_ExternalToUtfDString(NULL, name+20, -1, &ds); Tcl_UtfToLower(Tcl_DStringValue(&ds)); Tcl_ListObjAppendElement(interp, typePtr, Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds))); Tcl_DStringFree(&ds); } } XFree(propertyValue); } return typePtr; } /* *-------------------------------------------------------------- * * ParseGeometry -- * * This function parses a geometry string and updates information used to * control the geometry of a top-level window. * * Results: * A standard Tcl return value, plus an error message in the interp's * result if an error occurs. * * Side effects: * The size and/or location of winPtr may change. * *-------------------------------------------------------------- */ static int ParseGeometry( Tcl_Interp *interp, /* Used for error reporting. */ const char *string, /* String containing new geometry. Has the * standard form "=wxh+x+y". */ TkWindow *winPtr) /* Pointer to top-level window whose geometry * is to be changed. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; int x, y, width, height, flags; char *end; register const char *p = string; /* * The leading "=" is optional. */ if (*p == '=') { p++; } /* * Parse the width and height, if they are present. Don't actually update * any of the fields of wmPtr until we've successfully parsed the entire * geometry string. */ width = wmPtr->width; height = wmPtr->height; x = wmPtr->x; y = wmPtr->y; flags = wmPtr->flags; if (isdigit(UCHAR(*p))) { width = strtoul(p, &end, 10); p = end; if (*p != 'x') { goto error; } p++; if (!isdigit(UCHAR(*p))) { goto error; } height = strtoul(p, &end, 10); p = end; } /* * Parse the X and Y coordinates, if they are present. */ if (*p != '\0') { flags &= ~(WM_NEGATIVE_X | WM_NEGATIVE_Y); if (*p == '-') { flags |= WM_NEGATIVE_X; } else if (*p != '+') { goto error; } p++; if (!isdigit(UCHAR(*p)) && (*p != '-')) { goto error; } x = strtol(p, &end, 10); p = end; if (*p == '-') { flags |= WM_NEGATIVE_Y; } else if (*p != '+') { goto error; } p++; if (!isdigit(UCHAR(*p)) && (*p != '-')) { goto error; } y = strtol(p, &end, 10); if (*end != '\0') { goto error; } /* * Assume that the geometry information came from the user, unless an * explicit source has been specified. Otherwise most window managers * assume that the size hints were program-specified and they ignore * them. */ if ((wmPtr->sizeHintsFlags & (USPosition|PPosition)) == 0) { wmPtr->sizeHintsFlags |= USPosition; flags |= WM_UPDATE_SIZE_HINTS; } } /* * Everything was parsed OK. Update the fields of *wmPtr and arrange for * the appropriate information to be percolated out to the window manager * at the next idle moment. */ wmPtr->width = width; wmPtr->height = height; wmPtr->x = x; wmPtr->y = y; flags |= WM_MOVE_PENDING; wmPtr->flags = flags; if (!(wmPtr->flags & (WM_UPDATE_PENDING|WM_NEVER_MAPPED))) { Tcl_DoWhenIdle(UpdateGeometryInfo, winPtr); wmPtr->flags |= WM_UPDATE_PENDING; } return TCL_OK; error: Tcl_AppendResult(interp, "bad geometry specifier \"", string, "\"", NULL); return TCL_ERROR; } /* *---------------------------------------------------------------------- * * Tk_GetRootCoords -- * * Given a token for a window, this function traces through the window's * lineage to find the (virtual) root-window coordinates corresponding to * point (0,0) in the window. * * Results: * The locations pointed to by xPtr and yPtr are filled in with the root * coordinates of the (0,0) point in tkwin. If a virtual root window is * in effect for the window, then the coordinates in the virtual root are * returned. * * Side effects: * None. * *---------------------------------------------------------------------- */ void Tk_GetRootCoords( Tk_Window tkwin, /* Token for window. */ int *xPtr, /* Where to store x-displacement of (0,0). */ int *yPtr) /* Where to store y-displacement of (0,0). */ { int x, y; register TkWindow *winPtr = (TkWindow *) tkwin; /* * Search back through this window's parents all the way to a top-level * window, combining the offsets of each window within its parent. */ x = y = 0; while (1) { x += winPtr->changes.x + winPtr->changes.border_width; y += winPtr->changes.y + winPtr->changes.border_width; if ((winPtr->wmInfoPtr != NULL) && (winPtr->wmInfoPtr->menubar == (Tk_Window) winPtr)) { /* * This window is a special menubar; switch over to its associated * toplevel, compensate for their differences in y coordinates, * then continue with the toplevel (in case it's embedded). */ y -= winPtr->wmInfoPtr->menuHeight; winPtr = winPtr->wmInfoPtr->winPtr; continue; } if (winPtr->flags & TK_TOP_LEVEL) { TkWindow *otherPtr; if (!(winPtr->flags & TK_EMBEDDED)) { break; } otherPtr = TkpGetOtherWindow(winPtr); if (otherPtr == NULL) { /* * The container window is not in the same application. Query * the X server. */ Window root, dummyChild; int rootX, rootY; root = winPtr->wmInfoPtr->vRoot; if (root == None) { root = RootWindowOfScreen(Tk_Screen((Tk_Window) winPtr)); } XTranslateCoordinates(winPtr->display, winPtr->window, root, 0, 0, &rootX, &rootY, &dummyChild); x += rootX; y += rootY; break; } else { /* * The container window is in the same application. Let's * query its coordinates. */ winPtr = otherPtr; continue; } } winPtr = winPtr->parentPtr; if (winPtr == NULL) { break; } } *xPtr = x; *yPtr = y; } /* *---------------------------------------------------------------------- * * Tk_CoordsToWindow -- * * Given the (virtual) root coordinates of a point, this function returns * the token for the top-most window covering that point, if there exists * such a window in this application. * * Results: * The return result is either a token for the window corresponding to * rootX and rootY, or else NULL to indicate that there is no such * window. * * Side effects: * None. * *---------------------------------------------------------------------- */ Tk_Window Tk_CoordsToWindow( int rootX, int rootY, /* Coordinates of point in root window. If a * virtual-root window manager is in use, * these coordinates refer to the virtual * root, not the real root. */ Tk_Window tkwin) /* Token for any window in application; used * to identify the display. */ { Window window, parent, child; int x, y, childX, childY, tmpx, tmpy, bd; WmInfo *wmPtr; TkWindow *winPtr, *childPtr, *nextPtr; TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr; Tk_ErrorHandler handler = NULL; /* * Step 1: scan the list of toplevel windows to see if there is a virtual * root for the screen we're interested in. If so, we have to translate * the coordinates from virtual root to root coordinates. */ parent = window = RootWindowOfScreen(Tk_Screen(tkwin)); x = rootX; y = rootY; for (wmPtr = (WmInfo *) dispPtr->firstWmPtr; wmPtr != NULL; wmPtr = wmPtr->nextPtr) { if (Tk_Screen(wmPtr->winPtr) != Tk_Screen(tkwin)) { continue; } if (wmPtr->vRoot == None) { continue; } UpdateVRootGeometry(wmPtr); parent = wmPtr->vRoot; break; } /* * Step 2: work down through the window hierarchy starting at the root. * For each window, find the child that contains the given point and then * see if this child is either a wrapper for one of our toplevel windows * or a window manager decoration window for one of our toplevels. This * approach handles several tricky cases: * * 1. There may be a virtual root window between the root and one of our * toplevels. * 2. If a toplevel is embedded, we may have to search through the * windows of the container application(s) before getting to the * toplevel. */ handler = Tk_CreateErrorHandler(Tk_Display(tkwin), -1, -1, -1, NULL, NULL); while (1) { if (XTranslateCoordinates(Tk_Display(tkwin), parent, window, x, y, &childX, &childY, &child) == False) { /* * We can end up here when the window is in the middle of being * deleted */ Tk_DeleteErrorHandler(handler); return NULL; } if (child == None) { Tk_DeleteErrorHandler(handler); return NULL; } for (wmPtr = (WmInfo *) dispPtr->firstWmPtr; wmPtr != NULL; wmPtr = wmPtr->nextPtr) { if (wmPtr->reparent == child) { goto gotToplevel; } if (wmPtr->wrapperPtr != NULL) { if (child == wmPtr->wrapperPtr->window) { goto gotToplevel; } } else if (child == wmPtr->winPtr->window) { goto gotToplevel; } } x = childX; y = childY; parent = window; window = child; } gotToplevel: if (handler) { /* * Check value of handler, because we can reach this label from above * or below */ Tk_DeleteErrorHandler(handler); handler = NULL; } winPtr = wmPtr->winPtr; if (winPtr->mainPtr != ((TkWindow *) tkwin)->mainPtr) { return NULL; } /* * Step 3: at this point winPtr and wmPtr refer to the toplevel that * contains the given coordinates, and childX and childY give the * translated coordinates in the *parent* of the toplevel. Now decide * whether the coordinates are in the menubar or the actual toplevel, and * translate the coordinates into the coordinate system of that window. */ x = childX - winPtr->changes.x; y = childY - winPtr->changes.y; if ((x < 0) || (x >= winPtr->changes.width) || (y >= winPtr->changes.height)) { return NULL; } if (y < 0) { winPtr = (TkWindow *) wmPtr->menubar; if (winPtr == NULL) { return NULL; } y += wmPtr->menuHeight; if (y < 0) { return NULL; } } /* * Step 4: work down through the hierarchy underneath the current window. * At each level, scan through all the children to find the highest one in * the stacking order that contains the point. Then repeat the whole * process on that child. */ while (1) { nextPtr = NULL; for (childPtr = winPtr->childList; childPtr != NULL; childPtr = childPtr->nextPtr) { if (!Tk_IsMapped(childPtr) || (childPtr->flags & TK_TOP_HIERARCHY)) { continue; } if (childPtr->flags & TK_REPARENTED) { continue; } tmpx = x - childPtr->changes.x; tmpy = y - childPtr->changes.y; bd = childPtr->changes.border_width; if ((tmpx >= -bd) && (tmpy >= -bd) && (tmpx < (childPtr->changes.width + bd)) && (tmpy < (childPtr->changes.height + bd))) { nextPtr = childPtr; } } if (nextPtr == NULL) { break; } winPtr = nextPtr; x -= winPtr->changes.x; y -= winPtr->changes.y; if ((winPtr->flags & TK_CONTAINER) && (winPtr->flags & TK_BOTH_HALVES)) { /* * The window containing the point is a container, and the * embedded application is in this same process. Switch over to * the toplevel for the embedded application and start processing * that toplevel from scratch. */ winPtr = TkpGetOtherWindow(winPtr); if (winPtr == NULL) { return NULL; } wmPtr = winPtr->wmInfoPtr; childX = x; childY = y; goto gotToplevel; } } return (Tk_Window) winPtr; } /* *---------------------------------------------------------------------- * * UpdateVRootGeometry -- * * This function is called to update all the virtual root geometry * information in wmPtr. * * Results: * None. * * Side effects: * The vRootX, vRootY, vRootWidth, and vRootHeight fields in wmPtr are * filled with the most up-to-date information. * *---------------------------------------------------------------------- */ static void UpdateVRootGeometry( WmInfo *wmPtr) /* Window manager information to be updated. * The wmPtr->vRoot field must be valid. */ { TkWindow *winPtr = wmPtr->winPtr; int bd; unsigned dummy; Window dummy2; Status status; Tk_ErrorHandler handler; /* * If this isn't a virtual-root window manager, just return information * about the screen. */ wmPtr->flags &= ~WM_VROOT_OFFSET_STALE; if (wmPtr->vRoot == None) { noVRoot: wmPtr->vRootX = wmPtr->vRootY = 0; wmPtr->vRootWidth = DisplayWidth(winPtr->display, winPtr->screenNum); wmPtr->vRootHeight = DisplayHeight(winPtr->display, winPtr->screenNum); return; } /* * Refresh the virtual root information if it's out of date. */ handler = Tk_CreateErrorHandler(winPtr->display, -1, -1, -1, NULL, NULL); status = XGetGeometry(winPtr->display, wmPtr->vRoot, &dummy2, &wmPtr->vRootX, &wmPtr->vRootY, (unsigned *) &wmPtr->vRootWidth, (unsigned *) &wmPtr->vRootHeight, (unsigned *) &bd, &dummy); if (winPtr->dispPtr->flags & TK_DISPLAY_WM_TRACING) { printf("UpdateVRootGeometry: x = %d, y = %d, width = %d, ", wmPtr->vRootX, wmPtr->vRootY, wmPtr->vRootWidth); printf("height = %d, status = %d\n", wmPtr->vRootHeight, status); } Tk_DeleteErrorHandler(handler); if (status == 0) { /* * The virtual root is gone! Pretend that it never existed. */ wmPtr->vRoot = None; goto noVRoot; } } /* *---------------------------------------------------------------------- * * Tk_GetVRootGeometry -- * * This function returns information about the virtual root window * corresponding to a particular Tk window. * * Results: * The values at xPtr, yPtr, widthPtr, and heightPtr are set with the * offset and dimensions of the root window corresponding to tkwin. If * tkwin is being managed by a virtual root window manager these values * correspond to the virtual root window being used for tkwin; otherwise * the offsets will be 0 and the dimensions will be those of the screen. * * Side effects: * Vroot window information is refreshed if it is out of date. * *---------------------------------------------------------------------- */ void Tk_GetVRootGeometry( Tk_Window tkwin, /* Window whose virtual root is to be * queried. */ int *xPtr, int *yPtr, /* Store x and y offsets of virtual root * here. */ int *widthPtr, int *heightPtr) /* Store dimensions of virtual root here. */ { WmInfo *wmPtr; TkWindow *winPtr = (TkWindow *) tkwin; /* * Find the top-level window for tkwin, and locate the window manager * information for that window. */ while (!(winPtr->flags & TK_TOP_HIERARCHY) && (winPtr->parentPtr != NULL)) { winPtr = winPtr->parentPtr; } wmPtr = winPtr->wmInfoPtr; if (wmPtr == NULL) { /* Punt. */ *xPtr = 0; *yPtr = 0; *widthPtr = 0; *heightPtr = 0; } /* * Make sure that the geometry information is up-to-date, then copy it out * to the caller. */ if (wmPtr->flags & WM_VROOT_OFFSET_STALE) { UpdateVRootGeometry(wmPtr); } *xPtr = wmPtr->vRootX; *yPtr = wmPtr->vRootY; *widthPtr = wmPtr->vRootWidth; *heightPtr = wmPtr->vRootHeight; } /* *---------------------------------------------------------------------- * * Tk_MoveToplevelWindow -- * * This function is called instead of Tk_MoveWindow to adjust the x-y * location of a top-level window. It delays the actual move to a later * time and keeps window-manager information up-to-date with the move * * Results: * None. * * Side effects: * The window is eventually moved so that its upper-left corner * (actually, the upper-left corner of the window's decorative frame, if * there is one) is at (x,y). * *---------------------------------------------------------------------- */ void Tk_MoveToplevelWindow( Tk_Window tkwin, /* Window to move. */ int x, int y) /* New location for window (within parent). */ { TkWindow *winPtr = (TkWindow *) tkwin; register WmInfo *wmPtr = winPtr->wmInfoPtr; if (!(winPtr->flags & TK_TOP_LEVEL)) { Tcl_Panic("Tk_MoveToplevelWindow called with non-toplevel window"); } wmPtr->x = x; wmPtr->y = y; wmPtr->flags |= WM_MOVE_PENDING; wmPtr->flags &= ~(WM_NEGATIVE_X|WM_NEGATIVE_Y); if ((wmPtr->sizeHintsFlags & (USPosition|PPosition)) == 0) { wmPtr->sizeHintsFlags |= USPosition; wmPtr->flags |= WM_UPDATE_SIZE_HINTS; } /* * If the window has already been mapped, must bring its geometry * up-to-date immediately, otherwise an event might arrive from the server * that would overwrite wmPtr->x and wmPtr->y and lose the new position. */ if (!(wmPtr->flags & WM_NEVER_MAPPED)) { if (wmPtr->flags & WM_UPDATE_PENDING) { Tcl_CancelIdleCall(UpdateGeometryInfo, winPtr); } UpdateGeometryInfo(winPtr); } } /* *---------------------------------------------------------------------- * * UpdateWmProtocols -- * * This function transfers the most up-to-date information about window * manager protocols from the WmInfo structure to the actual property on * the top-level window. * * Results: * None. * * Side effects: * The WM_PROTOCOLS property gets changed for wmPtr's window. * *---------------------------------------------------------------------- */ static void UpdateWmProtocols( register WmInfo *wmPtr) /* Information about top-level window. */ { register ProtocolHandler *protPtr; Atom deleteWindowAtom, pingAtom; int count; Atom *arrayPtr, *atomPtr; /* * There are only two tricky parts here. First, there could be any number * of atoms for the window, so count them and malloc an array to hold all * of their atoms. Second, we *always* want to respond to the * WM_DELETE_WINDOW and _NET_WM_PING protocols, even if no-one's * officially asked. */ for (protPtr = wmPtr->protPtr, count = 2; protPtr != NULL; protPtr = protPtr->nextPtr, count++) { /* Empty loop body; we're just counting the handlers. */ } arrayPtr = ckalloc(count * sizeof(Atom)); deleteWindowAtom = Tk_InternAtom((Tk_Window) wmPtr->winPtr, "WM_DELETE_WINDOW"); pingAtom = Tk_InternAtom((Tk_Window) wmPtr->winPtr, "_NET_WM_PING"); arrayPtr[0] = deleteWindowAtom; arrayPtr[1] = pingAtom; for (protPtr = wmPtr->protPtr, atomPtr = &arrayPtr[1]; protPtr != NULL; protPtr = protPtr->nextPtr) { if (protPtr->protocol != deleteWindowAtom && protPtr->protocol != pingAtom) { *(atomPtr++) = protPtr->protocol; } } XChangeProperty(wmPtr->winPtr->display, wmPtr->wrapperPtr->window, Tk_InternAtom((Tk_Window) wmPtr->winPtr, "WM_PROTOCOLS"), XA_ATOM, 32, PropModeReplace, (unsigned char *) arrayPtr, atomPtr-arrayPtr); ckfree(arrayPtr); } /* *---------------------------------------------------------------------- * * TkWmProtocolEventProc -- * * This function is called by the Tk_HandleEvent whenever a ClientMessage * event arrives whose type is "WM_PROTOCOLS". This function handles the * message from the window manager in an appropriate fashion. * * Results: * None. * * Side effects: * Depends on what sort of handler, if any, was set up for the protocol. * *---------------------------------------------------------------------- */ void TkWmProtocolEventProc( TkWindow *winPtr, /* Window to which the event was sent. */ XEvent *eventPtr) /* X event. */ { WmInfo *wmPtr; register ProtocolHandler *protPtr; Atom protocol; int result; const char *protocolName; Tcl_Interp *interp; protocol = (Atom) eventPtr->xclient.data.l[0]; /* * If this is a _NET_WM_PING message, send it back to the root window * immediately. We do that here because scripts *cannot* respond correctly * to this protocol. */ if (protocol == Tk_InternAtom((Tk_Window) winPtr, "_NET_WM_PING")) { Window root = XRootWindow(winPtr->display, winPtr->screenNum); eventPtr->xclient.window = root; (void) XSendEvent(winPtr->display, root, False, (SubstructureNotifyMask|SubstructureRedirectMask), eventPtr); return; } wmPtr = winPtr->wmInfoPtr; if (wmPtr == NULL) { return; } /* * Note: it's very important to retrieve the protocol name now, before * invoking the command, even though the name won't be used until after * the command returns. This is because the command could delete winPtr, * making it impossible for us to use it later in the call to * Tk_GetAtomName. */ protocolName = Tk_GetAtomName((Tk_Window) winPtr, protocol); for (protPtr = wmPtr->protPtr; protPtr != NULL; protPtr = protPtr->nextPtr) { if (protocol == protPtr->protocol) { Tcl_Preserve(protPtr); interp = protPtr->interp; Tcl_Preserve(interp); result = Tcl_GlobalEval(interp, protPtr->command); if (result != TCL_OK) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (command for \"%s\" window manager protocol)", protocolName)); Tcl_BackgroundException(interp, result); } Tcl_Release(interp); Tcl_Release(protPtr); return; } } /* * No handler was present for this protocol. If this is a WM_DELETE_WINDOW * message then just destroy the window. */ if (protocol == Tk_InternAtom((Tk_Window) winPtr, "WM_DELETE_WINDOW")) { Tk_DestroyWindow((Tk_Window) wmPtr->winPtr); } } /* *---------------------------------------------------------------------- * * TkWmStackorderToplevelWrapperMap -- * * This function will create a table that maps the reparent wrapper X id * for a toplevel to the TkWindow structure that is wraps. Tk keeps track * of a mapping from the window X id to the TkWindow structure but that * does us no good here since we only get the X id of the wrapper window. * Only those toplevel windows that are mapped have a position in the * stacking order. * * Results: * None. * * Side effects: * Adds entries to the passed hashtable. * *---------------------------------------------------------------------- */ static void TkWmStackorderToplevelWrapperMap( TkWindow *winPtr, /* TkWindow to recurse on */ Display *display, /* X display of parent window */ Tcl_HashTable *table) /* Maps X id to TkWindow */ { TkWindow *childPtr; if (Tk_IsMapped(winPtr) && Tk_IsTopLevel(winPtr) && !Tk_IsEmbedded(winPtr) && (winPtr->display == display)) { Window wrapper = (winPtr->wmInfoPtr->reparent != None) ? winPtr->wmInfoPtr->reparent : winPtr->wmInfoPtr->wrapperPtr->window; Tcl_HashEntry *hPtr; int newEntry; hPtr = Tcl_CreateHashEntry(table, (char *) wrapper, &newEntry); Tcl_SetHashValue(hPtr, winPtr); } for (childPtr = winPtr->childList; childPtr != NULL; childPtr = childPtr->nextPtr) { TkWmStackorderToplevelWrapperMap(childPtr, display, table); } } /* *---------------------------------------------------------------------- * * TkWmStackorderToplevel -- * * This function returns the stack order of toplevel windows. * * Results: * An array of pointers to tk window objects in stacking order or else * NULL if there was an error. * * Side effects: * None. * *---------------------------------------------------------------------- */ TkWindow ** TkWmStackorderToplevel( TkWindow *parentPtr) /* Parent toplevel window. */ { Window dummy1, dummy2, vRoot; Window *children; unsigned numChildren, i; TkWindow *childWinPtr, **windows, **window_ptr; Tcl_HashTable table; Tcl_HashEntry *hPtr; Tcl_HashSearch search; /* * Map X Window ids to a TkWindow of the wrapped toplevel. */ Tcl_InitHashTable(&table, TCL_ONE_WORD_KEYS); TkWmStackorderToplevelWrapperMap(parentPtr, parentPtr->display, &table); window_ptr = windows = ckalloc((table.numEntries+1) * sizeof(TkWindow *)); /* * Special cases: If zero or one toplevels were mapped there is no need to * call XQueryTree. */ switch (table.numEntries) { case 0: windows[0] = NULL; goto done; case 1: hPtr = Tcl_FirstHashEntry(&table, &search); windows[0] = (TkWindow *) Tcl_GetHashValue(hPtr); windows[1] = NULL; goto done; } vRoot = parentPtr->wmInfoPtr->vRoot; if (vRoot == None) { vRoot = RootWindowOfScreen(Tk_Screen((Tk_Window) parentPtr)); } if (XQueryTree(parentPtr->display, vRoot, &dummy1, &dummy2, &children, &numChildren) == 0) { ckfree(windows); windows = NULL; } else { for (i = 0; i < numChildren; i++) { hPtr = Tcl_FindHashEntry(&table, (char *) children[i]); if (hPtr != NULL) { childWinPtr = (TkWindow *) Tcl_GetHashValue(hPtr); *window_ptr++ = childWinPtr; } } /* ASSERT: window_ptr - windows == table.numEntries * (#matched toplevel windows == #children) [Bug 1789819] */ *window_ptr = NULL; if (numChildren) { XFree((char *) children); } } done: Tcl_DeleteHashTable(&table); return windows; } /* *---------------------------------------------------------------------- * * TkWmRestackToplevel -- * * This function restacks a top-level window. * * Results: * None. * * Side effects: * WinPtr gets restacked as specified by aboveBelow and otherPtr. * *---------------------------------------------------------------------- */ void TkWmRestackToplevel( TkWindow *winPtr, /* Window to restack. */ int aboveBelow, /* Gives relative position for restacking; * must be Above or Below. */ TkWindow *otherPtr) /* Window relative to which to restack; if * NULL, then winPtr gets restacked above or * below *all* siblings. */ { XWindowChanges changes; unsigned mask; TkWindow *wrapperPtr; memset(&changes, 0, sizeof(XWindowChanges)); changes.stack_mode = aboveBelow; mask = CWStackMode; /* * Make sure that winPtr and its wrapper window have been created. */ if (winPtr->wmInfoPtr->flags & WM_NEVER_MAPPED) { TkWmMapWindow(winPtr); } wrapperPtr = winPtr->wmInfoPtr->wrapperPtr; if (otherPtr != NULL) { /* * The window is to be restacked with respect to another toplevel. * Make sure it has been created as well. */ if (otherPtr->wmInfoPtr->flags & WM_NEVER_MAPPED) { TkWmMapWindow(otherPtr); } changes.sibling = otherPtr->wmInfoPtr->wrapperPtr->window; mask |= CWSibling; } /* * Reconfigure the window. Note that we use XReconfigureWMWindow instead * of XConfigureWindow, in order to handle the case where the window is to * be restacked with respect to another toplevel. See [ICCCM] 4.1.5 * "Configuring the Window" and XReconfigureWMWindow(3) for details. */ XReconfigureWMWindow(winPtr->display, wrapperPtr->window, Tk_ScreenNumber((Tk_Window) winPtr), mask, &changes); } /* *---------------------------------------------------------------------- * * TkWmAddToColormapWindows -- * * This function is called to add a given window to the * WM_COLORMAP_WINDOWS property for its top-level, if it isn't already * there. It is invoked by the Tk code that creates a new colormap, in * order to make sure that colormap information is propagated to the * window manager by default. * * Results: * None. * * Side effects: * WinPtr's window gets added to the WM_COLORMAP_WINDOWS property of its * nearest top-level ancestor, unless the colormaps have been set * explicitly with the "wm colormapwindows" command. * *---------------------------------------------------------------------- */ void TkWmAddToColormapWindows( TkWindow *winPtr) /* Window with a non-default colormap. Should * not be a top-level window. */ { TkWindow *wrapperPtr; TkWindow *topPtr; Window *oldPtr, *newPtr; int count, i; if (winPtr->window == None) { return; } for (topPtr = winPtr->parentPtr; ; topPtr = topPtr->parentPtr) { if (topPtr == NULL) { /* * Window is being deleted. Skip the whole operation. */ return; } if (topPtr->flags & TK_TOP_HIERARCHY) { break; } } if (topPtr->wmInfoPtr == NULL) { return; } if (topPtr->wmInfoPtr->flags & WM_COLORMAPS_EXPLICIT) { return; } if (topPtr->wmInfoPtr->wrapperPtr == NULL) { CreateWrapper(topPtr->wmInfoPtr); } wrapperPtr = topPtr->wmInfoPtr->wrapperPtr; /* * Fetch the old value of the property. */ if (XGetWMColormapWindows(topPtr->display, wrapperPtr->window, &oldPtr, &count) == 0) { oldPtr = NULL; count = 0; } /* * Make sure that the window isn't already in the list. */ for (i = 0; i < count; i++) { if (oldPtr[i] == winPtr->window) { return; } } /* * Make a new bigger array and use it to reset the property. Automatically * add the toplevel itself as the last element of the list. */ newPtr = ckalloc((count+2) * sizeof(Window)); for (i = 0; i < count; i++) { newPtr[i] = oldPtr[i]; } if (count == 0) { count++; } newPtr[count-1] = winPtr->window; newPtr[count] = topPtr->window; XSetWMColormapWindows(topPtr->display, wrapperPtr->window, newPtr, count+1); ckfree(newPtr); if (oldPtr != NULL) { XFree((char *) oldPtr); } } /* *---------------------------------------------------------------------- * * TkWmRemoveFromColormapWindows -- * * This function is called to remove a given window from the * WM_COLORMAP_WINDOWS property for its top-level. It is invoked when * windows are deleted. * * Results: * None. * * Side effects: * WinPtr's window gets removed from the WM_COLORMAP_WINDOWS property of * its nearest top-level ancestor, unless the top-level itself is being * deleted too. * *---------------------------------------------------------------------- */ void TkWmRemoveFromColormapWindows( TkWindow *winPtr) /* Window that may be present in * WM_COLORMAP_WINDOWS property for its * top-level. Should not be a top-level * window. */ { TkWindow *wrapperPtr; TkWindow *topPtr; Window *oldPtr; int count, i, j; if (winPtr->window == None) { return; } for (topPtr = winPtr->parentPtr; ; topPtr = topPtr->parentPtr) { if (topPtr == NULL) { /* * Ancestors have been deleted, so skip the whole operation. * Seems like this can't ever happen? */ return; } if (topPtr->flags & TK_TOP_HIERARCHY) { break; } } if (topPtr->flags & TK_ALREADY_DEAD) { /* * Top-level is being deleted, so there's no need to cleanup the * WM_COLORMAP_WINDOWS property. */ return; } if (topPtr->wmInfoPtr == NULL) { return; } if (topPtr->wmInfoPtr->wrapperPtr == NULL) { CreateWrapper(topPtr->wmInfoPtr); } wrapperPtr = topPtr->wmInfoPtr->wrapperPtr; if (wrapperPtr == NULL) { return; } /* * Fetch the old value of the property. */ if (XGetWMColormapWindows(topPtr->display, wrapperPtr->window, &oldPtr, &count) == 0) { return; } /* * Find the window and slide the following ones down to cover it up. */ for (i = 0; i < count; i++) { if (oldPtr[i] == winPtr->window) { for (j = i ; j < count-1; j++) { oldPtr[j] = oldPtr[j+1]; } XSetWMColormapWindows(topPtr->display, wrapperPtr->window, oldPtr, count-1); break; } } XFree((char *) oldPtr); } /* *---------------------------------------------------------------------- * * TkGetPointerCoords -- * * Fetch the position of the mouse pointer. * * Results: * *xPtr and *yPtr are filled in with the (virtual) root coordinates of * the mouse pointer for tkwin's display. If the pointer isn't on tkwin's * screen, then -1 values are returned for both coordinates. The argument * tkwin must be a toplevel window. * * Side effects: * None. * *---------------------------------------------------------------------- */ void TkGetPointerCoords( Tk_Window tkwin, /* Toplevel window that identifies screen on * which lookup is to be done. */ int *xPtr, int *yPtr) /* Store pointer coordinates here. */ { TkWindow *winPtr = (TkWindow *) tkwin; WmInfo *wmPtr; Window w, root, child; int rootX, rootY; unsigned mask; wmPtr = winPtr->wmInfoPtr; w = wmPtr->vRoot; if (w == None) { w = RootWindow(winPtr->display, winPtr->screenNum); } if (XQueryPointer(winPtr->display, w, &root, &child, &rootX, &rootY, xPtr, yPtr, &mask) != True) { *xPtr = -1; *yPtr = -1; } } /* *---------------------------------------------------------------------- * * GetMaxSize -- * * This function computes the current maxWidth and maxHeight values for a * window, taking into account the possibility that they may be * defaulted. * * Results: * The values at *maxWidthPtr and *maxHeightPtr are filled in with the * maximum allowable dimensions of wmPtr's window, in grid units. If no * maximum has been specified for the window, then this function computes * the largest sizes that will fit on the screen. * * Side effects: * None. * *---------------------------------------------------------------------- */ static void GetMaxSize( WmInfo *wmPtr, /* Window manager information for the * window. */ int *maxWidthPtr, /* Where to store the current maximum width of * the window. */ int *maxHeightPtr) /* Where to store the current maximum height * of the window. */ { int tmp; if (wmPtr->maxWidth > 0) { *maxWidthPtr = wmPtr->maxWidth; } else { /* * Must compute a default width. Fill up the display, leaving a bit of * extra space for the window manager's borders. */ tmp = DisplayWidth(wmPtr->winPtr->display, wmPtr->winPtr->screenNum) - 15; if (wmPtr->gridWin != NULL) { /* * Gridding is turned on; convert from pixels to grid units. */ tmp = wmPtr->reqGridWidth + (tmp - wmPtr->winPtr->reqWidth)/wmPtr->widthInc; } *maxWidthPtr = tmp; } if (wmPtr->maxHeight > 0) { *maxHeightPtr = wmPtr->maxHeight; } else { tmp = DisplayHeight(wmPtr->winPtr->display, wmPtr->winPtr->screenNum) - 30; if (wmPtr->gridWin != NULL) { tmp = wmPtr->reqGridHeight + (tmp - wmPtr->winPtr->reqHeight)/wmPtr->heightInc; } *maxHeightPtr = tmp; } } /* *---------------------------------------------------------------------- * * TkSetTransientFor -- * * Set a Tk window to be transient with reference to a specified * parent or the toplevel ancestor if None is passed as parent. * *---------------------------------------------------------------------- */ static void TkSetTransientFor(Tk_Window tkwin, Tk_Window parent) { if (parent == None) { parent = Tk_Parent(tkwin); while (!Tk_IsTopLevel(parent)) parent = Tk_Parent(tkwin); } /* * Prevent crash due to incomplete initialization, or other problems. * [Bugs 3554026, 3561016] */ if (((TkWindow *)parent)->wmInfoPtr->wrapperPtr == NULL) { return; } XSetTransientForHint(Tk_Display(tkwin), ((TkWindow *)tkwin)->wmInfoPtr->wrapperPtr->window, ((TkWindow *)parent)->wmInfoPtr->wrapperPtr->window); } /* *---------------------------------------------------------------------- * * TkpMakeMenuWindow -- * * Configure the window to be either a pull-down menu, a pop-up menu, or * as a toplevel (torn-off) menu or palette. * * Results: * None. * * Side effects: * Changes the style bit used to create a new Mac toplevel. * *---------------------------------------------------------------------- */ void TkpMakeMenuWindow( Tk_Window tkwin, /* New window. */ int typeFlag) /* TK_MAKE_MENU_DROPDOWN means menu is only * posted briefly as a pulldown or cascade, * TK_MAKE_MENU_POPUP means it is a popup. * TK_MAKE_MENU_TEAROFF means menu is always * visible, e.g. as a torn-off menu. * Determines whether save_under and * override_redirect should be set, plus how * to flag it for the window manager. */ { WmInfo *wmPtr; XSetWindowAttributes atts; TkWindow *wrapperPtr; Tcl_Obj *typeObj; if (!Tk_HasWrapper(tkwin)) { return; } wmPtr = ((TkWindow *) tkwin)->wmInfoPtr; if (wmPtr->wrapperPtr == NULL) { CreateWrapper(wmPtr); } wrapperPtr = wmPtr->wrapperPtr; if (typeFlag == TK_MAKE_MENU_TEAROFF) { atts.override_redirect = False; atts.save_under = False; typeObj = Tcl_NewStringObj("menu", -1); TkSetTransientFor(tkwin, NULL); } else { atts.override_redirect = True; atts.save_under = True; if (typeFlag == TK_MAKE_MENU_DROPDOWN) { typeObj = Tcl_NewStringObj("dropdown_menu", -1); } else { typeObj = Tcl_NewStringObj("popup_menu", -1); } } SetNetWmType((TkWindow *)tkwin, typeObj); /* * The override-redirect and save-under bits must be set on the wrapper * window in order to have the desired effect. However, also set the * override-redirect bit on the window itself, so that the "wm * overrideredirect" command will see it. */ if ((atts.override_redirect!=Tk_Attributes(wrapperPtr)->override_redirect) || (atts.save_under != Tk_Attributes(wrapperPtr)->save_under)) { Tk_ChangeWindowAttributes((Tk_Window) wrapperPtr, CWOverrideRedirect|CWSaveUnder, &atts); } if (atts.override_redirect != Tk_Attributes(tkwin)->override_redirect) { Tk_ChangeWindowAttributes(tkwin, CWOverrideRedirect, &atts); } } /* *---------------------------------------------------------------------- * * CreateWrapper -- * * This function is invoked to create the wrapper window for a toplevel * window. It is called just before a toplevel is mapped for the first * time. * * Results: * None. * * Side effects: * The wrapper is created and the toplevel is reparented inside it. * *---------------------------------------------------------------------- */ static void CreateWrapper( WmInfo *wmPtr) /* Window manager information for the * window. */ { TkWindow *winPtr, *wrapperPtr; Window parent; Tcl_HashEntry *hPtr; int new; winPtr = wmPtr->winPtr; if (winPtr->window == None) { Tk_MakeWindowExist((Tk_Window) winPtr); } /* * The code below is copied from CreateTopLevelWindow, Tk_MakeWindowExist, * and TkpMakeWindow. The idea is to create an "official" Tk window (so * that we can get events on it), but to hide the window outside the * official Tk hierarchy so that it isn't visible to the application. See * the comments for the other functions if you have questions about this * code. */ wmPtr->wrapperPtr = wrapperPtr = TkAllocWindow(winPtr->dispPtr, Tk_ScreenNumber((Tk_Window) winPtr), winPtr); wrapperPtr->dirtyAtts |= CWBorderPixel; /* * Tk doesn't normally select for StructureNotifyMask events because the * events are synthesized internally. However, for wrapper windows we need * to know when the window manager modifies the window configuration. We * also need to select on focus change events; these are the only windows * for which we care about focus changes. */ wrapperPtr->flags |= TK_WRAPPER; wrapperPtr->atts.event_mask |= StructureNotifyMask|FocusChangeMask; wrapperPtr->atts.override_redirect = winPtr->atts.override_redirect; if (winPtr->flags & TK_EMBEDDED) { parent = TkUnixContainerId(winPtr); } else { parent = XRootWindow(wrapperPtr->display, wrapperPtr->screenNum); } wrapperPtr->window = XCreateWindow(wrapperPtr->display, parent, wrapperPtr->changes.x, wrapperPtr->changes.y, (unsigned) wrapperPtr->changes.width, (unsigned) wrapperPtr->changes.height, (unsigned) wrapperPtr->changes.border_width, wrapperPtr->depth, InputOutput, wrapperPtr->visual, wrapperPtr->dirtyAtts|CWOverrideRedirect, &wrapperPtr->atts); hPtr = Tcl_CreateHashEntry(&wrapperPtr->dispPtr->winTable, (char *) wrapperPtr->window, &new); Tcl_SetHashValue(hPtr, wrapperPtr); wrapperPtr->mainPtr = winPtr->mainPtr; wrapperPtr->mainPtr->refCount++; wrapperPtr->dirtyAtts = 0; wrapperPtr->dirtyChanges = 0; wrapperPtr->wmInfoPtr = wmPtr; /* * Reparent the toplevel window inside the wrapper. */ XReparentWindow(wrapperPtr->display, winPtr->window, wrapperPtr->window, 0, 0); /* * Tk must monitor structure events for wrapper windows in order to detect * changes made by window managers such as resizing, mapping, unmapping, * etc.. */ Tk_CreateEventHandler((Tk_Window) wmPtr->wrapperPtr, WrapperEventMask, WrapperEventProc, wmPtr); } /* *---------------------------------------------------------------------- * * TkWmFocusToplevel -- * * This is a utility function invoked by focus-management code. The focus * code responds to externally generated focus-related events on wrapper * windows but ignores those events for any other windows. This function * determines whether a given window is a wrapper window and, if so, * returns the toplevel window corresponding to the wrapper. * * Results: * If winPtr is a wrapper window, returns a pointer to the corresponding * toplevel window; otherwise returns NULL. * * Side effects: * None. * *---------------------------------------------------------------------- */ TkWindow * TkWmFocusToplevel( TkWindow *winPtr) /* Window that received a focus-related * event. */ { if (!(winPtr->flags & TK_WRAPPER)) { return NULL; } return winPtr->wmInfoPtr->winPtr; } /* *---------------------------------------------------------------------- * * TkUnixSetMenubar -- * * This function is invoked by menu management code to specify the window * to use as a menubar for a given toplevel window. * * Results: * None. * * Side effects: * The window given by menubar will be mapped and positioned inside the * wrapper for tkwin and above tkwin. Menubar will automatically be * resized to maintain the height specified by TkUnixSetMenuHeight the * same width as tkwin. Any previous menubar specified for tkwin will be * unmapped and ignored from now on. * *---------------------------------------------------------------------- */ void TkUnixSetMenubar( Tk_Window tkwin, /* Token for toplevel window. */ Tk_Window menubar) /* Token for window that is to serve as * menubar for tkwin. Must not be a toplevel * window. If NULL, any existing menubar is * canceled and the menu height is reset to * 0. */ { WmInfo *wmPtr = ((TkWindow *) tkwin)->wmInfoPtr; Tk_Window parent; TkWindow *menubarPtr = (TkWindow *) menubar; /* * Could be a Frame (i.e. not a toplevel). */ if (wmPtr == NULL) { return; } if (wmPtr->menubar != NULL) { /* * There's already a menubar for this toplevel. If it isn't the same * as the new menubar, unmap it so that it is out of the way, and * reparent it back to its original parent. */ if (wmPtr->menubar == menubar) { return; } ((TkWindow *) wmPtr->menubar)->wmInfoPtr = NULL; ((TkWindow *) wmPtr->menubar)->flags &= ~TK_REPARENTED; Tk_UnmapWindow(wmPtr->menubar); parent = Tk_Parent(wmPtr->menubar); if (parent != NULL) { Tk_MakeWindowExist(parent); XReparentWindow(Tk_Display(wmPtr->menubar), Tk_WindowId(wmPtr->menubar), Tk_WindowId(parent), 0, 0); } Tk_DeleteEventHandler(wmPtr->menubar, StructureNotifyMask, MenubarDestroyProc, wmPtr->menubar); Tk_ManageGeometry(wmPtr->menubar, NULL, NULL); } wmPtr->menubar = menubar; if (menubar == NULL) { wmPtr->menuHeight = 0; } else { if ((menubarPtr->flags & TK_TOP_LEVEL) || (Tk_Screen(menubar) != Tk_Screen(tkwin))) { Tcl_Panic("TkUnixSetMenubar got bad menubar"); } wmPtr->menuHeight = Tk_ReqHeight(menubar); if (wmPtr->menuHeight == 0) { wmPtr->menuHeight = 1; } Tk_MakeWindowExist(tkwin); Tk_MakeWindowExist(menubar); if (wmPtr->wrapperPtr == NULL) { CreateWrapper(wmPtr); } XReparentWindow(Tk_Display(menubar), Tk_WindowId(menubar), wmPtr->wrapperPtr->window, 0, 0); menubarPtr->wmInfoPtr = wmPtr; Tk_MoveResizeWindow(menubar, 0, 0, Tk_Width(tkwin), wmPtr->menuHeight); Tk_MapWindow(menubar); Tk_CreateEventHandler(menubar, StructureNotifyMask, MenubarDestroyProc, menubar); Tk_ManageGeometry(menubar, &menubarMgrType, wmPtr); menubarPtr->flags |= TK_REPARENTED; } wmPtr->flags |= WM_UPDATE_SIZE_HINTS; if (!(wmPtr->flags & (WM_UPDATE_PENDING|WM_NEVER_MAPPED))) { Tcl_DoWhenIdle(UpdateGeometryInfo, tkwin); wmPtr->flags |= WM_UPDATE_PENDING; } } /* *---------------------------------------------------------------------- * * MenubarDestroyProc -- * * This function is invoked by the event dispatcher whenever a menubar * window is destroyed (it's also invoked for a few other kinds of * events, but we ignore those). * * Results: * None. * * Side effects: * The association between the window and its toplevel is broken, so that * the window is no longer considered to be a menubar. * *---------------------------------------------------------------------- */ static void MenubarDestroyProc( ClientData clientData, /* TkWindow pointer for menubar. */ XEvent *eventPtr) /* Describes what just happened. */ { WmInfo *wmPtr; if (eventPtr->type != DestroyNotify) { return; } wmPtr = ((TkWindow *) clientData)->wmInfoPtr; wmPtr->menubar = NULL; wmPtr->menuHeight = 0; wmPtr->flags |= WM_UPDATE_SIZE_HINTS; if (!(wmPtr->flags & (WM_UPDATE_PENDING|WM_NEVER_MAPPED))) { Tcl_DoWhenIdle(UpdateGeometryInfo, wmPtr->winPtr); wmPtr->flags |= WM_UPDATE_PENDING; } } /* *---------------------------------------------------------------------- * * MenubarReqProc -- * * This function is invoked by the Tk geometry management code whenever a * menubar calls Tk_GeometryRequest to request a new size. * * Results: * None. * * Side effects: * None. * *---------------------------------------------------------------------- */ static void MenubarReqProc( ClientData clientData, /* Pointer to the window manager information * for tkwin's toplevel. */ Tk_Window tkwin) /* Handle for menubar window. */ { WmInfo *wmPtr = clientData; wmPtr->menuHeight = Tk_ReqHeight(tkwin); if (wmPtr->menuHeight <= 0) { wmPtr->menuHeight = 1; } wmPtr->flags |= WM_UPDATE_SIZE_HINTS; if (!(wmPtr->flags & (WM_UPDATE_PENDING|WM_NEVER_MAPPED))) { Tcl_DoWhenIdle(UpdateGeometryInfo, wmPtr->winPtr); wmPtr->flags |= WM_UPDATE_PENDING; } } /* *---------------------------------------------------------------------- * * TkpGetWrapperWindow -- * * Given a toplevel window return the hidden wrapper window for the * toplevel window if available. * * Results: * The wrapper window. NULL is we were not passed a toplevel window or * the wrapper has yet to be created. * * Side effects: * None. * *---------------------------------------------------------------------- */ TkWindow * TkpGetWrapperWindow( TkWindow *winPtr) /* A toplevel window pointer. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; if ((winPtr == NULL) || (wmPtr == NULL)) { return NULL; } return wmPtr->wrapperPtr; } /* *---------------------------------------------------------------------- * * UpdateCommand -- * * Update the WM_COMMAND property, taking care to translate the command * strings into the external encoding. * * Results: * None. * * Side effects: * None. * *---------------------------------------------------------------------- */ static void UpdateCommand( TkWindow *winPtr) { register WmInfo *wmPtr = winPtr->wmInfoPtr; Tcl_DString cmds, ds; int i, *offsets; char **cmdArgv; /* * Translate the argv strings into the external encoding. To avoid * allocating lots of memory, the strings are appended to a buffer with * nulls between each string. * * This code is tricky because we need to pass and array of pointers to * XSetCommand. However, we can't compute the pointers as we go because * the DString buffer space could get reallocated. So, store offsets for * each element as we go, then compute pointers from the offsets once the * entire DString is done. */ cmdArgv = ckalloc(sizeof(char *) * wmPtr->cmdArgc); offsets = ckalloc(sizeof(int) * wmPtr->cmdArgc); Tcl_DStringInit(&cmds); for (i = 0; i < wmPtr->cmdArgc; i++) { Tcl_UtfToExternalDString(NULL, wmPtr->cmdArgv[i], -1, &ds); offsets[i] = Tcl_DStringLength(&cmds); Tcl_DStringAppend(&cmds, Tcl_DStringValue(&ds), Tcl_DStringLength(&ds)+1); Tcl_DStringFree(&ds); } cmdArgv[0] = Tcl_DStringValue(&cmds); for (i = 1; i < wmPtr->cmdArgc; i++) { cmdArgv[i] = cmdArgv[0] + offsets[i]; } XSetCommand(winPtr->display, wmPtr->wrapperPtr->window, cmdArgv, wmPtr->cmdArgc); Tcl_DStringFree(&cmds); ckfree(cmdArgv); ckfree(offsets); } /* *---------------------------------------------------------------------- * * TkpWmSetState -- * * Sets the window manager state for the wrapper window of a given * toplevel window. * * Results: * 0 on error, 1 otherwise * * Side effects: * May minimize, restore, or withdraw a window. * *---------------------------------------------------------------------- */ int TkpWmSetState( TkWindow *winPtr, /* Toplevel window to operate on. */ int state) /* One of IconicState, NormalState, or * WithdrawnState. */ { WmInfo *wmPtr = winPtr->wmInfoPtr; if (state == WithdrawnState) { wmPtr->hints.initial_state = WithdrawnState; wmPtr->withdrawn = 1; if (wmPtr->flags & WM_NEVER_MAPPED) { return 1; } if (XWithdrawWindow(winPtr->display, wmPtr->wrapperPtr->window, winPtr->screenNum) == 0) { return 0; } WaitForMapNotify(winPtr, 0); } else if (state == NormalState) { wmPtr->hints.initial_state = NormalState; wmPtr->withdrawn = 0; if (wmPtr->flags & WM_NEVER_MAPPED) { return 1; } UpdateHints(winPtr); Tk_MapWindow((Tk_Window) winPtr); } else if (state == IconicState) { wmPtr->hints.initial_state = IconicState; if (wmPtr->flags & WM_NEVER_MAPPED) { return 1; } if (wmPtr->withdrawn) { UpdateHints(winPtr); Tk_MapWindow((Tk_Window) winPtr); wmPtr->withdrawn = 0; } else { if (XIconifyWindow(winPtr->display, wmPtr->wrapperPtr->window, winPtr->screenNum) == 0) { return 0; } WaitForMapNotify(winPtr, 0); } } return 1; } /* *---------------------------------------------------------------------- * * RemapWindows * * Adjust parent/child relation ships of * the given window hierarchy. * * Results: * none * * Side effects: * keeps windowing system (X11) happy * *---------------------------------------------------------------------- */ static void RemapWindows( TkWindow *winPtr, TkWindow *parentPtr) { XWindowAttributes win_attr; if (winPtr->window) { XGetWindowAttributes(winPtr->display, winPtr->window, &win_attr); if (parentPtr == NULL) { XReparentWindow(winPtr->display, winPtr->window, XRootWindow(winPtr->display, winPtr->screenNum), win_attr.x, win_attr.y); } else if (parentPtr->window) { XReparentWindow(parentPtr->display, winPtr->window, parentPtr->window, win_attr.x, win_attr.y); } } } /* * Local Variables: * mode: c * c-basic-offset: 4 * fill-column: 78 * End: */