Tk Source Code

Check-in [60b06a2e]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:Some bit of Windows 8.1 compatibility: See http://msdn.microsoft.com/en-us/library/windows/desktop/dn302074.aspx
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 60b06a2e6ca2e415bd2f81c87bcdea0ac68911a2
User & Date: jan.nijtmans 2013-11-20 15:39:06
Context
2014-01-23
22:27
Fix [3606644]: Static build misses fontconfig check-in: 320dbce6 user: jan.nijtmans tags: trunk
2014-01-02
17:48
Arjen Marcus' patch, with minor edits in the ParseProc and PrintProc (making the offset obsolete). TODO: -other items than ovals and rects, -documentation Leaf check-in: b2e1fe4d user: jan.nijtmans tags: rfe-e9a842a3c5
2013-11-20
15:39
Some bit of Windows 8.1 compatibility: See http://msdn.microsoft.com/en-us/library/windows/desktop/dn302074.aspx check-in: 60b06a2e user: jan.nijtmans tags: trunk
15:35
Some bit of Windows 8.1 compatibility: See http://msdn.microsoft.com/en-us/library/windows/desktop/dn302074.aspx check-in: 5650767e user: jan.nijtmans tags: core-8-5-branch
09:56
typo check-in: e4eb7f30 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to win/tkWinMenu.c.

  3190   3190       /* See: [Bug #3239768] tk8.4.19 (and later) WIN32 menu font support */
  3191   3191       struct {
  3192   3192           NONCLIENTMETRICS metrics;
  3193   3193   #if (WINVER < 0x0600)
  3194   3194           int padding;
  3195   3195   #endif
  3196   3196       } nc;
  3197         -    OSVERSIONINFO os;
         3197  +    OSVERSIONINFOW os;
  3198   3198   
  3199   3199       /*
  3200   3200        * Set all of the default options. The loop will terminate when we run out
  3201   3201        * of options via a break statement.
  3202   3202        */
  3203   3203   
  3204   3204       defaultBorderWidth = GetSystemMetrics(SM_CXBORDER);
................................................................................
  3210   3210       if (!firstTime) {
  3211   3211   	Tcl_DStringFree(&menuFontDString);
  3212   3212       }
  3213   3213       Tcl_DStringInit(&menuFontDString);
  3214   3214   
  3215   3215       nc.metrics.cbSize = sizeof(nc);
  3216   3216   
  3217         -    os.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
  3218         -    GetVersionEx(&os);
         3217  +    os.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
         3218  +    GetVersionExW(&os);
  3219   3219       if (os.dwMajorVersion < 6) {
  3220   3220   	nc.metrics.cbSize -= sizeof(int);
  3221   3221       }
  3222   3222   
  3223   3223       SystemParametersInfo(SPI_GETNONCLIENTMETRICS, nc.metrics.cbSize,
  3224   3224   	    &nc.metrics, 0);
  3225   3225       menuFont = CreateFontIndirect(&nc.metrics.lfMenuFont);

Changes to win/tkWinX.c.

   116    116   void
   117    117   TkGetServerInfo(
   118    118       Tcl_Interp *interp,		/* The server information is returned in this
   119    119   				 * interpreter's result. */
   120    120       Tk_Window tkwin)		/* Token for window; this selects a particular
   121    121   				 * display and server. */
   122    122   {
   123         -    OSVERSIONINFO os;
          123  +    OSVERSIONINFOW os;
   124    124   
   125         -    os.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
   126         -    GetVersionEx(&os);
          125  +    os.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
          126  +    GetVersionExW(&os);
   127    127       Tcl_SetObjResult(interp, Tcl_ObjPrintf("Windows %d.%d %d %s",
   128    128   	    (int) os.dwMajorVersion, (int) os.dwMinorVersion,
   129    129   	    (int) os.dwBuildNumber,
   130    130   #ifdef _WIN64
   131    131   	    "Win64"
   132    132   #else
   133    133   	    "Win32"
................................................................................
   322    322    *----------------------------------------------------------------------
   323    323    */
   324    324   
   325    325   int
   326    326   TkWinGetPlatformId(void)
   327    327   {
   328    328       if (tkPlatformId == 0) {
   329         -	OSVERSIONINFO os;
          329  +	OSVERSIONINFOW os;
   330    330   
   331         -	os.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
   332         -	GetVersionEx(&os);
          331  +	os.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
          332  +	GetVersionExW(&os);
   333    333   	tkPlatformId = os.dwPlatformId;
   334    334   
   335    335   	/*
   336    336   	 * Set tkWinTheme to be TK_THEME_WIN_XP or TK_THEME_WIN_CLASSIC. The
   337    337   	 * TK_THEME_WIN_CLASSIC could be set even when running under XP if the
   338    338   	 * windows classic theme was selected.
   339    339   	 */

Changes to win/ttkWinXPTheme.c.

  1255   1255   MODULE_SCOPE int TtkXPTheme_Init(Tcl_Interp *interp, HWND hwnd)
  1256   1256   {
  1257   1257       XPThemeData *themeData;
  1258   1258       XPThemeProcs *procs;
  1259   1259       HINSTANCE hlibrary;
  1260   1260       Ttk_Theme themePtr, parentPtr, vistaPtr;
  1261   1261       ElementInfo *infoPtr;
  1262         -    OSVERSIONINFO os;
         1262  +    OSVERSIONINFOW os;
  1263   1263   
  1264         -    os.dwOSVersionInfoSize = sizeof(os);
  1265         -    GetVersionEx(&os);
         1264  +    os.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
         1265  +    GetVersionExW(&os);
  1266   1266   
  1267   1267       procs = LoadXPThemeProcs(&hlibrary);
  1268   1268       if (!procs)
  1269   1269   	return TCL_ERROR;
  1270   1270       procs->stubWindow = hwnd;
  1271   1271   
  1272   1272       /*

Changes to win/wish.exe.manifest.in.

     4      4       <assemblyIdentity
     5      5   	    version="@[email protected]"
     6      6   	    processorArchitecture="@[email protected]"
     7      7   	    name="Tcl.Tk.wish"
     8      8   	    type="win32"
     9      9   	/>
    10     10       <description>Tcl/Tk windowing shell (wish)</description>
           11  +    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
           12  +	<security>
           13  +	    <requestedPrivileges>
           14  +		<requestedExecutionLevel
           15  +			level="asInvoker"
           16  +			uiAccess="false"
           17  +		    />
           18  +	    </requestedPrivileges>
           19  +	</security>
           20  +    </trustInfo>
           21  +    <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
           22  +	<application>
           23  +	    <!-- Windows 8.1 -->
           24  +	    <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
           25  +	    <!-- Windows 8 -->
           26  +	    <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
           27  +	    <!-- Windows 7 -->
           28  +	    <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
           29  +	    <!-- Windows Vista -->
           30  +	    <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
           31  +	</application>
           32  +    </compatibility>
    11     33       <asmv3:application>
    12     34   	<asmv3:windowsSettings
    13     35   		xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
    14     36   	    <dpiAware>true</dpiAware>
    15     37   	</asmv3:windowsSettings>
    16     38       </asmv3:application>
    17     39       <dependency>