Rename RegularWindow* to Window* in the windowing API + rename sizedToContent to shrinkWrap in the windowing API (#189363)
## What's new?
- Renamed `RegularWindow*` to `Window*` across the windowing API
- Rename sizedToContent to shrinkWrap in the windowing API
- Left the engine untouched because it is not user-facing
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
diff --git a/dev/integration_tests/windowing_test/lib/main.dart b/dev/integration_tests/windowing_test/lib/main.dart
index 341c45e..98e4346 100644
--- a/dev/integration_tests/windowing_test/lib/main.dart
+++ b/dev/integration_tests/windowing_test/lib/main.dart
@@ -14,7 +14,7 @@
import 'package:flutter/src/widgets/_window_positioner.dart';
import 'package:flutter_driver/driver_extension.dart';
-late final RegularWindowController controller;
+late final WindowController controller;
final ValueNotifier<DialogWindowController?> dialogController = ValueNotifier(null);
/// A generic "secondary" window used by the `isDestroyed` end-to-end tests.
@@ -180,7 +180,7 @@
try {
switch (windowType) {
case 'regular':
- secondaryController = RegularWindowController(
+ secondaryController = WindowController(
size: const Size(200, 200),
title: 'Secondary',
);
@@ -228,13 +228,13 @@
}
},
);
- controller = RegularWindowController(
+ controller = WindowController(
size: const Size(640, 480),
title: 'Integration Test',
- delegate: RegularWindowControllerDelegate(),
+ delegate: WindowControllerDelegate(),
);
- runWidget(RegularWindow(controller: controller, child: const MyApp()));
+ runWidget(Window(controller: controller, child: const MyApp()));
windowCreated.complete();
}
diff --git a/examples/api/lib/widgets/windows/popup.0.dart b/examples/api/lib/widgets/windows/popup.0.dart
index 60f57c8..ecfdc65 100644
--- a/examples/api/lib/widgets/windows/popup.0.dart
+++ b/examples/api/lib/widgets/windows/popup.0.dart
@@ -15,8 +15,8 @@
void main() {
try {
runWidget(
- RegularWindow(
- controller: RegularWindowController(
+ Window(
+ controller: WindowController(
size: const Size(800, 600),
constraints: const BoxConstraints(minWidth: 640, minHeight: 480),
title: 'Example Window',
diff --git a/examples/api/lib/widgets/windows/satellite.0.dart b/examples/api/lib/widgets/windows/satellite.0.dart
index fab6906..f52ca06 100644
--- a/examples/api/lib/widgets/windows/satellite.0.dart
+++ b/examples/api/lib/widgets/windows/satellite.0.dart
@@ -14,8 +14,8 @@
try {
WidgetsFlutterBinding.ensureInitialized();
runWidget(
- RegularWindow(
- controller: RegularWindowController(
+ Window(
+ controller: WindowController(
size: const Size(800, 600),
constraints: const BoxConstraints(minWidth: 640, minHeight: 480),
title: 'Example Window',
diff --git a/examples/api/lib/widgets/windows/tooltip.0.dart b/examples/api/lib/widgets/windows/tooltip.0.dart
index 72db917..c15216a 100644
--- a/examples/api/lib/widgets/windows/tooltip.0.dart
+++ b/examples/api/lib/widgets/windows/tooltip.0.dart
@@ -15,8 +15,8 @@
void main() {
try {
runWidget(
- RegularWindow(
- controller: RegularWindowController(
+ Window(
+ controller: WindowController(
size: const Size(800, 600),
constraints: const BoxConstraints(minWidth: 640, minHeight: 480),
title: 'Example Window',
diff --git a/examples/api/lib/widgets/windows/window_manager.0.dart b/examples/api/lib/widgets/windows/window_manager.0.dart
index e8d0d17..634a0fa 100644
--- a/examples/api/lib/widgets/windows/window_manager.0.dart
+++ b/examples/api/lib/widgets/windows/window_manager.0.dart
@@ -12,7 +12,7 @@
void main() {
try {
WidgetsFlutterBinding.ensureInitialized();
- final RegularWindowController controller = RegularWindowController(
+ final WindowController controller = WindowController(
size: const Size(800, 600),
);
runWidget(
diff --git a/examples/multiple_windows/lib/app/main_window.dart b/examples/multiple_windows/lib/app/main_window.dart
index d8be3ed..a45ab8d 100644
--- a/examples/multiple_windows/lib/app/main_window.dart
+++ b/examples/multiple_windows/lib/app/main_window.dart
@@ -13,16 +13,16 @@
import 'models.dart';
import 'popup_button.dart';
import 'popup_window_edit_dialog.dart';
-import 'regular_window_content.dart';
-import 'regular_window_edit_dialog.dart';
import 'tooltip_button.dart';
import 'tooltip_window_edit_dialog.dart';
+import 'window_content.dart';
+import 'window_edit_dialog.dart';
import 'window_settings_dialog.dart';
class MainWindow extends StatelessWidget {
const MainWindow({super.key, required this.controller});
- final RegularWindowController controller;
+ final WindowController controller;
@override
Widget build(BuildContext context) {
@@ -58,7 +58,7 @@
class _WindowsTable extends StatelessWidget {
const _WindowsTable({required this.mainWindow});
- final RegularWindowController mainWindow;
+ final WindowController mainWindow;
DataRow _buildRow(BaseWindowController controller, BuildContext context) {
return DataRow(
@@ -105,7 +105,7 @@
void _showWindowEditDialog(BaseWindowController controller, BuildContext context) {
return switch (controller) {
- final RegularWindowController regular => showRegularWindowEditDialog(
+ final WindowController regular => showWindowEditDialog(
context: context,
controller: regular,
),
@@ -127,7 +127,7 @@
static String _getWindowTypeName(BaseWindowController controller) {
return switch (controller) {
- RegularWindowController() => 'Regular',
+ WindowController() => 'Regular',
DialogWindowController() => 'Dialog',
TooltipWindowController() => 'Tooltip',
PopupWindowController() => 'Popup',
@@ -187,18 +187,18 @@
OutlinedButton(
onPressed: () {
late final WindowEntry entry;
- final RegularWindowController controller;
- if (windowSettings.regularSizedToContent) {
- controller = RegularWindowController.sizedToContent(
+ final WindowController controller;
+ if (windowSettings.shrinkWrap) {
+ controller = WindowController.shrinkWrap(
resizable: windowSettings.regularResizable,
- delegate: CallbackRegularWindowControllerDelegate(
+ delegate: CallbackWindowControllerDelegate(
onDestroyed: () => windowRegistry.unregister(entry),
),
title: 'Regular',
);
} else {
- controller = RegularWindowController(
- delegate: CallbackRegularWindowControllerDelegate(
+ controller = WindowController(
+ delegate: CallbackWindowControllerDelegate(
onDestroyed: () => windowRegistry.unregister(entry),
),
title: 'Regular',
@@ -209,7 +209,7 @@
entry = WindowEntry(
controller: controller,
builder: (BuildContext context) =>
- RegularWindowContent(regularWindowController: controller),
+ WindowContent(windowController: controller),
);
windowRegistry.register(entry);
},
@@ -222,8 +222,8 @@
onPressed: () {
late final WindowEntry entry;
final DialogWindowController controller;
- if (windowSettings.dialogSizedToContent) {
- controller = DialogWindowController.sizedToContent(
+ if (windowSettings.dialogShrinkWrap) {
+ controller = DialogWindowController.shrinkWrap(
resizable: windowSettings.dialogResizable,
delegate: CallbackDialogWindowControllerDelegate(
onDestroyed: () => windowRegistry.unregister(entry),
@@ -254,8 +254,8 @@
onPressed: () {
late final WindowEntry entry;
final DialogWindowController controller;
- if (windowSettings.dialogSizedToContent) {
- controller = DialogWindowController.sizedToContent(
+ if (windowSettings.dialogShrinkWrap) {
+ controller = DialogWindowController.shrinkWrap(
resizable: windowSettings.dialogResizable,
delegate: CallbackDialogWindowControllerDelegate(
onDestroyed: () => windowRegistry.unregister(entry),
diff --git a/examples/multiple_windows/lib/app/models.dart b/examples/multiple_windows/lib/app/models.dart
index 30d198d..7e481e7 100644
--- a/examples/multiple_windows/lib/app/models.dart
+++ b/examples/multiple_windows/lib/app/models.dart
@@ -15,10 +15,10 @@
class WindowSettings {
WindowSettings({
this.regularSize = const Size(800, 600),
- this.regularSizedToContent = false,
+ this.shrinkWrap = false,
this.regularResizable = true,
this.dialogSize = const Size(400, 400),
- this.dialogSizedToContent = false,
+ this.dialogShrinkWrap = false,
this.dialogResizable = true,
this.positioner = const WindowPositioner(
parentAnchor: WindowPositionerAnchor.right,
@@ -27,21 +27,21 @@
});
/// The initial size for newly created regular windows.
- /// Ignored when [regularSizedToContent] is true.
+ /// Ignored when [shrinkWrap] is true.
Size regularSize;
/// If true, new regular windows will be sized to fit their content.
- bool regularSizedToContent;
+ bool shrinkWrap;
/// If true, regular windows may be manually resized by the user.
bool regularResizable;
/// The initial size of the dialog window.
- /// Ignored when [dialogSizedToContent] is true.
+ /// Ignored when [dialogShrinkWrap] is true.
Size dialogSize;
/// If true, new dialog windows will be sized to fit their content.
- bool dialogSizedToContent;
+ bool dialogShrinkWrap;
/// If true, dialog windows may be manually resized by the user.
bool dialogResizable;
diff --git a/examples/multiple_windows/lib/app/regular_window_content.dart b/examples/multiple_windows/lib/app/window_content.dart
similarity index 78%
rename from examples/multiple_windows/lib/app/regular_window_content.dart
rename to examples/multiple_windows/lib/app/window_content.dart
index df9498bc..393c3be 100644
--- a/examples/multiple_windows/lib/app/regular_window_content.dart
+++ b/examples/multiple_windows/lib/app/window_content.dart
@@ -16,16 +16,16 @@
import 'rotated_wire_cube.dart';
import 'tooltip_button.dart';
-class RegularWindowContent extends StatefulWidget {
- const RegularWindowContent({super.key, required this.regularWindowController});
+class WindowContent extends StatefulWidget {
+ const WindowContent({super.key, required this.windowController});
- final RegularWindowController regularWindowController;
+ final WindowController windowController;
@override
- State<RegularWindowContent> createState() => _RegularWindowContentState();
+ State<WindowContent> createState() => _WindowContentState();
}
-class _RegularWindowContentState extends State<RegularWindowContent> {
+class _WindowContentState extends State<WindowContent> {
late final Color cubeColor;
static Color _generateRandomDarkColor() {
@@ -70,15 +70,15 @@
mainAxisSize: .min,
children: [
_WindowCreationButtons(
- regularWindowController: widget.regularWindowController,
+ windowController: widget.windowController,
),
const SizedBox(height: 20),
- TooltipButton(parentController: widget.regularWindowController),
+ TooltipButton(parentController: widget.windowController),
const SizedBox(height: 20),
- PopupButton(parentController: widget.regularWindowController),
+ PopupButton(parentController: widget.windowController),
const SizedBox(height: 20),
Text(
- 'View #${widget.regularWindowController.rootView.viewId}\n'
+ 'View #${widget.windowController.rootView.viewId}\n'
'Size: ${windowSize.width.toStringAsFixed(1)}\u00D7${windowSize.height.toStringAsFixed(1)}\n'
'Device Pixel Ratio: $dpr',
textAlign: TextAlign.center,
@@ -98,11 +98,11 @@
/// Extracted widget that depends on [WindowRegistry] so that registry changes
/// (e.g. opening/closing windows) only rebuild these buttons, not the entire
-/// [RegularWindowContent] tree.
+/// [WindowContent] tree.
class _WindowCreationButtons extends StatelessWidget {
- const _WindowCreationButtons({required this.regularWindowController});
+ const _WindowCreationButtons({required this.windowController});
- final RegularWindowController regularWindowController;
+ final WindowController windowController;
@override
Widget build(BuildContext context) {
@@ -115,8 +115,8 @@
ElevatedButton(
onPressed: () {
late final WindowEntry entry;
- final controller = RegularWindowController(
- delegate: CallbackRegularWindowControllerDelegate(
+ final controller = WindowController(
+ delegate: CallbackWindowControllerDelegate(
onDestroyed: () => windowRegistry.unregister(entry),
),
title: 'Regular',
@@ -126,7 +126,7 @@
entry = WindowEntry(
controller: controller,
builder: (BuildContext context) =>
- RegularWindowContent(regularWindowController: controller),
+ WindowContent(windowController: controller),
);
windowRegistry.register(entry);
},
@@ -142,7 +142,7 @@
),
title: 'Modal Dialog',
size: windowSettings.dialogSize,
- parent: regularWindowController,
+ parent: windowController,
);
entry = WindowEntry(
@@ -159,8 +159,8 @@
}
}
-class CallbackRegularWindowControllerDelegate with RegularWindowControllerDelegate {
- CallbackRegularWindowControllerDelegate({required this.onDestroyed});
+class CallbackWindowControllerDelegate with WindowControllerDelegate {
+ CallbackWindowControllerDelegate({required this.onDestroyed});
@override
void onWindowDestroyed() {
diff --git a/examples/multiple_windows/lib/app/regular_window_edit_dialog.dart b/examples/multiple_windows/lib/app/window_edit_dialog.dart
similarity index 90%
rename from examples/multiple_windows/lib/app/regular_window_edit_dialog.dart
rename to examples/multiple_windows/lib/app/window_edit_dialog.dart
index 0232d30..0a77718 100644
--- a/examples/multiple_windows/lib/app/regular_window_edit_dialog.dart
+++ b/examples/multiple_windows/lib/app/window_edit_dialog.dart
@@ -8,28 +8,28 @@
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/_window.dart';
-void showRegularWindowEditDialog({
+void showWindowEditDialog({
required BuildContext context,
- required RegularWindowController controller,
+ required WindowController controller,
}) {
showDialog<void>(
context: context,
builder: (context) =>
- _RegularWindowEditDialog(controller: controller, onClose: () => Navigator.pop(context)),
+ _WindowEditDialog(controller: controller, onClose: () => Navigator.pop(context)),
);
}
-class _RegularWindowEditDialog extends StatefulWidget {
- const _RegularWindowEditDialog({required this.controller, required this.onClose});
+class _WindowEditDialog extends StatefulWidget {
+ const _WindowEditDialog({required this.controller, required this.onClose});
- final RegularWindowController controller;
+ final WindowController controller;
final VoidCallback onClose;
@override
- State<StatefulWidget> createState() => _RegularWindowEditDialogState();
+ State<StatefulWidget> createState() => _WindowEditDialogState();
}
-class _RegularWindowEditDialogState extends State<_RegularWindowEditDialog> {
+class _WindowEditDialogState extends State<_WindowEditDialog> {
late Size initialSize;
late String initialTitle;
late bool initialFullscreen;
@@ -67,7 +67,7 @@
}
@override
- void didUpdateWidget(covariant _RegularWindowEditDialog oldWidget) {
+ void didUpdateWidget(covariant _WindowEditDialog oldWidget) {
super.didUpdateWidget(oldWidget);
if (oldWidget.controller != widget.controller) {
oldWidget.controller.removeListener(_onNotification);
diff --git a/examples/multiple_windows/lib/app/window_settings_dialog.dart b/examples/multiple_windows/lib/app/window_settings_dialog.dart
index bec23ed..f01e4e0 100644
--- a/examples/multiple_windows/lib/app/window_settings_dialog.dart
+++ b/examples/multiple_windows/lib/app/window_settings_dialog.dart
@@ -40,9 +40,9 @@
final TextEditingController _offsetDxController = TextEditingController();
final TextEditingController _offsetDyController = TextEditingController();
- late bool _regularSizedToContent;
+ late bool _regularShrinkWrap;
late bool _regularResizable;
- late bool _dialogSizedToContent;
+ late bool _dialogShrinkWrap;
late bool _dialogResizable;
late bool _flipX;
@@ -67,9 +67,9 @@
_dialogHeightController.addListener(_updateDialogSize);
_dialogWidthController.text = widget.settings.dialogSize.width.toString();
_dialogHeightController.text = widget.settings.dialogSize.height.toString();
- _regularSizedToContent = widget.settings.regularSizedToContent;
+ _regularShrinkWrap = widget.settings.shrinkWrap;
_regularResizable = widget.settings.regularResizable;
- _dialogSizedToContent = widget.settings.dialogSizedToContent;
+ _dialogShrinkWrap = widget.settings.dialogShrinkWrap;
_dialogResizable = widget.settings.dialogResizable;
_offsetDxController.text = widget.settings.positioner.offset.dx.toString();
_offsetDyController.text = widget.settings.positioner.offset.dy.toString();
@@ -127,7 +127,7 @@
child: TextFormField(
controller: _regularWidthController,
decoration: const InputDecoration(labelText: 'Initial width'),
- enabled: !_regularSizedToContent,
+ enabled: !_regularShrinkWrap,
),
),
const SizedBox(width: 20),
@@ -135,7 +135,7 @@
child: TextFormField(
controller: _regularHeightController,
decoration: const InputDecoration(labelText: 'Initial height'),
- enabled: !_regularSizedToContent,
+ enabled: !_regularShrinkWrap,
),
),
],
@@ -145,8 +145,8 @@
children: [
const SizedBox(width: 100, child: Text('Sized to content')),
Switch(
- value: _regularSizedToContent,
- onChanged: (bool value) => setState(() => _regularSizedToContent = value),
+ value: _regularShrinkWrap,
+ onChanged: (bool value) => setState(() => _regularShrinkWrap = value),
),
const SizedBox(width: 24),
const SizedBox(width: 70, child: Text('Resizable')),
@@ -173,7 +173,7 @@
child: TextFormField(
controller: _dialogWidthController,
decoration: const InputDecoration(labelText: 'Initial width'),
- enabled: !_dialogSizedToContent,
+ enabled: !_dialogShrinkWrap,
),
),
const SizedBox(width: 20),
@@ -181,7 +181,7 @@
child: TextFormField(
controller: _dialogHeightController,
decoration: const InputDecoration(labelText: 'Initial height'),
- enabled: !_dialogSizedToContent,
+ enabled: !_dialogShrinkWrap,
),
),
],
@@ -191,8 +191,8 @@
children: [
const SizedBox(width: 100, child: Text('Sized to content')),
Switch(
- value: _dialogSizedToContent,
- onChanged: (bool value) => setState(() => _dialogSizedToContent = value),
+ value: _dialogShrinkWrap,
+ onChanged: (bool value) => setState(() => _dialogShrinkWrap = value),
),
const SizedBox(width: 24),
const SizedBox(width: 70, child: Text('Resizable')),
@@ -383,13 +383,13 @@
double.tryParse(_regularHeightController.text) ??
widget.settings.regularSize.height,
);
- widget.settings.regularSizedToContent = _regularSizedToContent;
+ widget.settings.shrinkWrap = _regularShrinkWrap;
widget.settings.regularResizable = _regularResizable;
widget.settings.dialogSize = Size(
double.tryParse(_dialogWidthController.text) ?? widget.settings.dialogSize.width,
double.tryParse(_dialogHeightController.text) ?? widget.settings.dialogSize.height,
);
- widget.settings.dialogSizedToContent = _dialogSizedToContent;
+ widget.settings.dialogShrinkWrap = _dialogShrinkWrap;
widget.settings.dialogResizable = _dialogResizable;
widget.settings.positioner = widget.settings.positioner.copyWith(
diff --git a/examples/multiple_windows/lib/main.dart b/examples/multiple_windows/lib/main.dart
index 1bebab3..b35e4a2 100644
--- a/examples/multiple_windows/lib/main.dart
+++ b/examples/multiple_windows/lib/main.dart
@@ -14,7 +14,7 @@
import 'app/main_window.dart';
import 'app/models.dart';
-class MainControllerWindowDelegate with RegularWindowControllerDelegate {
+class MainControllerWindowDelegate with WindowControllerDelegate {
@override
void onWindowDestroyed() {
super.onWindowDestroyed();
@@ -35,7 +35,7 @@
}
class _MultiWindowAppState extends State<MultiWindowApp> {
- final RegularWindowController controller = RegularWindowController(
+ final WindowController controller = WindowController(
size: const Size(800, 600),
title: 'Multi-Window Reference Application',
delegate: MainControllerWindowDelegate(),
diff --git a/packages/flutter/lib/src/widgets/_window.dart b/packages/flutter/lib/src/widgets/_window.dart
index 9cccaf0..c7a1f88 100644
--- a/packages/flutter/lib/src/widgets/_window.dart
+++ b/packages/flutter/lib/src/widgets/_window.dart
@@ -61,7 +61,7 @@
///
/// See also:
///
-/// * [RegularWindowController], the controller for regular top-level windows.
+/// * [WindowController], the controller for regular top-level windows.
@internal
sealed class BaseWindowController extends ChangeNotifier {
/// The current size of the drawable area of the window.
@@ -111,10 +111,10 @@
///
/// See also:
///
-/// * [RegularWindowController], the controller that creates and manages regular windows.
-/// * [RegularWindow], the widget for a regular window.
+/// * [WindowController], the controller that creates and manages regular windows.
+/// * [Window], the widget for a regular window.
@internal
-mixin class RegularWindowControllerDelegate {
+mixin class WindowControllerDelegate {
/// Invoked when the user attempts to close the window.
///
/// The default implementation destroys the window. Subclasses
@@ -126,7 +126,7 @@
///
/// * [onWindowDestroyed], which is invoked after the window is closed.
@internal
- void onWindowCloseRequested(RegularWindowController controller) {
+ void onWindowCloseRequested(WindowController controller) {
if (!isWindowingEnabled) {
throw UnsupportedError(_kWindowingDisabledErrorMessage);
}
@@ -156,7 +156,7 @@
/// platform with the provided properties.
///
/// This class does not interact with the widget tree. Instead, it is typically
-/// provided to the [RegularWindow] widget, who does the work of rendering the
+/// provided to the [Window] widget, who does the work of rendering the
/// content inside of this window.
///
/// The user of this class is responsible for managing the lifecycle of the window.
@@ -176,8 +176,8 @@
///
/// void main() {
/// runWidget(
-/// RegularWindow(
-/// controller: RegularWindowController(
+/// Window(
+/// controller: WindowController(
/// size: const Size(800, 600),
/// constraints: const BoxConstraints(minWidth: 640, minHeight: 480),
/// title: 'Example Window',
@@ -189,13 +189,13 @@
/// ```
/// {@end-tool}
///
-/// Children of a [RegularWindow] widget can access the [RegularWindowController]
+/// Children of a [Window] widget can access the [WindowController]
/// via the [WindowScope] inherited widget.
///
/// {@macro flutter.widgets.windowing.experimental}
@internal
-abstract class RegularWindowController extends BaseWindowController {
- /// Creates a [RegularWindowController] with a specific size.
+abstract class WindowController extends BaseWindowController {
+ /// Creates a [WindowController] with a specific size.
///
/// Upon construction, the window is created by the platform with the
/// given [size].
@@ -217,7 +217,7 @@
/// {@endtemplate}
///
/// To create a window that is sized to its content instead, use
- /// [RegularWindowController.sizedToContent].
+ /// [WindowController.shrinkWrap].
///
/// {@template flutter.widgets.windowing.shared}
/// The [title] argument configures the window's title.
@@ -230,11 +230,11 @@
///
/// {@macro flutter.widgets.windowing.experimental}
@internal
- factory RegularWindowController({
+ factory WindowController({
required Size size,
BoxConstraints? constraints,
String? title,
- RegularWindowControllerDelegate? delegate,
+ WindowControllerDelegate? delegate,
}) {
if (!isWindowingEnabled) {
throw UnsupportedError(_kWindowingDisabledErrorMessage);
@@ -245,8 +245,8 @@
}
final WindowingOwner owner = WidgetsBinding.instance.windowingOwner;
- return owner.createRegularWindowController(
- delegate: delegate ?? RegularWindowControllerDelegate(),
+ return owner.createWindowController(
+ delegate: delegate ?? WindowControllerDelegate(),
size: size,
constraints: constraints,
title: title,
@@ -254,9 +254,9 @@
);
}
- /// Creates a [RegularWindowController] that sizes the window to its content.
+ /// Creates a [WindowController] that sizes the window to its content.
///
- /// {@template flutter.widgets.windowing.sizedToContentConstructor}
+ /// {@template flutter.widgets.windowing.shrinkWrapConstructor}
/// The window is created by the platform and initially
/// sized to fit its content.
///
@@ -279,17 +279,17 @@
/// {@endtemplate}
///
/// To create a window with a specific size instead, use the default
- /// [RegularWindowController] constructor.
+ /// [WindowController] constructor.
///
/// {@macro flutter.widgets.windowing.shared}
///
/// {@macro flutter.widgets.windowing.experimental}
@internal
- factory RegularWindowController.sizedToContent({
+ factory WindowController.shrinkWrap({
bool resizable = false,
BoxConstraints? constraints,
String? title,
- RegularWindowControllerDelegate? delegate,
+ WindowControllerDelegate? delegate,
}) {
if (!isWindowingEnabled) {
throw UnsupportedError(_kWindowingDisabledErrorMessage);
@@ -298,27 +298,27 @@
WidgetsFlutterBinding.ensureInitialized();
final WindowingOwner owner = WidgetsBinding.instance.windowingOwner;
- return owner.createRegularWindowController(
- delegate: delegate ?? RegularWindowControllerDelegate(),
+ return owner.createWindowController(
+ delegate: delegate ?? WindowControllerDelegate(),
constraints: constraints,
resizable: resizable,
title: title,
);
}
- /// Creates an empty [RegularWindowController].
+ /// Creates an empty [WindowController].
///
/// This method is only intended to be used by subclasses of the
- /// [RegularWindowController].
+ /// [WindowController].
///
- /// Users who want to instantiate a new [RegularWindowController] should
+ /// Users who want to instantiate a new [WindowController] should
/// always use the factory method to create a controller that is valid
/// for their particular platform.
///
/// {@macro flutter.widgets.windowing.experimental}
@internal
@protected
- RegularWindowController.empty();
+ WindowController.empty();
/// The current title of the window.
///
@@ -445,7 +445,7 @@
///
/// * [DialogWindowController], the controller that creates and manages dialog windows.
/// * [DialogWindow], the widget for a dialog window.
-/// * [RegularWindowControllerDelegate], the delegate for regular window controllers.
+/// * [WindowControllerDelegate], the delegate for regular window controllers.
@internal
mixin class DialogWindowControllerDelegate {
/// Invoked when the user attempts to close the window.
@@ -511,8 +511,8 @@
///
/// void main() {
/// runWidget(
-/// RegularWindow(
-/// controller: RegularWindowController(
+/// Window(
+/// controller: WindowController(
/// size: const Size(800, 600),
/// constraints: const BoxConstraints(minWidth: 640, minHeight: 480),
/// title: 'Example Window',
@@ -555,7 +555,7 @@
/// {@macro flutter.widgets.windowing.sizedConstructor}
///
/// To create a dialog that is sized to its content instead, use
- /// [DialogWindowController.sizedToContent].
+ /// [DialogWindowController.shrinkWrap].
///
/// {@template flutter.widgets.windowing.dialogParent}
/// The [parent] argument specifies the parent window of this dialog.
@@ -601,7 +601,7 @@
/// Creates a [DialogWindowController] that sizes the window to its content.
///
- /// {@macro flutter.widgets.windowing.sizedToContentConstructor}
+ /// {@macro flutter.widgets.windowing.shrinkWrapConstructor}
///
/// To create a dialog with a specific size instead, use the default
/// [DialogWindowController] constructor.
@@ -611,7 +611,7 @@
/// {@macro flutter.widgets.windowing.shared}
///
/// {@macro flutter.widgets.windowing.experimental}
- factory DialogWindowController.sizedToContent({
+ factory DialogWindowController.shrinkWrap({
bool resizable = false,
BoxConstraints? constraints,
BaseWindowController? parent,
@@ -738,7 +738,7 @@
///
/// * [TooltipWindowController], the controller that creates and manages tooltip windows.
/// * [TooltipWindow], the widget for a tooltip window.
-/// * [RegularWindowControllerDelegate], the delegate for regular window controllers.
+/// * [WindowControllerDelegate], the delegate for regular window controllers.
mixin class TooltipWindowControllerDelegate {
/// Invoked after the window is closed.
///
@@ -883,7 +883,7 @@
///
/// * [PopupWindowController], the controller that creates and manages popup windows.
/// * [PopupWindow], the widget for a popup window.
-/// * [RegularWindowControllerDelegate], the delegate for regular window controllers.
+/// * [WindowControllerDelegate], the delegate for regular window controllers.
mixin class PopupWindowControllerDelegate {
/// Invoked after the window is closed.
///
@@ -1025,7 +1025,7 @@
void activate() {
BaseWindowController parent = this.parent;
while (true) {
- if (parent is RegularWindowController) {
+ if (parent is WindowController) {
parent.activate();
break;
} else if (parent is DialogWindowController) {
@@ -1046,7 +1046,7 @@
bool get isActivated {
BaseWindowController parent = this.parent;
while (true) {
- if (parent is RegularWindowController) {
+ if (parent is WindowController) {
return parent.isActivated;
} else if (parent is DialogWindowController) {
return parent.isActivated;
@@ -1217,15 +1217,15 @@
///
/// {@macro flutter.widgets.windowing.satelliteConstructorCommon}
///
- /// {@macro flutter.widgets.windowing.sizedToContentConstructor}
+ /// {@macro flutter.widgets.windowing.shrinkWrapConstructor}
///
- /// To create a dialog with a specific size instead, use the default
+ /// To create a satellite window with a specific size instead, use the default
/// [SatelliteWindowController] constructor.
///
/// {@macro flutter.widgets.windowing.shared}
///
/// {@macro flutter.widgets.windowing.experimental}
- factory SatelliteWindowController.sizedToContent({
+ factory SatelliteWindowController.shrinkWrap({
required BaseWindowController parent,
required WindowPositioner initialPositioner,
Rect? initialAnchorRect,
@@ -1346,16 +1346,16 @@
/// {@macro flutter.widgets.windowing.experimental}
@internal
abstract class WindowingOwner {
- /// Creates a [RegularWindowController] with the provided properties.
+ /// Creates a [WindowController] with the provided properties.
///
- /// Most app developers should use [RegularWindowController]'s constructor
+ /// Most app developers should use [WindowController]'s constructor
/// instead of calling this method directly. This method allows platforms
/// to inject platform-specific logic.
///
/// {@macro flutter.widgets.windowing.experimental}
@internal
- RegularWindowController createRegularWindowController({
- required RegularWindowControllerDelegate delegate,
+ WindowController createWindowController({
+ required WindowControllerDelegate delegate,
Size? size,
BoxConstraints? constraints,
required bool resizable,
@@ -1455,8 +1455,8 @@
final String errorMessage;
@override
- RegularWindowController createRegularWindowController({
- required RegularWindowControllerDelegate delegate,
+ WindowController createWindowController({
+ required WindowControllerDelegate delegate,
Size? size,
BoxConstraints? constraints,
bool resizable = true,
@@ -1514,18 +1514,18 @@
}
}
-/// The [RegularWindow] widget provides a way to render a regular window in the
+/// The [Window] widget provides a way to render a regular window in the
/// widget tree.
///
/// The provided [controller] creates the native window that backs
/// the widget. The [child] widget is rendered into this newly created window.
///
-/// When a [RegularWindow] widget is removed from the tree, the window that was created
+/// When a [Window] widget is removed from the tree, the window that was created
/// by the [controller] remains valid until the caller destroys it by calling
-/// [RegularWindowController.destroy].
+/// [WindowController.destroy].
///
/// Widgets in the same tree as the [child] widget will have access to the
-/// [RegularWindowController] via the [WindowScope] widget.
+/// [WindowController] via the [WindowScope] widget.
///
/// {@tool snippet}
/// An example usage might look like:
@@ -1539,8 +1539,8 @@
///
/// void main() {
/// runWidget(
-/// RegularWindow(
-/// controller: RegularWindowController(
+/// Window(
+/// controller: WindowController(
/// size: const Size(800, 600),
/// constraints: const BoxConstraints(minWidth: 640, minHeight: 480),
/// title: 'Example Window',
@@ -1554,18 +1554,18 @@
///
/// {@macro flutter.widgets.windowing.experimental}
@internal
-class RegularWindow extends StatelessWidget {
+class Window extends StatelessWidget {
/// Creates a regular window widget.
///
/// The [controller] creates the native backing window into which the
/// [child] widget is rendered.
///
/// It is up to the caller to destroy the window by calling
- /// [RegularWindowController.destroy] when the window is no longer needed.
+ /// [WindowController.destroy] when the window is no longer needed.
///
/// {@macro flutter.widgets.windowing.experimental}
@internal
- RegularWindow({super.key, required this.controller, required this.child}) {
+ Window({super.key, required this.controller, required this.child}) {
if (!isWindowingEnabled) {
throw UnsupportedError(_kWindowingDisabledErrorMessage);
}
@@ -1575,7 +1575,7 @@
///
/// {@macro flutter.widgets.windowing.experimental}
@internal
- final RegularWindowController controller;
+ final WindowController controller;
/// The content rendered into this window.
///
@@ -1622,8 +1622,8 @@
///
/// void main() {
/// runWidget(
-/// RegularWindow(
-/// controller: RegularWindowController(
+/// Window(
+/// controller: WindowController(
/// size: const Size(800, 600),
/// constraints: const BoxConstraints(minWidth: 640, minHeight: 480),
/// title: 'Example Window',
@@ -1887,7 +1887,7 @@
///
/// See also:
///
-/// * [RegularWindow], the widget to create a regular window.
+/// * [Window], the widget to create a regular window.
/// * [DialogWindow], the widget to create a dialog window.
@internal
class WindowScope extends InheritedModel<_WindowControllerAspect> {
@@ -1960,9 +1960,9 @@
///
/// See also:
///
- /// * [RegularWindowController], the controller for regular top-level windows.
+ /// * [WindowController], the controller for regular top-level windows.
/// * [DialogWindowController], the controller for dialog windows.
- /// * [RegularWindow], the widget for a regular window.
+ /// * [Window], the widget for a regular window.
/// * [DialogWindow], the widget for a dialog window.
/// * [maybeOf], which doesn't throw or assert if it doesn't find a
/// [WindowScope] ancestor. It returns null instead.
@@ -1977,9 +1977,9 @@
///
/// See also:
///
- /// * [RegularWindowController], the controller for regular top-level windows.
+ /// * [WindowController], the controller for regular top-level windows.
/// * [DialogWindowController], the controller for dialog windows.
- /// * [RegularWindow], the widget for a regular window.
+ /// * [Window], the widget for a regular window.
/// * [DialogWindow], the widget for a dialog window.
/// * [of], which will throw if it doesn't find a [WindowScope] ancestor,
/// instead of returning null.
@@ -2026,7 +2026,7 @@
///
/// See also:
///
- /// * [RegularWindowController.title], which returns the current title of the window.
+ /// * [WindowController.title], which returns the current title of the window.
/// * [of], which returns the [BaseWindowController] associated with the window.
@internal
static String titleOf(BuildContext context) {
@@ -2039,7 +2039,7 @@
///
/// See also:
///
- /// * [RegularWindowController.title], which returns the current title of the window.
+ /// * [WindowController.title], which returns the current title of the window.
/// * [maybeOf], which returns the [BaseWindowController] associated with the window, or null if not found.
@internal
static String? maybeTitleOf(BuildContext context) {
@@ -2062,7 +2062,7 @@
///
/// See also:
///
- /// * [RegularWindowController.isActivated], which returns the current activation status of the window.
+ /// * [WindowController.isActivated], which returns the current activation status of the window.
/// * [of], which returns the [BaseWindowController] associated with the window.
@internal
static bool isActivatedOf(BuildContext context) {
@@ -2076,7 +2076,7 @@
///
/// See also:
///
- /// * [RegularWindowController.isActivated], which returns the current activation status of the window.
+ /// * [WindowController.isActivated], which returns the current activation status of the window.
/// * [maybeOf], which returns the [BaseWindowController] associated with the window, or null if not found.
@internal
static bool? maybeIsActivatedOf(BuildContext context) {
@@ -2099,7 +2099,7 @@
///
/// See also:
///
- /// * [RegularWindowController.isMinimized], which returns the current minimized status of the window.
+ /// * [WindowController.isMinimized], which returns the current minimized status of the window.
/// * [of], which returns the [BaseWindowController] associated with the window.
@internal
static bool isMinimizedOf(BuildContext context) {
@@ -2113,7 +2113,7 @@
///
/// See also:
///
- /// * [RegularWindowController.isMinimized], which returns the current minimized status of the window.
+ /// * [WindowController.isMinimized], which returns the current minimized status of the window.
/// * [maybeOf], which returns the [BaseWindowController] associated with the window, or null if not found.
@internal
static bool? maybeIsMinimizedOf(BuildContext context) {
@@ -2136,7 +2136,7 @@
///
/// See also:
///
- /// * [RegularWindowController.isMaximized], which returns the current maximized status of the window.
+ /// * [WindowController.isMaximized], which returns the current maximized status of the window.
/// * [of], which returns the [BaseWindowController] associated with the window.
@internal
static bool isMaximizedOf(BuildContext context) {
@@ -2150,7 +2150,7 @@
///
/// See also:
///
- /// * [RegularWindowController.isMaximized], which returns the current maximized status of the window.
+ /// * [WindowController.isMaximized], which returns the current maximized status of the window.
/// * [maybeOf], which returns the [BaseWindowController] associated with the window, or null if not found.
@internal
static bool? maybeIsMaximizedOf(BuildContext context) {
@@ -2173,7 +2173,7 @@
///
/// See also:
///
- /// * [RegularWindowController.isFullscreen], which returns the current fullscreen status of the window.
+ /// * [WindowController.isFullscreen], which returns the current fullscreen status of the window.
/// * [of], which returns the [BaseWindowController] associated with the window.
@internal
static bool isFullscreenOf(BuildContext context) {
@@ -2187,7 +2187,7 @@
///
/// See also:
///
- /// * [RegularWindowController.isFullscreen], which returns the current fullscreen status of the window.
+ /// * [WindowController.isFullscreen], which returns the current fullscreen status of the window.
/// * [maybeOf], which returns the [BaseWindowController] associated with the window, or null if not found.
@internal
static bool? maybeIsFullscreenOf(BuildContext context) {
@@ -2234,7 +2234,7 @@
/// given [controller]. Controllers that do not support titles report an empty
/// string.
static String _titleValue(BaseWindowController controller) => switch (controller) {
- RegularWindowController() => controller.title,
+ WindowController() => controller.title,
DialogWindowController() => controller.title,
TooltipWindowController() => '',
PopupWindowController() => '',
@@ -2244,7 +2244,7 @@
// Computes the value of the [_WindowControllerAspect.activated] aspect for the
// given [controller]. Controllers that do not support activation report false.
static bool _isActivatedValue(BaseWindowController controller) => switch (controller) {
- RegularWindowController() => controller.isActivated,
+ WindowController() => controller.isActivated,
DialogWindowController() => controller.isActivated,
TooltipWindowController() => false,
PopupWindowController() => controller.isActivated,
@@ -2255,7 +2255,7 @@
/// given [controller]. Controllers that do not support maximization report
/// false.
static bool _isMaximizedValue(BaseWindowController controller) => switch (controller) {
- RegularWindowController() => controller.isMaximized,
+ WindowController() => controller.isMaximized,
DialogWindowController() => false,
TooltipWindowController() => false,
PopupWindowController() => false,
@@ -2266,7 +2266,7 @@
/// given [controller]. Controllers that do not support minimization report
/// false.
static bool _isMinimizedValue(BaseWindowController controller) => switch (controller) {
- RegularWindowController() => controller.isMinimized,
+ WindowController() => controller.isMinimized,
DialogWindowController() => controller.isMinimized,
TooltipWindowController() => false,
PopupWindowController() => false,
@@ -2277,7 +2277,7 @@
/// the given [controller]. Controllers that do not support fullscreen report
/// false.
static bool _isFullscreenValue(BaseWindowController controller) => switch (controller) {
- RegularWindowController() => controller.isFullscreen,
+ WindowController() => controller.isFullscreen,
DialogWindowController() => false,
TooltipWindowController() => false,
PopupWindowController() => false,
@@ -2314,7 +2314,7 @@
ErrorHint(
'No WindowScope ancestor could be found starting from the context '
'that was passed to WindowScope.of(). This can happen because the '
- 'context used is not a descendant of a RegularWindow widget, which introduces '
+ 'context used is not a descendant of a Window widget, which introduces '
'a WindowScope.',
),
]);
@@ -2549,7 +2549,7 @@
/// {@tool dartpad}
/// An example usage might look like this, where the window manager wraps
/// the root of the widget tree so that dialogs can be rendered at the same level
-/// as a [RegularWindow].
+/// as a [Window].
///
/// ** See code in examples/api/lib/widgets/windows/window_manager.0.dart **
/// {@end-tool}
@@ -2598,7 +2598,7 @@
controller: dialog,
child: entry.builder(context),
),
- final RegularWindowController regular => RegularWindow(
+ final WindowController regular => Window(
controller: regular,
child: entry.builder(context),
),
diff --git a/packages/flutter/lib/src/widgets/_window_linux.dart b/packages/flutter/lib/src/widgets/_window_linux.dart
index 228a887..b94afc6 100644
--- a/packages/flutter/lib/src/widgets/_window_linux.dart
+++ b/packages/flutter/lib/src/widgets/_window_linux.dart
@@ -96,14 +96,14 @@
@internal
@override
- RegularWindowController createRegularWindowController({
+ WindowController createWindowController({
Size? size,
BoxConstraints? constraints,
required bool resizable,
String? title,
- required RegularWindowControllerDelegate delegate,
+ required WindowControllerDelegate delegate,
}) {
- final controller = RegularWindowControllerLinux(
+ final controller = WindowControllerLinux(
owner: this,
delegate: delegate,
size: size,
@@ -269,7 +269,7 @@
///
/// {@macro flutter.widgets.windowing.experimental}
@internal
-abstract interface class WindowControllerLinux {
+abstract interface class BaseWindowControllerLinux {
/// Returns pointer to the underlying [GtkWindow](https://docs.gtk.org/gtk3/class.Window.html).
///
/// Using this pointer implies the user is aware of any side effects changes may have to Flutter behavior.
@@ -294,15 +294,15 @@
ffi.Pointer<ffi.Void> get flutterViewHandle;
}
-/// Implementation of [RegularWindowController] for the Linux platform.
+/// Implementation of [WindowController] for the Linux platform.
///
/// {@macro flutter.widgets.windowing.experimental}
///
/// See also:
///
-/// * [RegularWindowController], the base class for regular windows.
-class RegularWindowControllerLinux extends RegularWindowController
- implements WindowControllerLinux {
+/// * [WindowController], the base class for regular windows.
+class WindowControllerLinux extends WindowController
+ implements BaseWindowControllerLinux {
/// Creates a new regular window controller for Linux.
///
/// When this constructor completes the native window has been created and
@@ -312,11 +312,11 @@
///
/// See also:
///
- /// * [RegularWindowController], the base class for regular windows.
+ /// * [WindowController], the base class for regular windows.
@internal
- RegularWindowControllerLinux({
+ WindowControllerLinux({
required WindowingOwnerLinux owner,
- required RegularWindowControllerDelegate delegate,
+ required WindowControllerDelegate delegate,
Size? size,
BoxConstraints? constraints,
String? title,
@@ -370,7 +370,7 @@
}
final WindowingOwnerLinux _owner;
- final RegularWindowControllerDelegate _delegate;
+ final WindowControllerDelegate _delegate;
final _GtkWindow _window;
late final _FlView _view;
late final _FlViewMonitor _viewMonitor;
@@ -509,7 +509,7 @@
/// See also:
///
/// * [DialogWindowController], the base class for dialog windows.
-class DialogWindowControllerLinux extends DialogWindowController implements WindowControllerLinux {
+class DialogWindowControllerLinux extends DialogWindowController implements BaseWindowControllerLinux {
/// Creates a new dialog window controller for Linux.
///
/// When this constructor completes the native window has been created and
@@ -700,7 +700,7 @@
///
/// * [TooltipWindowController], the base class for tooltip windows.
class TooltipWindowControllerLinux extends TooltipWindowController
- implements WindowControllerLinux {
+ implements BaseWindowControllerLinux {
/// Creates a new tooltip window controller for Linux.
///
/// When this constructor completes the native window has been created and
@@ -895,7 +895,7 @@
/// See also:
///
/// * [PopupWindowController], the base class for popup windows.
-class PopupWindowControllerLinux extends PopupWindowController implements WindowControllerLinux {
+class PopupWindowControllerLinux extends PopupWindowController implements BaseWindowControllerLinux {
/// Creates a new popup window controller for Linux.
///
/// When this constructor completes the native window has been created and
diff --git a/packages/flutter/lib/src/widgets/_window_macos.dart b/packages/flutter/lib/src/widgets/_window_macos.dart
index 7066805..438e963 100644
--- a/packages/flutter/lib/src/widgets/_window_macos.dart
+++ b/packages/flutter/lib/src/widgets/_window_macos.dart
@@ -75,14 +75,14 @@
}
@override
- RegularWindowController createRegularWindowController({
- required RegularWindowControllerDelegate delegate,
+ WindowController createWindowController({
+ required WindowControllerDelegate delegate,
Size? size,
BoxConstraints? constraints,
required bool resizable,
String? title,
}) {
- final controller = RegularWindowControllerMacOS(
+ final controller = WindowControllerMacOS(
owner: this,
delegate: delegate,
size: size,
@@ -187,7 +187,7 @@
///
/// {@macro flutter.widgets.windowing.experimental}
@internal
-abstract interface class WindowControllerMacOS {
+abstract interface class BaseWindowControllerMacOS {
/// Returns pointer to the underlying NSWindow.
///
/// Using this pointer implies the user is aware of any side effects changes may have to Flutter behavior.
@@ -206,7 +206,7 @@
bool get isDestroyed;
}
-mixin _WindowControllerMixin implements WindowControllerMacOS {
+mixin _WindowControllerMixin implements BaseWindowControllerMacOS {
void _initController(WindowingOwnerMacOS owner) {
if (!isWindowingEnabled) {
throw UnsupportedError(_kWindowingDisabledErrorMessage);
@@ -501,19 +501,19 @@
Rect _anchorRect;
}
-/// Implementation of [RegularWindowController] for the macOS platform.
+/// Implementation of [WindowController] for the macOS platform.
///
/// {@macro flutter.widgets.windowing.experimental}
///
/// See also:
///
-/// * [RegularWindowController], the base class for regular windows.
-class RegularWindowControllerMacOS extends RegularWindowController with _WindowControllerMixin {
+/// * [WindowController], the base class for regular windows.
+class WindowControllerMacOS extends WindowController with _WindowControllerMixin {
/// Creates a new regular window controller for macOS. When this constructor
/// completes the FlutterView is created and framework is aware of it.
- RegularWindowControllerMacOS({
+ WindowControllerMacOS({
required WindowingOwnerMacOS owner,
- required RegularWindowControllerDelegate delegate,
+ required WindowControllerDelegate delegate,
required Size? size,
BoxConstraints? constraints,
String? title,
@@ -521,7 +521,7 @@
super.empty() {
_initController(owner);
- final int viewId = _MacOSPlatformInterface.createRegularWindow(
+ final int viewId = _MacOSPlatformInterface.createWindow(
size: size,
constraints: constraints,
onShouldClose: _onShouldClose.nativeFunction,
@@ -627,7 +627,7 @@
return _MacOSPlatformInterface.isFullscreen(windowHandle);
}
- final RegularWindowControllerDelegate _delegate;
+ final WindowControllerDelegate _delegate;
@override
bool get isActivated => _MacOSPlatformInterface.isActivated(windowHandle);
@@ -883,10 +883,10 @@
@Native<Int64 Function(Int64, Pointer<_WindowCreationRequest>)>(
symbol: 'InternalFlutter_WindowController_CreateRegularWindow',
)
- external static int _createRegularWindow(int engineId, Pointer<_WindowCreationRequest> request);
+ external static int _createWindow(int engineId, Pointer<_WindowCreationRequest> request);
/// Creates a new window and returns the viewId of the created FlutterView.
- static int createRegularWindow({
+ static int createWindow({
required Size? size,
BoxConstraints? constraints,
required Pointer<NativeFunction<Void Function()>> onShouldClose,
@@ -913,7 +913,7 @@
..constraints.maxWidth = constraints.maxWidth
..constraints.maxHeight = constraints.maxHeight;
}
- final int viewId = _createRegularWindow(
+ final int viewId = _createWindow(
WidgetsBinding.instance.platformDispatcher.engineId!,
request,
);
diff --git a/packages/flutter/lib/src/widgets/_window_win32.dart b/packages/flutter/lib/src/widgets/_window_win32.dart
index 4e25c82..0e9d3db 100644
--- a/packages/flutter/lib/src/widgets/_window_win32.dart
+++ b/packages/flutter/lib/src/widgets/_window_win32.dart
@@ -139,14 +139,14 @@
@internal
@override
- RegularWindowController createRegularWindowController({
+ WindowController createWindowController({
Size? size,
BoxConstraints? constraints,
required bool resizable,
String? title,
- required RegularWindowControllerDelegate delegate,
+ required WindowControllerDelegate delegate,
}) {
- return RegularWindowControllerWin32(
+ return WindowControllerWin32(
owner: this,
delegate: delegate,
size: size,
@@ -283,10 +283,10 @@
}
}
-class _RegularWindowMesageHandler implements _WindowsMessageHandler {
- _RegularWindowMesageHandler({required this.controller});
+class _WindowMessageHandler implements _WindowsMessageHandler {
+ _WindowMessageHandler({required this.controller});
- final RegularWindowControllerWin32 controller;
+ final WindowControllerWin32 controller;
@override
int? handleWindowsMessage(
@@ -304,7 +304,7 @@
///
/// {@macro flutter.widgets.windowing.experimental}
@internal
-abstract mixin class WindowControllerWin32 {
+abstract mixin class BaseWindowControllerWin32 {
/// Returns the underlying HWND for this window.
///
/// Using this handle implies the user is aware of any side effects changes may have to Flutter behavior.
@@ -317,14 +317,14 @@
HWND get windowHandle;
}
-/// Implementation of [RegularWindowController] for the Windows platform.
+/// Implementation of [WindowController] for the Windows platform.
///
/// {@macro flutter.widgets.windowing.experimental}
///
/// See also:
///
-/// * [RegularWindowController], the base class for regular windows.
-class RegularWindowControllerWin32 extends RegularWindowController with WindowControllerWin32 {
+/// * [WindowController], the base class for regular windows.
+class WindowControllerWin32 extends WindowController with BaseWindowControllerWin32 {
/// Creates a new regular window controller for Win32.
///
/// When this constructor completes the native window has been created and
@@ -334,11 +334,11 @@
///
/// See also:
///
- /// * [RegularWindowController], the base class for regular windows.
+ /// * [WindowController], the base class for regular windows.
@internal
- RegularWindowControllerWin32({
+ WindowControllerWin32({
required WindowingOwnerWin32 owner,
- required RegularWindowControllerDelegate delegate,
+ required WindowControllerDelegate delegate,
Size? size,
BoxConstraints? constraints,
String? title,
@@ -349,16 +349,16 @@
if (!isWindowingEnabled) {
throw UnsupportedError(_kWindowingDisabledErrorMessage);
}
- _handler = _RegularWindowMesageHandler(controller: this);
+ _handler = _WindowMessageHandler(controller: this);
owner._addMessageHandler(_handler);
- final sizedToContent = size == null;
- final int viewId = _Win32PlatformInterface.createRegularWindow(
+ final shrinkWrap = size == null;
+ final int viewId = _Win32PlatformInterface.createWindow(
_owner.allocator,
WidgetsBinding.instance.platformDispatcher.engineId!,
size,
constraints,
title,
- sizedToContent,
+ shrinkWrap,
resizable,
);
if (viewId < 0) {
@@ -372,8 +372,8 @@
}
final WindowingOwnerWin32 _owner;
- final RegularWindowControllerDelegate _delegate;
- late final _RegularWindowMesageHandler _handler;
+ final WindowControllerDelegate _delegate;
+ late final _WindowMessageHandler _handler;
bool _destroyed = false;
@override
@@ -570,7 +570,7 @@
/// See also:
///
/// * [DialogWindowController], the base class for dialog windows.
-class DialogWindowControllerWin32 extends DialogWindowController with WindowControllerWin32 {
+class DialogWindowControllerWin32 extends DialogWindowController with BaseWindowControllerWin32 {
/// Creates a new dialog window controller for Win32.
///
/// When this constructor completes the native window has been created and
@@ -599,7 +599,7 @@
}
_handler = _DialogWindowMesageHandler(controller: this);
owner._addMessageHandler(_handler);
- final sizedToContent = size == null;
+ final shrinkWrap = size == null;
final int viewId = _Win32PlatformInterface.createDialogWindow(
_owner.allocator,
WidgetsBinding.instance.platformDispatcher.engineId!,
@@ -612,7 +612,7 @@
parent.rootView.viewId,
)
: null,
- sizedToContent,
+ shrinkWrap,
resizable,
);
if (viewId < 0) {
@@ -787,7 +787,7 @@
///
/// * [TooltipWindowController], the base class for tooltip windows.
class TooltipWindowControllerWin32 extends TooltipWindowController
- with WindowControllerWin32
+ with BaseWindowControllerWin32
implements _WindowsMessageHandler {
/// Creates a new tooltip window controller for Win32.
///
@@ -1322,35 +1322,35 @@
ffi.Pointer<_WindowingInitRequest> request,
);
- static int createRegularWindow(
+ static int createWindow(
ffi.Allocator allocator,
int engineId,
Size? size,
BoxConstraints? constraints,
String? title,
- bool sizedToContent,
+ bool shrinkWrap,
bool resizable,
) {
- final ffi.Pointer<_RegularWindowCreationRequest> request =
- allocator<_RegularWindowCreationRequest>();
+ final ffi.Pointer<_WindowCreationRequest> request =
+ allocator<_WindowCreationRequest>();
try {
request.ref.size.from(size);
request.ref.constraints.from(constraints);
- request.ref.title = (title ?? 'Regular window').toNativeUtf16(allocator: allocator);
- request.ref.sizedToContent = sizedToContent;
+ request.ref.title = (title ?? 'Window').toNativeUtf16(allocator: allocator);
+ request.ref.shrinkWrap = shrinkWrap;
request.ref.resizable = resizable;
- return _createRegularWindow(engineId, request);
+ return _createWindow(engineId, request);
} finally {
allocator.free(request);
}
}
- @ffi.Native<ffi.Int64 Function(ffi.Int64, ffi.Pointer<_RegularWindowCreationRequest>)>(
+ @ffi.Native<ffi.Int64 Function(ffi.Int64, ffi.Pointer<_WindowCreationRequest>)>(
symbol: 'InternalFlutterWindows_WindowManager_CreateRegularWindow',
)
- external static int _createRegularWindow(
+ external static int _createWindow(
int engineId,
- ffi.Pointer<_RegularWindowCreationRequest> request,
+ ffi.Pointer<_WindowCreationRequest> request,
);
static int createDialogWindow(
@@ -1360,7 +1360,7 @@
BoxConstraints? constraints,
String? title,
HWND? parent,
- bool sizedToContent,
+ bool shrinkWrap,
bool resizable,
) {
final ffi.Pointer<_DialogWindowCreationRequest> request =
@@ -1370,7 +1370,7 @@
request.ref.constraints.from(constraints);
request.ref.title = (title ?? 'Dialog window').toNativeUtf16(allocator: allocator);
request.ref.parentOrNull = parent ?? ffi.Pointer<ffi.Void>.fromAddress(0);
- request.ref.sizedToContent = sizedToContent;
+ request.ref.shrinkWrap = shrinkWrap;
request.ref.resizable = resizable;
return _createDialogWindow(engineId, request);
} finally {
@@ -1637,14 +1637,14 @@
}
}
-/// Payload for the creation method used by [_Win32PlatformInterface.createRegularWindow].
-final class _RegularWindowCreationRequest extends ffi.Struct {
+/// Payload for the creation method used by [_Win32PlatformInterface.createWindow].
+final class _WindowCreationRequest extends ffi.Struct {
external _WindowSizeRequest size;
external _WindowConstraintsRequest constraints;
external ffi.Pointer<_Utf16> title;
@ffi.Bool()
- external bool sizedToContent;
+ external bool shrinkWrap;
@ffi.Bool()
external bool resizable;
@@ -1658,7 +1658,7 @@
external HWND parentOrNull;
@ffi.Bool()
- external bool sizedToContent;
+ external bool shrinkWrap;
@ffi.Bool()
external bool resizable;
@@ -1701,7 +1701,7 @@
onMessage;
}
-/// Payload for the size of a window used by [_RegularWindowCreationRequest] and
+/// Payload for the size of a window used by [_WindowCreationRequest] and
/// [_Win32PlatformInterface.setWindowContentSize].
final class _WindowSizeRequest extends ffi.Struct {
@ffi.Bool()
@@ -1720,7 +1720,7 @@
}
}
-/// Payload for the constraints of a window used by [_RegularWindowCreationRequest] and
+/// Payload for the constraints of a window used by [_WindowCreationRequest] and
/// [_Win32PlatformInterface.setWindowConstraints].
final class _WindowConstraintsRequest extends ffi.Struct {
@ffi.Bool()
diff --git a/packages/flutter/test/widgets/windowing_test.dart b/packages/flutter/test/widgets/windowing_test.dart
index 7e50b9b..b0b9654 100644
--- a/packages/flutter/test/widgets/windowing_test.dart
+++ b/packages/flutter/test/widgets/windowing_test.dart
@@ -12,13 +12,13 @@
DialogWindowControllerDelegate,
PopupWindow,
PopupWindowController,
- RegularWindow,
- RegularWindowController,
- RegularWindowControllerDelegate,
SatelliteWindow,
SatelliteWindowController,
TooltipWindow,
TooltipWindowController,
+ Window,
+ WindowController,
+ WindowControllerDelegate,
WindowScope,
WindowingOwner,
createDefaultWindowingOwner;
@@ -28,8 +28,8 @@
import 'multi_view_testing.dart';
-class _StubRegularWindowController extends RegularWindowController {
- _StubRegularWindowController(WidgetTester tester) : super.empty() {
+class _StubWindowController extends WindowController {
+ _StubWindowController(WidgetTester tester) : super.empty() {
rootView = FakeView(tester.view);
}
@@ -135,7 +135,7 @@
final WidgetTester tester;
@override
- BaseWindowController get parent => _StubRegularWindowController(tester);
+ BaseWindowController get parent => _StubWindowController(tester);
@override
Size get contentSize => Size.zero;
@@ -164,7 +164,7 @@
final WidgetTester tester;
@override
- BaseWindowController get parent => _StubRegularWindowController(tester);
+ BaseWindowController get parent => _StubWindowController(tester);
@override
Size get contentSize => Size.zero;
@@ -196,7 +196,7 @@
final WidgetTester tester;
@override
- BaseWindowController get parent => _StubRegularWindowController(tester);
+ BaseWindowController get parent => _StubWindowController(tester);
@override
Size get contentSize => Size.zero;
@@ -232,11 +232,11 @@
}
}
-// A controller that mutates its aspect values and notifies listeners, and whose
-// value getters throw once the window is destroyed, mirroring the behavior of
-// the real platform controllers.
-class _MutableRegularWindowController extends RegularWindowController {
- _MutableRegularWindowController(WidgetTester tester) : super.empty() {
+// A controller that mutates its aspect values and notifies listeners, used to
+// verify that dependents rebuild when the controller notifies even though the
+// same controller instance is reused across rebuilds.
+class _MutableWindowController extends WindowController {
+ _MutableWindowController(WidgetTester tester) : super.empty() {
rootView = FakeView(tester.view);
}
@@ -342,13 +342,10 @@
expect(owner, isA<WindowingOwner>());
});
- test('default WindowingOwner throws when accessing createRegularWindowController', () {
+ test('default WindowingOwner throws when accessing createWindowController', () {
final WindowingOwner owner = createDefaultWindowingOwner();
expect(
- () => owner.createRegularWindowController(
- delegate: RegularWindowControllerDelegate(),
- resizable: true,
- ),
+ () => owner.createWindowController(delegate: WindowControllerDelegate(), resizable: true),
throwsUnsupportedError,
);
});
@@ -417,12 +414,12 @@
isWindowingEnabled = true;
});
- testWidgets('RegularWindow does not throw', (WidgetTester tester) async {
- final controller = _StubRegularWindowController(tester);
+ testWidgets('Window does not throw', (WidgetTester tester) async {
+ final controller = _StubWindowController(tester);
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(controller: controller, child: Container()),
+ Window(controller: controller, child: Container()),
);
});
@@ -436,12 +433,12 @@
});
testWidgets('Can access WindowScope.of for regular windows', (WidgetTester tester) async {
- final controller = _StubRegularWindowController(tester);
+ final controller = _StubWindowController(tester);
BaseWindowController? scope;
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -452,7 +449,7 @@
),
);
- expect(scope, isA<RegularWindowController>());
+ expect(scope, isA<WindowController>());
});
testWidgets('Can access WindowScope.of for dialog windows', (WidgetTester tester) async {
@@ -538,12 +535,12 @@
testWidgets('Can access WindowScope.maybeOf for regular windows', (
WidgetTester tester,
) async {
- final controller = _StubRegularWindowController(tester);
+ final controller = _StubWindowController(tester);
BaseWindowController? scope;
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -554,7 +551,7 @@
),
);
- expect(scope, isA<RegularWindowController>());
+ expect(scope, isA<WindowController>());
});
testWidgets('Can access WindowScope.maybeOf for dialog windows', (WidgetTester tester) async {
@@ -644,12 +641,12 @@
testWidgets('Can access WindowScope.contentSizeOf for regular windows', (
WidgetTester tester,
) async {
- final controller = _StubRegularWindowController(tester);
+ final controller = _StubWindowController(tester);
Size? size;
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -754,12 +751,12 @@
testWidgets('Can access WindowScope.maybeContentSizeOf for regular windows', (
WidgetTester tester,
) async {
- final controller = _StubRegularWindowController(tester);
+ final controller = _StubWindowController(tester);
Size? size;
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -864,12 +861,12 @@
testWidgets('Can access WindowScope.titleOf for regular windows', (
WidgetTester tester,
) async {
- final controller = _StubRegularWindowController(tester);
+ final controller = _StubWindowController(tester);
String? title;
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -970,12 +967,12 @@
testWidgets('Can access WindowScope.maybeTitleOf for regular windows', (
WidgetTester tester,
) async {
- final controller = _StubRegularWindowController(tester);
+ final controller = _StubWindowController(tester);
String? title;
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -1080,12 +1077,12 @@
testWidgets('Can access WindowScope.isActivatedOf for regular windows', (
WidgetTester tester,
) async {
- final controller = _StubRegularWindowController(tester);
+ final controller = _StubWindowController(tester);
bool? isActivated;
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -1190,12 +1187,12 @@
testWidgets('Can access WindowScope.maybeIsActivatedOf for regular windows', (
WidgetTester tester,
) async {
- final controller = _StubRegularWindowController(tester);
+ final controller = _StubWindowController(tester);
bool? isActivated;
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -1300,12 +1297,12 @@
testWidgets('Can access WindowScope.isMinimizedOf for regular windows', (
WidgetTester tester,
) async {
- final controller = _StubRegularWindowController(tester);
+ final controller = _StubWindowController(tester);
bool? isMinimized;
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -1388,12 +1385,12 @@
testWidgets('Can access WindowScope.maybeIsMinimizedOf for regular windows', (
WidgetTester tester,
) async {
- final controller = _StubRegularWindowController(tester);
+ final controller = _StubWindowController(tester);
bool? isMinimized;
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -1476,12 +1473,12 @@
testWidgets('Can access WindowScope.isMaximizedOf for regular windows', (
WidgetTester tester,
) async {
- final controller = _StubRegularWindowController(tester);
+ final controller = _StubWindowController(tester);
bool? isMaximized;
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -1586,12 +1583,12 @@
testWidgets('Can access WindowScope.maybeIsMaximizedOf for regular windows', (
WidgetTester tester,
) async {
- final controller = _StubRegularWindowController(tester);
+ final controller = _StubWindowController(tester);
bool? isMaximized;
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -1696,12 +1693,12 @@
testWidgets('Can access WindowScope.isFullscreenOf for regular windows', (
WidgetTester tester,
) async {
- final controller = _StubRegularWindowController(tester);
+ final controller = _StubWindowController(tester);
bool? isFullscreen;
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -1806,12 +1803,12 @@
testWidgets('Can access WindowScope.maybeIsFullscreenOf for regular windows', (
WidgetTester tester,
) async {
- final controller = _StubRegularWindowController(tester);
+ final controller = _StubWindowController(tester);
bool? isFullscreen;
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -1916,12 +1913,12 @@
testWidgets('Dependent rebuilds when an aspect changes and the controller notifies', (
WidgetTester tester,
) async {
- final controller = _MutableRegularWindowController(tester);
+ final controller = _MutableWindowController(tester);
addTearDown(controller.dispose);
final observed = <bool>[];
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -1943,12 +1940,12 @@
testWidgets('Can access WindowScope.isDestroyedOf for regular windows', (
WidgetTester tester,
) async {
- final controller = _StubRegularWindowController(tester);
+ final controller = _StubWindowController(tester);
bool? isDestroyed;
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -2053,12 +2050,12 @@
testWidgets('Can access WindowScope.maybeIsDestroyedOf for regular windows', (
WidgetTester tester,
) async {
- final controller = _StubRegularWindowController(tester);
+ final controller = _StubWindowController(tester);
bool? isDestroyed;
addTearDown(controller.dispose);
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
@@ -2180,12 +2177,12 @@
});
testWidgets('Dependent rebuilds when the window is destroyed', (WidgetTester tester) async {
- final controller = _MutableRegularWindowController(tester);
+ final controller = _MutableWindowController(tester);
addTearDown(controller.dispose);
final observed = <bool>[];
await tester.pumpWidget(
wrapWithView: false,
- RegularWindow(
+ Window(
controller: controller,
child: Builder(
builder: (BuildContext context) {
diff --git a/packages/flutter_test/lib/src/binding.dart b/packages/flutter_test/lib/src/binding.dart
index bd6237e..caf47ca 100644
--- a/packages/flutter_test/lib/src/binding.dart
+++ b/packages/flutter_test/lib/src/binding.dart
@@ -273,12 +273,12 @@
var foundPopup = false;
for (final BaseWindowController child in _children) {
switch (child) {
- case final RegularWindowController regularChild:
+ case final WindowController regularChild:
if (foundPopup) {
// Already found a popup, skip anything else.
break;
}
- activateable = (regularChild as _TestRegularWindowController).getFirstActivatableChild();
+ activateable = (regularChild as _TestWindowController).getFirstActivatableChild();
case final DialogWindowController dialogChild:
// Always return the first dialog found.
return (dialogChild as _TestDialogWindowController).getFirstActivatableChild();
@@ -305,9 +305,9 @@
}
}
-class _TestRegularWindowController extends RegularWindowController with _ChildWindowHierarchyMixin {
- _TestRegularWindowController({
- required RegularWindowControllerDelegate delegate,
+class _TestWindowController extends WindowController with _ChildWindowHierarchyMixin {
+ _TestWindowController({
+ required WindowControllerDelegate delegate,
required TestPlatformDispatcher platformDispatcher,
required this.windowingOwner,
Size? size,
@@ -329,7 +329,7 @@
activate();
}
- final RegularWindowControllerDelegate _delegate;
+ final WindowControllerDelegate _delegate;
final _TestWindowingOwner windowingOwner;
Size _size;
BoxConstraints _constraints;
@@ -435,8 +435,8 @@
switch (parent) {
case final DialogWindowController testParent:
(testParent as _TestDialogWindowController).addChild(child);
- case final RegularWindowController testParent:
- (testParent as _TestRegularWindowController).addChild(child);
+ case final WindowController testParent:
+ (testParent as _TestWindowController).addChild(child);
case final PopupWindowController testParent:
(testParent as _TestPopupWindowController).addChild(child);
case final SatelliteWindowController testParent:
@@ -452,8 +452,8 @@
switch (parent) {
case final DialogWindowController testParent:
(testParent as _TestDialogWindowController).removeChild(child);
- case final RegularWindowController testParent:
- (testParent as _TestRegularWindowController).removeChild(child);
+ case final WindowController testParent:
+ (testParent as _TestWindowController).removeChild(child);
case final PopupWindowController testParent:
(testParent as _TestPopupWindowController).removeChild(child);
case final SatelliteWindowController testParent:
@@ -856,8 +856,8 @@
/// Returns the activated [BaseWindowController].
BaseWindowController activateWindowController(BaseWindowController controller) {
switch (controller) {
- case final RegularWindowController regularController:
- final BaseWindowController leaf = (regularController as _TestRegularWindowController)
+ case final WindowController regularController:
+ final BaseWindowController leaf = (regularController as _TestWindowController)
.getFirstActivatableChild();
_activeWindowController = leaf;
return _activeWindowController!;
@@ -887,7 +887,7 @@
}
switch (parent) {
- case final RegularWindowController regularParent:
+ case final WindowController regularParent:
regularParent.activate();
case final DialogWindowController dialogParent:
dialogParent.activate();
@@ -917,7 +917,7 @@
}
switch (controller) {
- case final RegularWindowController _:
+ case final WindowController _:
_activeWindowController = null;
case final DialogWindowController dialogController:
if (!_tryActivateParent(dialogController.parent)) {
@@ -946,14 +946,14 @@
@internal
@override
- RegularWindowController createRegularWindowController({
- required RegularWindowControllerDelegate delegate,
+ WindowController createWindowController({
+ required WindowControllerDelegate delegate,
Size? size,
BoxConstraints? constraints,
required bool resizable,
String? title,
}) {
- return _TestRegularWindowController(
+ return _TestWindowController(
delegate: delegate,
platformDispatcher: _platformDispatcher,
windowingOwner: this,