Skip to content

IMsBox<T> modal dialogs not correctly displayed on Linux (Kylin V10) #210

@tangjingtai

Description

@tangjingtai

Hi,

I am using MessageBox.Avalonia 3.2.0 in a .NET 8 project. On Windows, calling ShowWindowDialogAsync(owner) works correctly: the modal dialog appears above the main window and can be interacted with.

However, on Kylin V10 Linux, the same call causes the dialog to be hidden behind the main window. The dialog only becomes visible if I switch windows (e.g., Alt+Tab).

 var para = new MessageBoxStandardParams
 {
     ContentTitle = "Caption",
     ContentMessage = "Are you sure you want to exit?",
     ButtonDefinitions = ButtonEnum.OkCancel,
     Icon = Icon.Question,
     Topmost = true,
     WindowStartupLocation = WindowStartupLocation.CenterOwner,
 };
 var messageBox = MessageBoxManager.GetMessageBoxStandard(para);
 var result = await messageBox.ShowWindowDialogAsync(owner);

Observed behavior on Linux (Kylin V10):
Modal dialog appears behind the main window.
The dialog cannot be clicked until switching focus.
Windows version works as expected.

**Expected behavior:**
The modal dialog should appear in front of the owner window, centered, and clickable immediately, just like on Windows.

Environment:
MessageBox.Avalonia 3.2.0
.NET 8
Avalonia 11
OS: Kylin V10 Linux (X11)

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions