Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions src/dll/src/Initializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ namespace Nilesoft

cache->Packages.load();

config_has_changed();

if(!parser.Load())
{
Status.Error = true;
Expand Down Expand Up @@ -170,13 +172,16 @@ namespace Nilesoft
{
__try
{
if(config_has_changed())
Status.Refresh = true;

if(Status.Disabled)
{
uninit();
return false;
}

if(Status.Error && ch < 2)
if(Status.Error && ch < 2 && !Status.Refresh)
return false;

if(Status.Refresh)
Expand Down Expand Up @@ -228,7 +233,16 @@ namespace Nilesoft
{
if(Status.Error)
{
return detect_changes ? !config_has_changed() : true;
if(Status.Refresh)
return false;

if(detect_changes && config_has_changed())
{
Status.Refresh = true;
return false;
}

return true;
}
return false;
}
Expand Down
12 changes: 6 additions & 6 deletions src/dll/src/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ BOOL WINAPI NtUserTrackPopupMenu(HMENU hMenu, uint32_t uFlags, int x, int y, HWN
// is injected from explorer
if(!_initializer.Status.Loaded)
{
if(_initializer.has_error() || has_inited)
if(_initializer.has_error(true) || has_inited)
__leave; //goto skip;
_initializer.init();
}
Expand Down Expand Up @@ -758,10 +758,10 @@ LRESULT __stdcall TaskbarProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
}
}

if(_initializer.has_error())
if(_initializer.has_error(true))
{
_initializer.OnState();
if(_initializer.has_error())
if(_initializer.has_error(true))
return wndproc(hWnd, uMsg, wParam, lParam);
}
else
Expand Down Expand Up @@ -845,14 +845,14 @@ LRESULT __stdcall TaskbarSubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
}

if(_initializer.has_error())
if(_initializer.has_error(true))
{
if(msg != WM_RBUTTONDOWN)
return lret;

_initializer.OnState();

if(_initializer.has_error())
if(_initializer.has_error(true))
return lret;
}
else
Expand Down Expand Up @@ -1164,7 +1164,7 @@ STDAPI DllGetClassObject(_In_ REFCLSID rclsid, [[maybe_unused]] _In_ REFIID riid
if(!is_registered())
return hr;

if(_initializer.has_error())
if(_initializer.has_error(true))
return hr;

if(rclsid == IID_ContextMenu)
Expand Down