Skip to content

Bug | RegisterWindowClosingHandler not working on linux (Debian) #284

Description

@AnnaSasDev

Severity

High (major feature broken)

Describe the bug

Backlog item has related primitives, but lacks explicit triage, dedicated API contract, and targeted regression coverage.

Steps to reproduce

  1. Start from an existing InfiniFrame example or unit-test scaffold for the same feature area.
  2. Reproduce the backlog scenario exactly as described in the linked Photino issue.
  3. Capture runtime logs and any native stack traces.
  4. Record platform + engine (WebView2/WebKit2GTK/WKWebView) used for reproduction.

Expected behavior

Define explicit API/behavior for this migration item, implement in managed + native layers where needed, and add focused tests/documentation.

Actual behavior

Pending InfiniFrame-specific reproduction details.

Logs / Error Output

Attach managed log output and native crash/diagnostic data collected during reproduction.

Minimal reproduction

// Linux-focused close-cancel reproduction
using InfiniFrame;

var builder = InfiniFrameWindowBuilder.Create()
    .SetTitle("Close Handler Repro")
    .SetStartString("<html><body><button onclick='window.close()'>Close</button></body></html>");

int requested = 0;
int canceled = 0;

builder.RegisterWindowClosingRequestedHandler(_ => requested++);
builder.RegisterWindowClosingHandler((_, _) => {
    canceled++;
    return true; // cancel close
});

var window = builder.Build();
window.WaitForClose();

Console.WriteLine($"Requested={requested}, Canceled={canceled}");

.NET Version

.NET 10.0 (or exact runtime used in reproduction)

Project Version / Commit

Current main commit at filing time

Operating System

Fill from reproduction environment(s)

Checklist

  • I searched existing issues
  • I can reproduce this consistently
  • I included logs and/or a reproduction

Metadata

Metadata

Assignees

Labels

Photino BacklogItems that are hold overs from Photino that they either never resolved or implementedbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions