Skip to content

Commit

Permalink
fix lively on Windows 11 26002 and later (rocksdanister#2050)
Browse files Browse the repository at this point in the history
* fix lively on Windows 11 26002 and later

The WorkerW windows we created is a clild window of Progman on Windows 11 Insider Canary build 26002 and later

Spy++ output for 26002 and later
0x000100EC "Program Manager" Progman
  0x000100EE "" SHELLDLL_DefView
    0x000100F0 "FolderView" SysListView32
  0x00100B8A "" WorkerW       <-- This is the WorkerW instance we are after!

* make the new workerw code path as a fallback

no longer do version checking
  • Loading branch information
everything411 authored Dec 28, 2023
1 parent fba7b5a commit 9142f6a
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/Lively/Lively/Core/WinDesktopCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1101,14 +1101,28 @@ private static IntPtr CreateWorkerW()
{
// Gets the WorkerW Window after the current one.
workerw = NativeMethods.FindWindowEx(IntPtr.Zero,
tophandle,
"WorkerW",
IntPtr.Zero);
tophandle,
"WorkerW",
IntPtr.Zero);
}

return true;
}), IntPtr.Zero);

// Some Windows 11 builds have a different Progman window layout.
// If the above code failed to find WorkerW, we should try this.
// Spy++ output
// 0x000100EC "Program Manager" Progman
// 0x000100EE "" SHELLDLL_DefView
// 0x000100F0 "FolderView" SysListView32
// 0x00100B8A "" WorkerW <-- This is the WorkerW instance we are after!
if (workerw == IntPtr.Zero)
{
workerw = NativeMethods.FindWindowEx(progman,
IntPtr.Zero,
"WorkerW",
IntPtr.Zero);
}
return workerw;
}

Expand Down

0 comments on commit 9142f6a

Please sign in to comment.