Skip to content

Conversation

@vanzue
Copy link
Contributor

@vanzue vanzue commented Jan 7, 2026

This uses IVirtualDesktopManagerInternal*, which is an undocumented Windows Shell internal API.
These interfaces are not stable and can change across Windows updates, so using them in PowerToys carries some long-term risk

@niels9001 niels9001 self-requested a review January 7, 2026 13:11
@Jaylyn-Barbee
Copy link
Contributor

@YexuanXiao, just looping you in here as you were the original author of the PR. We are likely to still move forward just without this feature.

@YexuanXiao
Copy link
Contributor

Although this feature is unstable, Windows generally does not change it frequently, so I don't see it as a problem. As the one who implemented it, I will continue to maintain it in the future. Why are you in such a hurry to revert it?

@vanzue
Copy link
Contributor Author

vanzue commented Jan 8, 2026

@YexuanXiao We’re really getting close to the next release, so we’ve decided to open a revert PR first.
Personally, even though these internal APIs are known to work today, they’re undocumented and come with no compatibility guarantees. Using them in a Microsoft project like PowerToys could be misleading, as it may implicitly signal that this is a supported or stable approach, which we want to avoid.
Today, I’ll open another pr to remove this specific internal-API-based part from the feature and keep the rest of the functionality intact. If that is going to work, I don't think we need this revert pr

@vanzue
Copy link
Contributor Author

vanzue commented Jan 8, 2026

image After removing the internal API usage, I realized we still have some remaining work to do in Settings, and we’re now moving toward a release candidate. To avoid further back and forth during the release process, I’ll revert this PR for now and proceed with the release. I’ll re-open your original PR and continue from there. Thanks a lot for your time and the work you’ve put into this — and sorry for the extra churn this causes.

@vanzue vanzue merged commit 9c58574 into main Jan 8, 2026
15 checks passed
@vanzue vanzue deleted the revert-42624-main branch January 8, 2026 02:14
@vanzue
Copy link
Contributor Author

vanzue commented Jan 8, 2026

@YexuanXiao I tried reverting the revert, but that would make the new commit authored by me. To avoid any confusion around credits, would you mind re-opening the PR from your branch instead?

Thanks a lot for your help, and really appreciate the work you put into this.

@YexuanXiao
Copy link
Contributor

@YexuanXiao I tried reverting the revert, but that would make the new commit authored by me. To avoid any confusion around credits, would you mind re-opening the PR from your branch instead?

Thanks a lot for your help, and really appreciate the work you put into this.

I've opened #44598.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reverts a feature that allowed desktop wallpapers to switch automatically with Light/Dark mode. The revert is necessary because the feature relied on IVirtualDesktopManagerInternal*, an undocumented Windows Shell internal API that poses long-term stability risks as it can change across Windows updates.

Changes:

  • Removed wallpaper switching functionality from the LightSwitch module
  • Eliminated dependencies on undocumented Windows internal APIs
  • Cleaned up related UI components, settings, and resource strings

Reviewed changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
LightSwitchViewModel.cs Removed wallpaper-related properties, validation logic, and event handlers
Resources.resw Removed UI text strings for wallpaper configuration options
LightSwitchPage.xaml.cs Removed wallpaper file picker implementation
LightSwitchPage.xaml Removed wallpaper UI components and converter declarations
LightSwitchSettings.cs Removed wallpaper properties from settings cloning
LightSwitchProperties.cs Removed wallpaper-related property definitions and defaults
ThemeHelper.h (Service) Created new simplified header without wallpaper functions
ThemeHelper.cpp (Service) Created new implementation with only theme and night light support
SettingsConstants.h (Service) Created new constants file without wallpaper-related settings
SettingsConstants.cpp (Service) Added empty implementation file
LightSwitchStateManager.cpp Removed wallpaper path validation and application logic
LightSwitchSettings.h Removed wallpaper configuration fields from struct
LightSwitchSettings.cpp Removed wallpaper settings loading logic
LightSwitchService.vcxproj.filters Updated file references from Common to Service directory
LightSwitchService.vcxproj Updated include paths and source file references
LightSwitchService.cpp Removed wallpaper setting function and integration
dllmain.cpp (ModuleInterface) Removed wallpaper settings from module configuration
ThemeHelper.h (ModuleInterface) Created new simplified header for module interface
ThemeHelper.cpp (ModuleInterface) Created new implementation without wallpaper support
LightSwitchModuleInterface.vcxproj.filters Updated file references and removed natvis item
LightSwitchModuleInterface.vcxproj Removed Common directory includes and WIL library dependency
ThemeHelper.h (Common - deleted) Removed common header with wallpaper API declarations
ThemeHelper.cpp (Common - deleted) Removed implementation using undocumented Windows APIs
SettingsConstants.h (Common - deleted) Removed common constants including wallpaper settings
expect.txt Removed spell-check exceptions for wallpaper-related terms
Comments suppressed due to low confidence (1)

src/settings-ui/Settings.UI/SettingsXAML/Views/LightSwitchPage.xaml.cs:1

  • Corrected character encoding for degree symbol. The character '�' should be '°' for proper display.
// Copyright (c) Microsoft Corporation

{
shouldBeLight = !IsNightLightEnabled();
}
}
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace after closing brace should be removed for code cleanliness.

Suggested change
}
}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants