Merge pull request #1014 from softworkz/submit_new_event

BrowserWindow: Add OnBoundsChanged event
This commit is contained in:
Florian Rappl
2026-01-21 08:19:16 +01:00
committed by GitHub
5 changed files with 79 additions and 1 deletions

View File

@@ -186,6 +186,19 @@ public class BrowserWindow : ApiBase
remove => RemoveEvent(value, Id);
}
/// <summary>
/// Emitted when the window is moved or resized.
/// </summary>
/// <remarks>
/// While not being an original Electron event, this one includes the bounds values,
/// saving the additional roundtrip for calling <see cref="GetBoundsAsync"/>.
/// </remarks>
public event Action<Rectangle> OnBoundsChanged
{
add => AddEvent(value, Id);
remove => RemoveEvent(value, Id);
}
/// <summary>
/// macOS: Emitted once when the window is moved to a new position.
/// </summary>