Skip to content

[PTRun]Disable titlebar accent workaround on Windows 10#33505

Merged
jaimecbernardo merged 2 commits intomainfrom
dev/jaime/ptrun-disable-titlebar-fix-windows10
Jun 25, 2024
Merged

[PTRun]Disable titlebar accent workaround on Windows 10#33505
jaimecbernardo merged 2 commits intomainfrom
dev/jaime/ptrun-disable-titlebar-fix-windows10

Conversation

@jaimecbernardo
Copy link
Copy Markdown
Contributor

@jaimecbernardo jaimecbernardo commented Jun 25, 2024

Summary of the Pull Request

After #33458 , that fix crashes on Windows 10, where the caption color attribute is not supported.

This PR disables the fix on Windows 10, since it's not even needed there actually.

Fixes: #33504

Copy link
Copy Markdown
Contributor

@gokcekantarci gokcekantarci left a comment

Choose a reason for hiding this comment

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

Tested with win10 and VM win11. LGTM!!

// https://github.com/lepoco/wpfui/pull/1122/files#diff-196b404f4db09632665ef546da6c8e57302b2f3e3d082eb4b5c295ae3482d94a
IntPtr windowHandle = new WindowInteropHelper(window).Handle;
if (windowHandle == IntPtr.Zero)
if (OSVersionHelper.IsWindows11())
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we need a comment why this is only on Win11?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can add it :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've added a comment.

@jaimecbernardo jaimecbernardo merged commit 8b8c75b into main Jun 25, 2024
@crutkas crutkas deleted the dev/jaime/ptrun-disable-titlebar-fix-windows10 branch July 22, 2024 20:44
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.

[Critical BUG ?] [PT Run] Crash on opening the window

3 participants