microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.64k stars 6.57k forks source link

Resuming/logging back in from idle-time screen-off shows PowerToys reported error #36081

Open NWinocur opened 7 hours ago

NWinocur commented 7 hours ago

Microsoft PowerToys version

0.86.0.0

Installation method

PowerToys auto-update

Running as admin

No

Area(s) with issue?

General

Steps to reproduce

  1. Enable the following PowerToys modules: Advanced Paste, Awake, Color Picker, Environment Variables, FancyZones, File Locksmith, Find My Mouse, Hosts File Editor, Hosts File Editor, Image Resizer, Mouse Highlighter, Peek, PowerRename, PowerToys Run, Registry Preview, Shortcut Guide, Workspaces
  2. Disable the following PowerToys modules: Always On Top, Crop and Lock, Keyboard Manager, Mouse Jump, Mouse Pointer Crosshairs, Mouse Without Borders, New+, Quick Accent, Screen Ruler, Text Extractor
  3. Log into Windows
  4. Leave computer idle long enough for screen to turn off
  5. Move mouse/use keyboard to turn screen back on and enter password at Windows' lockscreen

✔️ Expected Behavior

Not expecting to see error message. Or if seeing error message, at least expecting more easily-understood error message.

❌ Actual Behavior

"Something went wrong." dialog is displayed, requesting "Please file a bug in the PowerToys GitHub repository."

Error message contents: `

Version: 0.86.0.0 OS Version: Microsoft Windows NT 10.0.19045.0 IntPtr Length: 8 x64: True Date: 2024-11-24 07:00:42 AM Exception: System.Runtime.InteropServices.COMException (0x80263001): {Desktop composition is disabled} The operation could not be completed because desktop composition is disabled. (0x80263001) at Standard.NativeMethods.DwmExtendFrameIntoClientArea(IntPtr hwnd, MARGINS& pMarInset) at System.Windows.Shell.WindowChromeWorker._ExtendGlassFrame() at System.Windows.Shell.WindowChromeWorker._UpdateFrameState(Boolean force) at System.Windows.Shell.WindowChromeWorker._HandleDwmCompositionChanged(WM uMsg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Shell.WindowChromeWorker._WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

`

Log file contents: `[2024-11-24 07:00:41.4654] [FATAL]

Exception

System.Runtime.InteropServices.COMException: {Desktop composition is disabled} The operation could not be completed because desktop composition is disabled. (0x80263001)
   Source: PresentationFramework
   TargetAssembly: PresentationFramework, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
   TargetModule: PresentationFramework.dll
   TargetSite: Void DwmExtendFrameIntoClientArea(IntPtr, Standard.MARGINS ByRef)
   at Standard.NativeMethods.DwmExtendFrameIntoClientArea(IntPtr hwnd, MARGINS& pMarInset)
   at System.Windows.Shell.WindowChromeWorker._ExtendGlassFrame()
   at System.Windows.Shell.WindowChromeWorker._UpdateFrameState(Boolean force)
   at System.Windows.Shell.WindowChromeWorker._HandleDwmCompositionChanged(WM uMsg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Shell.WindowChromeWorker._WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Environment

Assemblies - PowerToys.PowerLauncher

`

Other Software

No response

similar-issues-ai[bot] commented 7 hours ago

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.