Skip to content

Commit

Permalink
Avoid "XamlExplorerHostIslandWindow" issues & Support for Insider Bui…
Browse files Browse the repository at this point in the history
…ld (#1210)

* Updated the toolkit

Microsoft deprecated the old toolkit and released the same thing under a new name.

* Update ModernFlyouts.Package.wapproj

* Update README.md

* Extra check for volume OSD

- Checks the band the window is on to make sure that it is the volume bar

* Fixes Windows 25000 Builds

Allows flyout window to be painted without using a plane (or whatever it's called) so it can run on Windows Canary Builds.

* Revert README.md

* Revert name
  • Loading branch information
manstheram authored Aug 4, 2023
1 parent 60626f8 commit 2a31fee
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion ModernFlyouts.Core/Interop/BandWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ public void CreateWindow()
{
WindowStyle = (int)(WindowStyles.WS_VISIBLE | WindowStyles.WS_CHILD),
ParentWindow = hWnd,
UsesPerPixelTransparency = true
UsesPerPixelTransparency = true,
ExtendedWindowStyle = (int)(ExtendedWindowStyles.WS_EX_NOREDIRECTIONBITMAP)
};

hwndSource = new(param)
Expand Down
13 changes: 9 additions & 4 deletions ModernFlyouts.Core/Interop/NativeFlyoutHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,15 @@ private bool GetAllInfos()
GetWindowThreadProcessId(hWndHost, out int pid);
if (Process.GetProcessById(pid).ProcessName.ToLower() == "explorer")
{
HWndHost = hWndHost;
HWndDUI = hWndDUI;
ShellProcessId = (uint)pid;
return true;
UIntPtr pdwBand = UIntPtr.Zero;
GetWindowBand(hWndHost, out pdwBand);
if (pdwBand == (UIntPtr)ZBandID.AboveLockUX)
{
HWndHost = hWndHost;
HWndDUI = hWndDUI;
ShellProcessId = (uint)pid;
return true;
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions ModernFlyouts.Core/Interop/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,9 @@ internal static IntPtr SetWindowLongPtr(IntPtr hWnd, int nIndex, IntPtr dwNewLon
[DllImport("user32.dll", SetLastError = true)]
internal static extern uint GetWindowThreadProcessId(IntPtr hWnd, out int processId);

[DllImport("user32.dll", SetLastError = true)]
internal static extern bool GetWindowBand(IntPtr hWnd, out UIntPtr pdwBand);

[DllImport("user32.dll", SetLastError = true)]
internal static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags);

Expand Down

0 comments on commit 2a31fee

Please sign in to comment.