|
7 | 7 | #include "cflog.h" |
8 | 8 | #include "components/DisplayServerBackendFactory.h" |
9 | 9 | #include "components/IDisplayServerBackend.h" |
| 10 | +#include "components/PanelManager.h" |
| 11 | +#include "components/shell_layer_impl/DefaultShellLayerStrategy.h" |
| 12 | +#include "components/shell_layer_impl/WidgetShellLayer.h" |
10 | 13 | #include "platform/DesktopPropertyStrategyFactory.h" |
11 | 14 | #include "platform/display_backend_helper.h" |
12 | 15 | #include <memory> |
@@ -79,6 +82,26 @@ CFDesktopEntity::RunsSetupResult CFDesktopEntity::run_init(RunsSetupMethod m) { |
79 | 82 | } |
80 | 83 | } |
81 | 84 |
|
| 85 | + // ── Create PanelManager and ShellLayer ── |
| 86 | + auto* panel_mgr = new PanelManager(desktop_entity_, desktop_entity_); |
| 87 | + auto* shell = new WidgetShellLayer(desktop_entity_); |
| 88 | + |
| 89 | + // Inject into CFDesktop |
| 90 | + CFDesktop::InitResources res; |
| 91 | + res.panel_manager_ = panel_mgr; |
| 92 | + res.shell_layer_ = shell; |
| 93 | + desktop_entity_->register_desktop_resources(res); |
| 94 | + |
| 95 | + // Set shell strategy (solid background fallback) |
| 96 | + shell->setStrategy(std::make_unique<DefaultShellLayerStrategy>()); |
| 97 | + |
| 98 | + // Connect PanelManager geometry changes to ShellLayer |
| 99 | + QObject::connect(panel_mgr, &PanelManager::availableGeometryChanged, shell, |
| 100 | + &WidgetShellLayer::onAvailableGeometryChanged); |
| 101 | + |
| 102 | + // Show the desktop full-screen |
| 103 | + desktop_entity_->showFullScreen(); |
| 104 | + |
82 | 105 | log::trace("Entity Init"); |
83 | 106 | return RunsSetupResult::OK; |
84 | 107 | } |
|
0 commit comments