New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[win32][arm64] Support Dark Theme on newer Windows builds #1172
base: master
Are you sure you want to change the base?
[win32][arm64] Support Dark Theme on newer Windows builds #1172
Conversation
Thanks for your quick work! I now have the dark scrollbars again in my Arm64 box. Here are how I test it:
The above
and the
and the test program shows correct dark scrollbars in its window: For comparison, here's the same window (with lighted scrollbars) before this fix: |
Further more, I've built the complete Eclipse SDK with this fix, from my aggregator fork, and here's its main window showing nicely dark scrollbars on my Arm64 box: In previous builds before this fix, it was showing lighted scrollbars, which alerted me to the changed |
3b8abbf
to
5c7ff48
Compare
@niraj-modi or @SyntevoAlex could you please review this? I have no clue about the native code and no way to test it. |
The new test looks quite weak to me, because I suggest that instead both offsets |
@SyntevoAlex ah good idea. I'll work on that tomorrow :) |
5c7ff48
to
f48138b
Compare
@chirontt can you try with the latest changes? I changed the title of the PR too |
It would be nice to also have code comments with Windows versions, like here: eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c Lines 124 to 138 in 1a35d6e
|
^ this is just a suggestion, I will still approve without it. |
I don't have the old versions. @chirontt Can you find me the Windows builds before and after the original PR stopped working? |
I'm not quite sure I follow you here. It's not the Eclipse build that stops working; it's the recent (last month's) Windows Arm64 update that causes the problem due to changes in the You can grab the latest build of the Eclipse SDK here especially the WoA zip package. Just unzip it and run the Eclipse IDE, put it in dark mode and you'll see the lighted scrollbars in the IDE. This latest build contains your original commit for the To see if/how it works before, you need to restore your WoA box to before the current (last month's) Windows update, and test it with the same Eclipse SDK mentioned above. You'd see the dark scrollbars as intended. |
I've tried the same steps as in my previous comment, and the scrollbars are still properly in dark mode, with your latest fix. Here's the screenshot of the |
@chirontt Just to clarify:
If yes, please run |
Yes.
Yes.
|
Continues #1048 #1045
Here's the disassembly:
The
add x0,x8,
instruction changed its parameter. So now theadrp x8,...
instruction looks more stable because it uses a global variable (Using a global variable is also what is done when validating for the Intel x64 uxtheme.dll)See https://developer.arm.com/documentation/ddi0602/2024-03/Base-Instructions/ADRP--Form-PC-relative-address-to-4KB-page-
functionPtr[0x10] & 0x1F) == 0x08
checks that the destination register isx8
(functionPtr[0x13] & 0x90) == 0x90
checks that the opcode is ADRP