Skip to content

[bug] Changing ShowInTaskbar to false after showing the window will hide it in the task switcher. #18728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
metaone01 opened this issue Apr 25, 2025 · 2 comments · May be fixed by #18781
Open
Labels

Comments

@metaone01
Copy link
Contributor

Describe the bug

Changing ShowInTaskbar to false after showing the window will hide it in the task switcher on Windows 11(other OSes were not tested).
Well, my feature #18689 #18695 has already been implemented by a bug. What the hell?

To Reproduce

Uncheck the CheckBox.

<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        x:Class="Test.MainWindow"
        ShowInTaskbar="{Binding #IsShowInTaskbar.IsChecked}">
        <CheckBox Content="ShowInTaskBar" Name="IsShowInTaskbar" IsChecked="True" />
</Window>

Expected behavior

It should still be visible in task switcher

Avalonia version

11.3.0-beta2

OS

Windows

Additional context

Windows 11 23H2

@metaone01 metaone01 added the bug label Apr 25, 2025
@metaone01
Copy link
Contributor Author

This bug will be fixed in my PR #18695 , if that can be merged.

@metaone01
Copy link
Contributor Author

It seems that a hidden parent window can hide a child window in the task switcher, and that's the original ShowInTaskbar=false 's side effect. But Show() sets the window parent to _parent before showing the window, so it should show correctly.
I think maybe I should change the Show() function's behavior and see what will happen.
I'm not sure if it is a Windows' bug or Avalonia's operations' side effects.
It can be easily solved by re-showing the window, but maybe figureing out its reason is a chance to create a more flexible and light-weight window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant