PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

Some display errors with Command Palette after theme color change

Open wjj-8283 opened this issue 8 months ago • 3 comments

Microsoft PowerToys version

0.90.0

Installation method

PowerToys auto-update

Running as admin

Yes

Area(s) with issue?

Command Palette

Steps to reproduce

Use keyboard shortcut to activate it after a theme color change (from dark to light or from light to dark). After I opened Command Palette Settings, it became normal.

✔️ Expected Behavior

Normally change the theme.

❌ Actual Behavior

Some display errors. Here are the screenshots:

Image Image

Other Software

No.

wjj-8283 avatar Apr 08 '25 09:04 wjj-8283

I didn't use any tools like MicaForEveryone to modify the texture of windows.

wjj-8283 avatar Apr 08 '25 09:04 wjj-8283

previously: https://github.com/microsoft/PowerToys/issues/38659

I thought we had fixed that in https://github.com/zadjii-msft/PowerToys/pull/373

But you know what, we switched to the standard acrylic about the time we merged into PT, and I'm betting we didn't include the zadjii-msft#373 fix on the new acrylic

zadjii-msft avatar Apr 16 '25 19:04 zadjii-msft

Sometimes I've seen CmdPal freeze, then crash on a theme change. I couldn't repro it on v0.91.1.

Along with the intermediate theme state, the Command Palette doesn't automatically update extension icons when the theme changes (see "Assigned to Me")

Image

lauren-ciha avatar May 23 '25 16:05 lauren-ciha

On recent dev I'm getting an animated flash after I toggled system dark mode. But not like the ugly "I've nothing to render yet". My current app and system theme is dark. When I open CmdPal it's dark, then it instantly flashes to white and quicky, but smoothly, changes back to dark. I tried to record it, but the captured video only shows the gray half-state.

Edit: Oh, it is actually flickering color is backdrop's FallbackColor which seems to be stuck and not switching with the theme. And also tint colors sometime won't update.

Edit 2: Oook, so... I'm in the dark theme and my colors go like this for some time after theme change:

  • Light fallback color
  • Dark tint color
  • Light tint color And then it auto-magically fixes itself 🤯. GetAcrylicConfig is returned with values for the correct theme.

Sometimes I've seen CmdPal freeze, then crash on a theme change. I couldn't repro it on v0.91.1.

I was able to crash CmdPal regularly while testing Toggle Dark Mode. The crash often occurred when I rapidly switched between modes, but it still seemed somewhat "random." This behavior appears to be more of a WinUI issue than something specific to CmdPal. I just leave the stack trace here for future reference.

Stack Trace

 	ntdll.dll!RtlpExecuteHandlerForException()	Unknown
 	ntdll.dll!RtlDispatchException()	Unknown
 	ntdll.dll!KiUserExceptionDispatch()	Unknown
 	wuceffectsi.dll!winrt::impl::root_implements<struct SystemBackdropInternal::BaseController,struct winrt::Windows::Foundation::IClosable,struct winrt::Microsoft::UI::IClosableNotifier,struct winrt::Microsoft::UI::Partner::IClosableNotifierPartner,struct winrt::Microsoft::UI::Composition::SystemBackdrops::ISystemBackdropController,struct winrt::Microsoft::UI::Composition::SystemBackdrops::ISystemBackdropControllerWithTargets>::query_interface_common(struct winrt::guid const &,void * *)	Unknown
 	wuceffectsi.dll!winrt::implements<struct SystemBackdropInternal::BaseController,struct winrt::Windows::Foundation::IClosable,struct winrt::Microsoft::UI::IClosableNotifier,struct winrt::Microsoft::UI::Partner::IClosableNotifierPartner,struct winrt::Microsoft::UI::Composition::SystemBackdrops::ISystemBackdropController,struct winrt::Microsoft::UI::Composition::SystemBackdrops::ISystemBackdropControllerWithTargets>::QueryInterface(struct _GUID const &,void * *)	Unknown
 	wuceffectsi.dll!winrt::impl::weak_ref<1,1>::Resolve(struct winrt::guid const &,void * *)	Unknown
 	wuceffectsi.dll!SystemBackdropInternal::WeakRef<struct winrt::Microsoft::UI::Composition::SystemBackdrops::implementation::DesktopAcrylicController>::Lock(void)	Unknown
 	wuceffectsi.dll!winrt::impl::delegate<winrt::Windows::System::DispatcherQueueHandler,<lambda_85876a61a9cd70d1ddbd6c52ec76ca31>>::Invoke()	Unknown
 	CoreMessaging.dll!Windows::System::DispatcherQueue::DeferInvokeCallback(void *)	Unknown
 	CoreMessaging.dll!CFlat::SehSafe::Execute<<lambda_654db17c35df07198786f0867aa10de6>>()	Unknown
 	CoreMessaging.dll!Microsoft::CoreUI::ActionCallback::ImportAdapter$(class CFlat::Box$1<struct CFlat::FunctionPointerAndUserData$1<long (*)(void *)> > *)	Unknown
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::DeferredCall::Callback_Dispatch(void)	Unknown
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::DeferredCallDispatcher::Callback_OnDispatch(void)	Unknown
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchLoop(enum Microsoft::CoreUI::Dispatch::RunnablePriorityMask)	Unknown
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop(enum Microsoft::CoreUI::Dispatch::RunMode)	Unknown
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::DrainCoreMessagingQueue(enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,void * *)	Unknown
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch(bool,enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,void * *)	Unknown
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::DoWork(struct HWND__ *,enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,bool)	Unknown
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::WindowProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)	Unknown
 	user32.dll!00007ffe878581d6()	Unknown
 	user32.dll!00007ffe87857a5c()	Unknown
 	user32.dll!00007ffe87888eb3()	Unknown
 	ntdll.dll!KiUserCallbackDispatcherContinue()	Unknown
 	win32u.dll!00007ffe86a81324()	Unknown
 	user32.dll!00007ffe87880322()	Unknown
 	Microsoft.ui.xaml.dll!00007ffc50f7eeb0()	Unknown
 	Microsoft.ui.xaml.dll!00007ffc50e329e8()	Unknown
 	Microsoft.ui.xaml.dll!00007ffc50fe473f()	Unknown
 	[Managed to Native Transition]	
 	Microsoft.WinUI.dll!ABI.Microsoft.UI.Xaml.IApplicationStaticsMethods.Start(WinRT.IObjectReference _obj = {WinRT.ObjectReference<WinRT.Interop.IUnknownVftbl>}, Microsoft.UI.Xaml.ApplicationInitializationCallback callback = {Method = {System.Reflection.RuntimeMethodInfo}})	Unknown
 	Microsoft.WinUI.dll!Microsoft.UI.Xaml.Application.Start(Microsoft.UI.Xaml.ApplicationInitializationCallback callback = {Method = {System.Reflection.RuntimeMethodInfo}})	Unknown
>	Microsoft.CmdPal.UI.dll!Microsoft.CmdPal.UI.Program.Main(string[] args = {string[0]}) Line 71	C#
 	[Native to Managed Transition]	
 	hostpolicy.dll!00007ffe446ae93b()	Unknown
 	hostpolicy.dll!00007ffe446aec1c()	Unknown
 	hostpolicy.dll!00007ffe446af553()	Unknown
 	hostfxr.dll!00007ffe4470d8a6()	Unknown
 	hostfxr.dll!00007ffe4470fe05()	Unknown
 	hostfxr.dll!00007ffe44711eb2()	Unknown
 	hostfxr.dll!00007ffe447103d2()	Unknown
 	hostfxr.dll!00007ffe44708580()	Unknown
 	Microsoft.CmdPal.UI.exe!00007ff7eca02b52()	Unknown
 	Microsoft.CmdPal.UI.exe!00007ff7eca02f66()	Unknown
 	Microsoft.CmdPal.UI.exe!00007ff7eca12a88()	Unknown
 	kernel32.dll!00007ffe8805e8d7()	Unknown
 	ntdll.dll!RtlUserThreadStart()	Unknown

jiripolasek avatar Jul 10 '25 17:07 jiripolasek