Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 14, 2026

Desktop file preview stopped working in v4.3.0+ on Windows 10 LTSC. The issue was traced to an overly strict cursor activation check in getSelectedFromDesktop() that caused false positives, preventing file path retrieval.

Changes

  • Changed IsCursorActivated() check in Shell32::getSelectedFromDesktop() to pass 0 (null HWND) instead of the Desktop window handle
  • This aligns the Desktop code path with the Explorer window pattern and checks the current thread state instead of the Desktop window's thread state
  • The foreground window is already validated in GetFocusedWindowType(), making the Desktop window-specific check redundant and problematic

Before:

if (HelperMethods::IsCursorActivated(reinterpret_cast<HWND>(LongToHandle(phwnd))))
    return;  // False positive on LTSC - Desktop thread flags trigger early return

After:

if (HelperMethods::IsCursorActivated(0))
    return;  // Check current thread like Explorer path does

The Desktop window thread state on LTSC has UI flags set that inappropriately triggered the activation check, while passing 0 checks QuickLook's own thread state which is the correct context.

Original prompt

This section details on the original issue you should resolve

<issue_title>previewing on Desktop Stopped working since ver 4.3.0</issue_title>
<issue_description>Bug:
I cannot preview anything on the desktop. Using the github version, no 3rd party extensions for desktop installed. I have reverted to version 3.7.3 and previewing works fine on desktop now.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Desktop
  2. Click on a file

Expected behavior
Supported files should preview

  • OS Version: Windows 10 LTSC
  • QuickLook Version: 4.4.0

</issue_description>

<agent_instructions>帮我分析原因</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix desktop previewing issue in version 4.4.0 Fix Desktop file preview failing since v4.3.0 on Windows 10 LTSC Jan 14, 2026
Copilot AI requested a review from emako January 14, 2026 04:53
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.

previewing on Desktop Stopped working since ver 4.3.0

2 participants