From e064c934cb5a674eddd364664127314cdf6cd77f Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 28 Nov 2024 14:12:56 +0100 Subject: [PATCH] Windows: fixed detection of Windows 11 if custom exe launcher does not specify Windows 10+ compatibility in application manifest (issue #916) Windows binaries built and signed locally in clean workspace --- CHANGELOG.md | 3 ++- .../flatlaf/natives/flatlaf-windows-arm64.dll | Bin 23272 -> 23272 bytes .../flatlaf/natives/flatlaf-windows-x86.dll | Bin 21736 -> 21728 bytes .../natives/flatlaf-windows-x86_64.dll | Bin 23784 -> 23784 bytes .../src/main/cpp/WinWrapper.cpp | 14 ++++++++++++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc88bb42e..40feda24e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,8 @@ FlatLaf Change Log regression in 3.5) - Popup: Fixed NPE if `GraphicsConfiguration` is `null` on Windows. (issue #921) - Theme Editor: Fixed using color picker on secondary screen. - +- Fixed detection of Windows 11 if custom exe launcher does not specify Windows + 10+ compatibility in application manifest. (issue #916) ## 3.5.2 diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/flatlaf-windows-arm64.dll b/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/flatlaf-windows-arm64.dll index d9ebcfb5fb7d1645905e7544a4248d2c8b269c6c..716527e577ed3df9800e7d7b5cfe2d5708356ef2 100644 GIT binary patch delta 3652 zcmeH|c|6qlAICqRam@^qVKDAta+mv7&PZs0{h|Yr zcImXOtYd4-b}c&ARV!_z6~E8SeEohs_V3@HzwhJmp6B=TdLN(rJ0s0-q!|{hgadp> z52s`2vwR2V7Olr-=u?icJv3K=DSqeWr-MQcemW%Nu#f?pTF6suKt2 zx37r-#4`!lTGFH?MnDw{@*>gBkUwQ27BdXcQfN%Au)u>JyL1aq+AG6?S*TdXS%dE~ zD@Yg=W7JUrP+;u=X@KD}E9`=greu6@v=eQW91#bWfM%gD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*AeyNdco#Ixmwv^4S>^5->b zgpUVSY!z0W%+z_|ApC4boEzSz^~^f;^GUHrVO!H=<=Qt7RI4js_4rS^dG;fLyE3o* Q6*G8ACFsTK{lstc-<6af5&!@I diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/flatlaf-windows-x86.dll b/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/flatlaf-windows-x86.dll index ab1cbfd2e450ca18e3719d940f09df46fdf93f3d..fb0f8325d25750a87bbb9149991968b4d8348eb2 100644 GIT binary patch delta 3374 zcmdT_iCfzDiF4?$`VYFy$J+mQxK)lS~apOD2t#m25^bEfQGUtHYm%0P-_(g zwXWy`LEH*H3Mds(DN@u3Di*OUQdBC^+jBvE{tNH?e&3y$@0>ZyoXMo`1krth$n_*T z^XB-@-B*#hxcmJ_w9e|8$eLXDyf1-~-rPHpJ~?(zWK51vCdYuatAx~^JeHx2z!#x! z2s)||`L97Aq#My#(+Evlqz{DF6q%d%>I;YHHiT%%TXB+|RKVwh0X5X|5GtS}B$$m* zb{dr$}vvL+BJ#v2G{;&dL%1lJKNL@~ZW%p{WVD`E*@T{(|dLFCg-343ft z7ZcW4MxUwv$!AjUz-kw$}W@U^4H?jG0vOQ&}@pae}6u z+b9qrGH*k&O*WQEGBPZ{y-X=ksKP^9LN0t{sSQAdhJZn5<^x8?KM+TzB=p30H62-# zR{mfmkbRp0iceM*Q&s}ZV$2V6g&0r~q`z}-5`DX>8_94H%xmcuj4Xr^W#$rD_%_o7zAu?M zL^e*=UkD+a^lgC|(dQ9gVYb02QG$&O=fXG4aIUv71%-|xt=0CbvzL->5Z`DooeihviOUUbaho9r+`Tb$Qt<{mpt+c9WcqQz$H7L)Qd@U8 zERYd5gyaB9nt`hZlmi9uQP zKpZSLF?L7+^<{vjGeR+dGQcokJ|AiW{0&&*0x1K?O3rk1`U)|`Q~?Ln%UH~$CLkZ? zj*_^o5_bGlx?F@#gUWGjY_uer4Gv%p9Mx{ejTHC47u7LtY8`}2Eew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t|&RF9v%+t^%t`Qh64aS^(@F|S{L!5wUC?))YHKoO@$wkGDxa+Azgj~}LX zoLa2L58p0Pl~e|OpLw0+4Lft6tm10Wi?b`Mre9p&lp$x7YCIzMe=e}$ zgb-2PSEb2cZ|{jlYos(ha|_prCGO5@@sn)MR*X>!(lEgymB0_Htlxx-S! Qku7?fbG~(fzvP(w1FRlhEC2ui diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/flatlaf-windows-x86_64.dll b/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/flatlaf-windows-x86_64.dll index 9d31677bb776fb12aa2dbbca8579fe597324f318..e810d4a4e70466366b31c7e805141b6d955c6e95 100644 GIT binary patch delta 4404 zcmeHJdpy)x8$V}^OT!pujC%~Gh-lp9UT!0F5nZSaxzsLQ7A0NADz~OuI!fs#^}e=+=Xb1U!dOBMvd!>3(#Rf<1>_l9qGhIu&`+4N#Sb=H z&4BF0(rd$fXR=;Zh_{m>RS`Z%Zm2rp&4k6V$3euCea+!xp%XueLcv zxqol-4dJLc!BL6T1WF-%$a}kdGFhc&j>E`4HBY5>hz7}kbf_6)MUZrfKz)8>KNsYs zA2Vt=lo9fgUiF5}n+3tx^+V*{tV|*OLo+ zrebz53!z51D-Dl z#nzVB=yS28+l@--?^Z$kMgP#Zx{t=B&>TziNt)eho=7u`=6af2X)dIB-Y84ZLs}S1 z;o3hI7Q2r2IMBM7=0!B8(`-(&F3l{O-_zq|G+(2+W`qL}I!X(BXwIfNmF8tMFQ9o9 zJ@Ht=8Xlw8Aem-3AX$+V9UpH6pu2;U;{9Th=EZ!UxP0XbS{r-d;e$hifc-WA0Ychf z%caSs0gbeL(5VYXY6vO7^ET3G+bSt0B}tetI;9Aq1@L)UEsxfXOo|lRQ-KSt5fW13 z_tBssw1Jcgw1TLms3k{LVQOk>bW|Mpdu$O}1}~0P%4qc1uZmU7s2}Z&Pzp6}Ipqss z7K9!Wbt9fm5A@KBQ$2Q64|Qif#LcLKOZi5i6v2C^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5VU&ElDah5nQ}<+q)s;^*BY?jSjNgVG) zt;W+G{+Ik4%`Qc^t`2xoHE;jKZOfvkarT6)uiG(r6sar-_9zH7)OR>FzhdJYjeMRg z+vw_h`zC|hF`tL66t%vs&x-1_a!{DXoRQARJG%0<+YATu&F=2w>rx!c{*aqQJ`W4n zr#0&M>VU&7CiO=?ZhC#d>}{HTOWOVFmo8mtv+cJ`k!u|+@)hZ<{CG9vq;+!4)zz!Y z^;Za%GH%-3*^qD}Xx5U)hF$M{IeJI-@O=-G0-x0rLWfVt6t2@d*tB~6p%ZcL zFOIbSTaK7sB-?xo_@Uz92CqYlwp5$wfa2Vn2=;-L;=<4J= z(nU7c_og1Z*CV55c?kB}l!a_lJL0dO5$=9=NL7S*c4DO5FZON2?vAPRj=nobw#^bt z^tr_WOMjJDRQNu4KYiL~eUB4~lQyLFYj}vy1+OsQ(#3Kuy!YFnip`d)(g)%7Njpu0 z=Wn-25)_5|vb8_uJHBl0-2Kb*Lq!ogxSkUV-c)NJpERyga8Tm{-dvHiWZ~;O3+7zA zcQPq{*m$q6OI8>j-}>3(p)K!Bg-^Ee{El3cZpomxx^>(;?hW~NcK1U=bU$twos^qx zIIwlsxa5CMe4wIeT;cgFFY>C|^dGoeU}zC zU%X@5(oZ6*>6m;pOtkyl#8n@XcLa6ocHCK0*s$w8XYjZ~Hhb4(+Mek??phfvt4HkU zA%!zO34)9NVf5nIj27oM({_3J+`Pir=H!;irClQ9Q!bC{&(@TlE?zR<{8`(Y;>gp* z5zB0BcSnTfOe~Gu8j51?O^w%#IIoa>3--2bda7HbwN!FUWs!NuPsT4Up22HxzuZ5u z!!jh)bE`|_PQeGO8r4rnOTKyAMt*CueX+1cY(Dr(`Mq+`xcab*5q8QX<;6_e*w_J3Qzz5 diff --git a/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/WinWrapper.cpp b/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/WinWrapper.cpp index 1983a075b..c1276973f 100644 --- a/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/WinWrapper.cpp +++ b/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/WinWrapper.cpp @@ -30,12 +30,26 @@ HWND getWindowHandle( JNIEnv* env, jobject window ); //---- Utility ---------------------------------------------------------------- +typedef LONG (WINAPI *RtlGetVersion_Type)( OSVERSIONINFO* ); + extern "C" JNIEXPORT jlong JNICALL Java_com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_getOSBuildNumberImpl ( JNIEnv* env, jclass cls ) { OSVERSIONINFO info; info.dwOSVersionInfoSize = sizeof( info ); + info.dwBuildNumber = 0; + + // use RtlGetVersion for the case that app manifest does not specify Windows 10+ compatibility + // https://www.codeproject.com/Articles/5336372/Windows-Version-Detection + HMODULE ntdllModule = ::GetModuleHandleA( "ntdll.dll" ); + if( ntdllModule != NULL ) { + RtlGetVersion_Type pRtlGetVersion = (RtlGetVersion_Type) ::GetProcAddress( ntdllModule, "RtlGetVersion" ); + if( pRtlGetVersion != NULL && pRtlGetVersion( &info ) == 0 ) + return info.dwBuildNumber; + } + + // fallback if( !::GetVersionEx( &info ) ) return 0; return info.dwBuildNumber;