Tk Source Code

Check-in [3a29febb]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a couple of blank lines.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-6-branch
Files: files | file ages | folders
SHA3-256:3a29febbd18a0238db0fe22de962ce3e18f49ee0e7d7a31ebc5672a7a38265bf
User & Date: culler 2019-04-17 14:30:50
Context
2019-04-17
15:02
Adjust some whitespace. check-in: 2db3de5b user: culler tags: core-8-6-branch
14:30
Add a couple of blank lines. check-in: 3a29febb user: culler tags: core-8-6-branch
14:05
Mitigate future merge conflict headaches. check-in: 764eaf89 user: culler tags: core-8-6-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to macosx/tkMacOSXKeyEvent.c.

728
729
730
731
732
733
734

735
736
737
738
739
740
741
static unsigned
isFunctionKey(
    unsigned code)
{
    const unsigned last_keysym = (sizeof (convert_ns_to_X_keysym)
                                / sizeof (convert_ns_to_X_keysym[0]));
    unsigned keysym;

    for (keysym = 0; keysym < last_keysym; keysym += 2) {
	if (code == convert_ns_to_X_keysym[keysym]) {
	    return 0xFF00 | convert_ns_to_X_keysym[keysym+1];
	}
    }
    return 0;
}







>







728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
static unsigned
isFunctionKey(
    unsigned code)
{
    const unsigned last_keysym = (sizeof (convert_ns_to_X_keysym)
                                / sizeof (convert_ns_to_X_keysym[0]));
    unsigned keysym;

    for (keysym = 0; keysym < last_keysym; keysym += 2) {
	if (code == convert_ns_to_X_keysym[keysym]) {
	    return 0xFF00 | convert_ns_to_X_keysym[keysym+1];
	}
    }
    return 0;
}

Changes to macosx/tkMacOSXMenu.c.

694
695
696
697
698
699
700

701
702
703
704
705
706
707
		    /* This menuItem might have been previously disabled (XXX:
		     * track this), which would have disabled entries; we must
		     * re-enable the entries here.
		     */

		    int i = 0;
		    NSArray *itemArray = [submenu itemArray];

		    for (NSMenuItem *item in itemArray) {
			TkMenuEntry *submePtr = menuRefPtr->menuPtr->entries[i];

			/* Work around an apparent bug where itemArray can have
			 * more items than the menu's entries[] array.
			 */








>







694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
		    /* This menuItem might have been previously disabled (XXX:
		     * track this), which would have disabled entries; we must
		     * re-enable the entries here.
		     */

		    int i = 0;
		    NSArray *itemArray = [submenu itemArray];

		    for (NSMenuItem *item in itemArray) {
			TkMenuEntry *submePtr = menuRefPtr->menuPtr->entries[i];

			/* Work around an apparent bug where itemArray can have
			 * more items than the menu's entries[] array.
			 */