When `Invert Metro icon color` is enabled `Open-Shell` needs to
distinguish full color icons from monochromatic ones.
Color icons are displayed normally. Monochromatic ones are displayed
inverted (original background becomes transparent and foreground will
get Metro accent color).
Metro icon is loaded from Metro app resources (usually PNG image) as
bitmap with premultiplied alpha channel.
This causes monochromatic image to essentially become grayscale (because
RGB values are multiplied with alpha channel value).
Function `DetectGrayscaleImage` is used to distinguish such images.
Unfortunatelly if original image is grayscale (such as new Windows
Terminal icon) it is recognized as monochromatic and thus inverted.
To prevent this we will take into account also alpha channel in
`DetectGrayscaleImage`.
In monochromatic images alpha channel value will be the same as the rest of
channel values.
For color images alpha channel value will be different than other
channel values.
Fixes#364.
Delete confirmation dialog may be (partially) hidden behing start menu.
As a result the dialog may be not accessible because start menu(s) are
displayed as top-most windows.
Thus when executing menu command we will make menu(s) non-topmost. So that
other windows can be drawn on top of menu(s).
Fixes#257
In several cases we don't want menu(s) to close when an action on menu was
done. For example on drag-n-drop or menu item deletion (where confirmation
dialog is shown).
In such situations `s_bPreventClosing` was set to true (and then back to
false when closing was allowed again).
Though original code honored this variable only in certain situations and
typically (at least on Win10) menus were hidden/closed despite of it.
This patch changes the behavior and menus(s) are not closed when
`s_bPreventClosing` is set to true.
Basically now menu(s) stay visible until there is an action that changes
active window.
Following functionality was also removed because it is not needed now:
* CMenuContainer::HideTemp
* COwnerWindow::OnClear
WM_CLEAR was sent to the window only by already removed `HideTemp`
`Open-Shell` needs to adjust itself after OS upgrade. It seems that
`StartMenuHelper` registration is lost after such upgrade:
http://www.classicshell.net/forum/viewtopic.php?f=7&t=8082#p34821
To fix this registration, administrator rights are required (means user
interaction, UAC).
While this is acceptable in consumer environment, it is typically not
desired in business environment where users typically doesn't have
administrator rights.
This patch allows to run `Open-Shell` in silent upgrade mode that will:
* check if OS version changed (otherwise end immediately)
* perform OS upgrade tasks without any user interraction
Such mode can be then used to create scheduled task that will run this
silent upgrade check on every boot with system rights:
`schtasks /Create /RU "NT AUTHORITY\SYSTEM" /SC ONSTART /TN "Open-Shell OS updgrade check" /TR "%ProgramFiles%\Open-Shell\StartMenu.exe -upgrade -silent"`
#167
Commit 1a5f62a added possibility to hide Lock/Sleep/Hibernate buttons if
they were disabled in system power settings.
Unfortunately this didn't work for Lock button.
To fix the behavior we have to add lock command to `g_StdOptions` array
and then all the checks introduced in 1a5f62a will apply properly.
#173
Latest version of ClassicShell was 4.3.1. There is no reason to display
any warning about very old versions (< 2.0.0).
Besides, this will remove dependency on version.dll which could be misused
for DLL hijacking attack.
Fixes#72
* Fix naming inconsistencies
'Menu' vs 'StartMenu'
* Installer: Remove Facebook link
* Installer: Remove PayPal donate remnants
* OpenShellReadme: Remove info about product version
* Build: Add symbols to 7z archive
It is much smaller than ZIP (15MB vs 34MB).
* Build: Don't create source package
There is no need to create package with sources as sources for given
release can be easily obtained from git.
* AppVeyor: Remove unneeded install script
__MakeFinal.bat now handles it.
* Build: Less verbose output
* Build: Support for version suffix
AppVeyor may add suffix to version (X.Y.Z-abc) in case of PR builds.
* AppVeyor: Disable shallow clone
To be able to use git commands (in source indexing script).
Use history depth 1 instead.
* Build: Add source index to PDBs
Add source information to PDBs so that source files can be retrieved from Github by debugger.