From b4eaeeaf9f5eaa1bf019d1d5a7f142e7d7c82f05 Mon Sep 17 00:00:00 2001 From: Rich Young Date: Thu, 5 Feb 2026 19:44:19 -0500 Subject: [PATCH] docs(gtk4): add porting TODOs --- docs/gtk4_porting_todos.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 docs/gtk4_porting_todos.md diff --git a/docs/gtk4_porting_todos.md b/docs/gtk4_porting_todos.md new file mode 100644 index 00000000000..7fd8b490d74 --- /dev/null +++ b/docs/gtk4_porting_todos.md @@ -0,0 +1,38 @@ +# GTK4 Porting TODOs + +This checklist maps remaining work to GTK4 migration guide changes and to +specific files in this repo. + +## Window lifecycle/state (GdkToplevel) +- Replace GTK3 `window-state-event`/`GdkWindowState` with GTK4 `GdkToplevelState` + updates in `engine/src/flutter/shell/platform/linux/fl_window_state_monitor.cc`. +- Ensure lifecycle mapping: + - visible + focused => `AppLifecycleState.resumed` + - visible + not focused => `AppLifecycleState.inactive` + - not visible/minimized => `AppLifecycleState.hidden` + +## Window configure/state notifications (GTK4 signals) +- Replace GTK3 `configure-event` and `window-state-event` in + `engine/src/flutter/shell/platform/linux/fl_window_monitor.cc` with GTK4 + equivalents (toplevel state or surface size/notify signals). + +## Accessibility (ATK removal) +- Replace ATK-based implementation with GTK4 `GtkAccessible` API or + compatible bridge: + - `engine/src/flutter/shell/platform/linux/fl_view.cc` + - `engine/src/flutter/shell/platform/linux/fl_accessibility_handler.cc` + - `engine/src/flutter/shell/platform/linux/fl_view_accessible.*` and + related ATK types + +## GTK4 test coverage +- GTK3-specific tests are disabled under `use_gtk4`. Create GTK4 tests/mocks: + - `engine/src/flutter/shell/platform/linux/fl_window_state_monitor_test.cc` + - `engine/src/flutter/shell/platform/linux/testing/mock_gtk.*` + +## Runner templates (already updated) +- GTK4 runner templates now use GTK4 APIs and pkg-config: + - `packages/flutter_tools/templates/app/linux-gtk4.tmpl/*` + +## Plugin templates (GTK4) +- Plugin templates use GTK4 but may still need review for deprecated APIs: + - `packages/flutter_tools/templates/plugin/linux-gtk4.tmpl/*`