mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[PT Run] Refactoring: combined all NativeMethods.cs files for plugins… (#15807)
* [PT Run] Refactoring: combined all NativeMethods.cs files for plugins into Wox.Plugin/Common/Win32/ * Fixed spell check * [PT Run] Changed NativeMethods.Helpers to Win32Helpers (seperate class) to not conflict with Microsoft.PowerToys.Settings.UI.Library.Helpers * [PT Run] Renamed Constants.cs to ConstantsAndStructs.cs and moved all of them from NativeMethods.cs * [PT Run] Merged ConstantsAndStructs.cs into NativeMethods.cs and renamed Constants to Win32Constants to avoid conflicting * [PT Run] Added missing summaries + fixed missed refactored method * [PT Run] Use using directive instead of alias + updated method call for .Net 6 * [PT Run] Fixed missed using alias + spell check
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
// Code forked from Betsegaw Tadele's https://github.com/betsegaw/windowwalker/
|
||||
using System;
|
||||
using Wox.Plugin.Common.Win32;
|
||||
|
||||
namespace Microsoft.Plugin.WindowWalker.Components
|
||||
{
|
||||
@@ -18,7 +19,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
/// <param name="hwnd">handle to the window to exclude</param>
|
||||
public static void SetWindowExclusionFromLivePreview(IntPtr hwnd)
|
||||
{
|
||||
int renderPolicy = (int)NativeMethods.DwmNCRenderingPolicy.Enabled;
|
||||
int renderPolicy = (int)DwmNCRenderingPolicies.Enabled;
|
||||
|
||||
_ = NativeMethods.DwmSetWindowAttribute(
|
||||
hwnd,
|
||||
@@ -38,7 +39,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
true,
|
||||
targetWindow,
|
||||
windowToSpare,
|
||||
NativeMethods.LivePreviewTrigger.Superbar,
|
||||
LivePreviewTrigger.Superbar,
|
||||
IntPtr.Zero);
|
||||
}
|
||||
|
||||
@@ -51,7 +52,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
false,
|
||||
IntPtr.Zero,
|
||||
IntPtr.Zero,
|
||||
NativeMethods.LivePreviewTrigger.AltTab,
|
||||
LivePreviewTrigger.AltTab,
|
||||
IntPtr.Zero);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user