feat(platform): move desktop windows to plugins/window and rework the tray

plugins/window replaces the window_manager fork on every desktop.

Changelog: Tray hotkeys, node delays and a delay test
This commit is contained in:
chen08209
2026-09-25 03:56:56 +08:00
parent 2a2522bbc6
commit 1e97716636
126 changed files with 6148 additions and 723 deletions
+4 -4
View File
@@ -13,7 +13,7 @@
#include <tray/tray_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>
#include <wifi_ssid/wifi_ssid_plugin.h>
#include <window_manager/window_manager_plugin.h>
#include <window/window_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) dynamic_color_registrar =
@@ -37,7 +37,7 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) wifi_ssid_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "WifiSsidPlugin");
wifi_ssid_plugin_register_with_registrar(wifi_ssid_registrar);
g_autoptr(FlPluginRegistrar) window_manager_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "WindowManagerPlugin");
window_manager_plugin_register_with_registrar(window_manager_registrar);
g_autoptr(FlPluginRegistrar) window_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "WindowPlugin");
window_plugin_register_with_registrar(window_registrar);
}
+1 -1
View File
@@ -10,7 +10,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
tray
url_launcher_linux
wifi_ssid
window_manager
window
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
+2 -2
View File
@@ -5,7 +5,7 @@
#include <gdk/gdkx.h>
#endif
#include <window_manager/window_manager_plugin.h>
#include <window/window_plugin.h>
#include "flutter/generated_plugin_registrant.h"
@@ -102,7 +102,7 @@ static void my_application_before_emit(GApplication* application, GVariant* plat
static void my_application_after_emit(GApplication* application, GVariant* platform_data) {
MyApplication* self = MY_APPLICATION(application);
if (self->had_window_before_emit) {
window_manager_plugin_activate();
window_plugin_activate();
}
G_APPLICATION_CLASS(my_application_parent_class)->after_emit(application, platform_data);
}