Skip to content

Windows 11 start button support #1222

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

Merged
merged 12 commits into from
Dec 6, 2022
Merged

Conversation

ge0rdi
Copy link
Member

@ge0rdi ge0rdi commented Nov 30, 2022

plus many small improvements

x64 version of pdbstr doesn't work (because of missing __CxxFrameHandler4 on Windows Server 2019).
Fortunately it seems that x86 version works well, so we can use that one.
We are storing color settings in BBGGRR format (for historical reasons).
This may be confusing for people that are used to (more widely used) RRGGBB format.

Thus we will present color settings in RRGGBB format when editing.

We will still use BBGGRR format for those settings internally. To
maintain backward compatibility with existing settings stored in
registry/xml.

Also setting descriptions now contain hint about expected color format.
This way it should be more clear what values `Open-Shell` expects.

Fixes Open-Shell#82, Open-Shell#1141.
This way `Open-Shell Modern Settings` folder won't appear in File
Explorer's frequent list.

Fixes Open-Shell#744.
Multi-string settings have to be terminated by new line.
Otherwise there may be some garbage (following the string)
stored in registry.
Debug StartMenuDLL used to not find skins when put to Open-Shell
installation folder.

Now it will try to look for skins in default location (Skins folder in
the same folder as DLL) and use alternative (Skins folder one level up)
if not present.
  - handling of `Taskbar alignment` setting (left/center)
  - start menu position is based on position of start button
  - mouse clicks to original button now work properly (without triggering original menu)
  - custom button is properly positioned
  - Win+X works properly
@AppVeyorBot
Copy link

@ge0rdi
Copy link
Member Author

ge0rdi commented Nov 30, 2022

@bonzibudd
@Gaurav-Original-ClassicShellTester
@XenHat

Guys, any help with testing will be much appreciated 🙏

I was working on this for some time and testes what I could (including on Win7/Win10).
It seems to be also compatible with ExplorerPatcher (but I'm not using the program so I did just some basic testing).

When taskbar is hidden its window is moved off the screen (except for
few pixels at border). It may happen that the taskbar window actually
spans to another monitor (though still not visible).

MonitorFromWindow API may thus return different monitor handle than the
one visible taskbar is on.

We will use GetTaskbarPosition function that correctly identifies taskbar's
monitor by checking rectangle of visible taskbar.

Fixes Open-Shell#908
@AppVeyorBot
Copy link

@bonzibudd
Copy link
Member

Thank you ge0rdi! I will test this as soon as possible. Currently building the program since AppVeyor is down on my end.

@ge0rdi
Copy link
Member Author

ge0rdi commented Dec 2, 2022

@bonzibudd
Hmm, weird. It seems to be working fine here.
Anyways, thank you :)

@bonzibudd
Copy link
Member

@ge0rdi
I just had a little while to test the new changes, everything that I’ve come across seems to be working as expected. I’m running Insider build 25252 for reference.

The menu positioning and the button integration seem to be working correctly, so I’m super happy about that. However, since around build 25217, the default Windows key is also overridden by the Win11 menu, so I think that will have to be fixed as well (I can provide more information if you think it’s worth diagnosing from an Insider build).

I appreciate the addition of the version # in the context menu :) I also like the transition to RRGGBB for the color palette. Do you know if this will affect existing installs that have custom colors, or is it a purely visual change?

For the skin changes, I didn’t find any issues with the skins I tested, but I will try some more when I have time. Maybe @CTVCAM8 can do some testing as well.

Thank you again for this!

@ge0rdi
Copy link
Member Author

ge0rdi commented Dec 2, 2022

However, since around build 25217, the default Windows key is also overridden by the Win11 menu, so I think that will have to be fixed as well (I can provide more information if you think it’s worth diagnosing from an Insider build).

I was focusing on standard Win11 22H2 build. But for sure would like to have a look at Insider as well.
I will install it to VM and try to have a look.

Do you know if this will affect existing installs that have custom colors, or is it a purely visual change?

The intent is to change visual representation only (the way how it is presented in settings).
Original BBGGRR format will be still used internally. So it should be backward compatible.

@ge0rdi ge0rdi self-assigned this Dec 2, 2022
@bonzibudd
Copy link
Member

@ge0rdi
So I've tested this a little bit more, and I noticed that the custom button images don't get rid of the Win11 button behind it. This doesn't have any functional problems but it looks strange with custom button images.
image
I thought you might already know about this, but just wanted to comment to confirm.

Also, I noticed that the "Windows 10 Settings" item is still present on Win11, so we can rename that (if the option is still applicable on Win11.) Or, maybe it would make more sense to move it to the "Controls" tab since it seems redundant to have a tab dedicated to only one option.
I re-discovered the issue #1164 and I'm going to add a log there. That seems like it could be an appropriate addition to this pull.

@ge0rdi
Copy link
Member Author

ge0rdi commented Dec 3, 2022

I noticed that the custom button images don't get rid of the Win11 button behind it

Yup, I know about this. It is unfortunate but I cannot do anything about it.
In Windows 11 the start button (and most likely whole taskbar) is handled by new XAML framework (I think that's the thing used for modern applications).
I have no clue how to tell it to not display some windows or so.
It is quite different from traditional windows subclassing and message hooking.

If anybody wants to use custom icon, it simply needs to cover the original button.
Also, it cannot contain completely transparent areas, as those will cause mouse clicks to go through. There has to be at least some minimal alpha value (which will still look transparent).

Also, I noticed that the "Windows 10 Settings" item is still present on Win11, so we can rename that (if the option is still applicable on Win11.)

I cannot verify whether it works for Win11 as I don't have multi-monitor setup with Win11 at hand.
I guess I will leave this for now, until it will be clear if it makes sense on Win11 too.

Or, maybe it would make more sense to move it to the "Controls" tab since it seems redundant to have a tab dedicated to only one option.

Yup. I agree that it looks weird to have separate tab with just one option.
But moving it will probably break existing setting.
Though I'm not sure how many people use this setting actually.

I re-discovered the issue #1164 and I'm going to add a log there. That seems like it could be an appropriate addition to this pull.

Looks simple enough.
I will add fix for it.

It is not a program that user will use explicitly.
No need to show it in the list even if Windows tracks it as frequent
program for some reason.

Fixes Open-Shell#1164
It seems that Windows 11 prefers `Segoe Fluent Icons` over `Segoe MDL2 Assets` font.
https://learn.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font

Most of settings defined in `AllSystemSettings_{253E530E-387D-4BC2-959D-E6F86122E5F2}.xml` now refer to the new font.
@AppVeyorBot
Copy link

@bonzibudd
Copy link
Member

@ge0rdi
I tried both of those new changes; they seem to be working as expected.
I found one issue with the Win11 button, it seems that Open-Shell menu and the right-click menu aren't accessible via touch screen. They do work with the custom start button enabled, though. Let me know if you would like me to attach any log file to diagnose this.

Other than that, I haven't found any other issues, but I might try ExplorerPatcher at some point to see if it has any issues, although I doubt it since it's based off of Windows 10 code.

@ge0rdi
Copy link
Member Author

ge0rdi commented Dec 5, 2022

I found one issue with the Win11 button, it seems that Open-Shell menu and the right-click menu aren't accessible via touch screen.

Yup, I guess that's expected (unfortunately).
What I did is to hook mouse events and steal them so they won't reach the XAML framework (when in start button area).
But touch events are handled differently and I don't know how to hook those :(

I will need to get touch enabled device so that I can debug and play with it.
Until then I cannot do much about it, I guess :(

@ge0rdi
Copy link
Member Author

ge0rdi commented Dec 6, 2022

I guess I will merge this one.
Feedback was good so far.
I'm not aware of any issues.

@ge0rdi
Copy link
Member Author

ge0rdi commented Dec 6, 2022

@bonzibudd
Please, create separate issues for outstanding problems (like the touch screen issue).

@ge0rdi ge0rdi merged commit 0465ac9 into Open-Shell:master Dec 6, 2022
@ge0rdi ge0rdi deleted the improvements branch December 6, 2022 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants