Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
IPlacementEngine.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
9
10#include <QJsonArray>
11#include <QJsonObject>
12#include <QPoint>
13#include <QRect>
14#include <QSet>
15#include <QString>
16#include <QStringList>
17#include <QVariantMap>
18
19#include <functional>
20#include <optional>
21
22class QObject;
23
24namespace PhosphorEngine {
25
26class ICrossSurfaceResolver;
27
60class PHOSPHORENGINE_EXPORT IPlacementEngine
61{
62public:
63 virtual ~IPlacementEngine() = default;
64
65 // ═══════════════════════════════════════════════════════════════════════════
66 // Screen ownership
67 // ═══════════════════════════════════════════════════════════════════════════
68
70 virtual bool isActiveOnScreen(const QString& screenId) const = 0;
71
72 // ═══════════════════════════════════════════════════════════════════════════
73 // Window lifecycle
74 // ═══════════════════════════════════════════════════════════════════════════
75
77 virtual void windowOpened(const QString& windowId, const QString& screenId, int minWidth = 0,
78 int minHeight = 0) = 0;
79
81 void windowOpened(const QString& windowId, const QString& screenId)
82 {
83 windowOpened(windowId, screenId, 0, 0);
84 }
85
87 virtual void windowClosed(const QString& windowId) = 0;
88
92 virtual void windowFocused(const QString& windowId, const QString& screenId) = 0;
93
94 // ═══════════════════════════════════════════════════════════════════════════
95 // Float management (explicit window ID)
96 //
97 // These take a concrete window ID — used by the D-Bus adaptor and
98 // engine-internal paths that already know which window to act on.
99 // toggleFocusedFloat() in the Navigation section is the user-intent
100 // entry point that resolves the focused window from NavigationContext.
101 // ═══════════════════════════════════════════════════════════════════════════
102
104 virtual void toggleWindowFloat(const QString& windowId, const QString& screenId) = 0;
105
107 virtual void setWindowFloat(const QString& windowId, bool shouldFloat) = 0;
108
109 // ═══════════════════════════════════════════════════════════════════════════
110 // Navigation (user intents)
111 // ═══════════════════════════════════════════════════════════════════════════
112
114 virtual void focusInDirection(const QString& direction, const NavigationContext& ctx) = 0;
115
117 virtual void moveFocusedInDirection(const QString& direction, const NavigationContext& ctx) = 0;
118
120 virtual void swapFocusedInDirection(const QString& direction, const NavigationContext& ctx) = 0;
121
123 virtual void moveFocusedToPosition(int position, const NavigationContext& ctx) = 0;
124
126 virtual void rotateWindows(bool clockwise, const NavigationContext& ctx) = 0;
127
129 virtual void reapplyLayout(const NavigationContext& ctx) = 0;
130
132 virtual void snapAllWindows(const NavigationContext& ctx) = 0;
133
135 virtual void cycleFocus(bool forward, const NavigationContext& ctx) = 0;
136
138 virtual void pushToEmptyZone(const NavigationContext& ctx) = 0;
139
141 virtual void restoreFocusedWindow(const NavigationContext& ctx) = 0;
142
144 virtual void toggleFocusedFloat(const NavigationContext& ctx) = 0;
145
146 // ═══════════════════════════════════════════════════════════════════════════
147 // OPTIONAL: Screen management (override if engine tracks multi-screen state)
148 // ═══════════════════════════════════════════════════════════════════════════
149
150 virtual QSet<QString> activeScreens() const
151 {
152 return {};
153 }
154 virtual void setActiveScreens(const QSet<QString>& screens)
155 {
156 Q_UNUSED(screens)
157 }
158
159 // ═══════════════════════════════════════════════════════════════════════════
160 // OPTIONAL: Window-appearance re-application (compositor reconnect)
161 // ═══════════════════════════════════════════════════════════════════════════
162
175 {
176 }
177
178 // ═══════════════════════════════════════════════════════════════════════════
179 // OPTIONAL: Unified placement capture/restore (engine-agnostic restore model)
180 //
181 // The single seam for the unified WindowPlacement restore model. An engine
182 // implements exactly these two methods to participate in save+restore; a new
183 // engine (e.g. a future scrolling engine) needs no core/schema change — it keys
184 // its own EngineSlot (state token + slot reference) under its engineId() in the
185 // single per-window record and reads/writes the shared freeGeometryByScreen.
186 // ═══════════════════════════════════════════════════════════════════════════
187
198 virtual std::optional<WindowPlacement> capturePlacement(const QString& windowId) const
199 {
200 Q_UNUSED(windowId)
201 return std::nullopt;
202 }
203
217 virtual bool restorePlacement(const WindowPlacement& placement, const QString& screenId)
218 {
219 Q_UNUSED(placement)
220 Q_UNUSED(screenId)
221 return false;
222 }
223
224 // ═══════════════════════════════════════════════════════════════════════════
225 // OPTIONAL: Window ordering (override if engine maintains stacking order)
226 // ═══════════════════════════════════════════════════════════════════════════
227
228 virtual QStringList managedWindowOrder(const QString& screenId) const
229 {
230 Q_UNUSED(screenId)
231 return {};
232 }
233 virtual void setInitialWindowOrder(const QString& screenId, const QStringList& windowIds)
234 {
235 Q_UNUSED(screenId)
236 Q_UNUSED(windowIds)
237 }
238
239 // ═══════════════════════════════════════════════════════════════════════════
240 // OPTIONAL: Per-screen config (override if engine supports per-screen overrides)
241 // ═══════════════════════════════════════════════════════════════════════════
242
243 virtual void applyPerScreenConfig(const QString& screenId, const QVariantMap& overrides)
244 {
245 Q_UNUSED(screenId)
246 Q_UNUSED(overrides)
247 }
248 virtual void clearPerScreenConfig(const QString& screenId)
249 {
250 Q_UNUSED(screenId)
251 }
252 virtual QVariantMap perScreenOverrides(const QString& screenId) const
253 {
254 Q_UNUSED(screenId)
255 return {};
256 }
257
258 // ═══════════════════════════════════════════════════════════════════════════
259 // OPTIONAL: Mode-specific float tracking (override if engine has mode-aware float)
260 // ═══════════════════════════════════════════════════════════════════════════
261
262 virtual bool isModeSpecificFloated(const QString& windowId) const
263 {
264 Q_UNUSED(windowId)
265 return false;
266 }
267 virtual void clearModeSpecificFloatMarker(const QString& windowId)
268 {
269 Q_UNUSED(windowId)
270 }
271 // ═══════════════════════════════════════════════════════════════════════════
272 // OPTIONAL: Drag insert preview (override if engine supports drag-to-insert)
273 // ═══════════════════════════════════════════════════════════════════════════
274
275 virtual bool hasDragInsertPreview() const
276 {
277 return false;
278 }
279 virtual bool beginDragInsertPreview(const QString& windowId, const QString& screenId)
280 {
281 Q_UNUSED(windowId)
282 Q_UNUSED(screenId)
283 return false;
284 }
286 {
287 }
289 {
290 }
291 virtual QString dragInsertPreviewScreenId() const
292 {
293 return {};
294 }
295 virtual bool isWindowTracked(const QString& windowId) const
296 {
297 Q_UNUSED(windowId)
298 return false;
299 }
306 virtual bool isWindowManaged(const QString& windowId) const
307 {
308 Q_UNUSED(windowId)
309 return false;
310 }
311
314 virtual bool isWindowTiled(const QString& windowId) const
315 {
316 Q_UNUSED(windowId)
317 return false;
318 }
319
330 virtual QString screenForTrackedWindow(const QString& windowId) const
331 {
332 Q_UNUSED(windowId)
333 return {};
334 }
335
345 virtual void onWindowResized(const QString& windowId, const QRect& oldFrame, const QRect& newFrame,
346 const QString& screenId)
347 {
348 Q_UNUSED(windowId)
349 Q_UNUSED(oldFrame)
350 Q_UNUSED(newFrame)
351 Q_UNUSED(screenId)
352 }
353
354 // ═══════════════════════════════════════════════════════════════════════════
355 // Cross-engine handoff
356 //
357 // When a window crosses screens whose owning engines differ (e.g. a snap
358 // screen → an autotile screen, via drag drop), ownership has to transfer
359 // between two engines. Without an explicit contract, each engine makes
360 // local guesses (autotile's "is this a floating window I should adopt?"
361 // branch, snap's "do I know this window?" early-return) and the daemon
362 // misroutes user intents during the transition window.
363 //
364 // The handoff is a two-step transaction the daemon orchestrates:
365 // 1. fromEngine->handoffRelease(windowId)
366 // 2. toEngine->handoffReceive(ctx)
367 //
368 // Each engine's release is a tracking-only clear (no geometry mutation —
369 // the receiving engine places the window). Each engine's receive applies
370 // its own placement policy (autotile picks an insert slot or floats;
371 // snap picks the nearest zone or floats) using the context fields.
372 //
373 // Engines that don't currently distinguish ownership across screens can
374 // leave both as no-ops; the defaults are safe.
375 //
376 // The verbs are prefixed `handoff*` to keep them distinct from an engine
377 // dropping a window entirely (the window is no longer engine-managed at all
378 // — a different concept from "transferring ownership to another engine").
379 // ═══════════════════════════════════════════════════════════════════════════
380
385 {
386 QString windowId;
387 QString fromEngineId;
388 QString toScreenId;
389 int toDesktop = 0;
394 QPoint dropPos;
396 QStringList sourceZoneIds;
397 bool wasFloating = false;
398 int insertIndex = -1;
404 };
405
419 virtual void handoffReceive(const HandoffContext& ctx)
420 {
421 Q_UNUSED(ctx)
422 }
423
436 virtual void handoffRelease(const QString& windowId)
437 {
438 Q_UNUSED(windowId)
439 }
440
444 virtual QString engineId() const
445 {
446 return {};
447 }
448
451 virtual int computeDragInsertIndexAtPoint(const QString& screenId, const QPoint& cursorPos) const
452 {
453 Q_UNUSED(screenId)
454 Q_UNUSED(cursorPos)
455 return -1;
456 }
457
459 virtual void updateDragInsertPreview(int insertIndex)
460 {
461 Q_UNUSED(insertIndex)
462 }
463
464 // ═══════════════════════════════════════════════════════════════════════════
465 // OPTIONAL: Algorithm / mode identity (override if engine has switchable algorithms)
466 // ═══════════════════════════════════════════════════════════════════════════
467
468 virtual QString algorithmId() const
469 {
470 return {};
471 }
472 virtual void setAlgorithm(const QString& algorithmId)
473 {
474 Q_UNUSED(algorithmId)
475 }
476 virtual bool isEnabled() const noexcept
477 {
478 return false;
479 }
480 virtual QString activeScreen() const
481 {
482 return {};
483 }
484 virtual void setActiveScreenHint(const QString& screenId)
485 {
486 Q_UNUSED(screenId)
487 }
488
489 // ═══════════════════════════════════════════════════════════════════════════
490 // OPTIONAL: Desktop/activity context (override if engine is desktop-aware)
491 // ═══════════════════════════════════════════════════════════════════════════
492
493 virtual void setCurrentDesktop(int desktop)
494 {
495 Q_UNUSED(desktop)
496 }
503 virtual void setCurrentDesktopForScreen(const QString& screenId, int desktop)
504 {
505 Q_UNUSED(screenId)
506 Q_UNUSED(desktop)
507 }
509 virtual void clearCurrentDesktopForScreen(const QString& screenId)
510 {
511 Q_UNUSED(screenId)
512 }
513 virtual void setCurrentActivity(const QString& activity)
514 {
515 Q_UNUSED(activity)
516 }
523 {
524 Q_UNUSED(resolver)
525 }
526 virtual void updateStickyScreenPins(const std::function<bool(const QString&)>& isWindowSticky)
527 {
528 Q_UNUSED(isWindowSticky)
529 }
530 virtual QSet<int> desktopsWithActiveState() const
531 {
532 return {};
533 }
534 virtual void pruneStatesForDesktop(int removedDesktop)
535 {
536 Q_UNUSED(removedDesktop)
537 }
538 virtual void pruneStatesForActivities(const QStringList& validActivities)
539 {
540 Q_UNUSED(validActivities)
541 }
542
543 // ═══════════════════════════════════════════════════════════════════════════
544 // OPTIONAL: Settings synchronization (override if engine caches config)
545 // ═══════════════════════════════════════════════════════════════════════════
546
553 {
554 }
555 virtual qreal effectiveSplitRatioStep(const QString& screenId) const
556 {
557 Q_UNUSED(screenId)
558 return 0.05;
559 }
563 virtual int runtimeMaxWindows() const
564 {
565 return -1;
566 }
567
568 // ═══════════════════════════════════════════════════════════════════════════
569 // OPTIONAL: Retile / refresh (override if engine supports on-demand retile)
570 // ═══════════════════════════════════════════════════════════════════════════
571
572 virtual void retile(const QString& screenId = QString())
573 {
574 Q_UNUSED(screenId)
575 }
576 virtual void scheduleRetileForScreen(const QString& screenId)
577 {
578 Q_UNUSED(screenId)
579 }
580
581 // ═══════════════════════════════════════════════════════════════════════════
582 // OPTIONAL: Mode-specific float MARKER (runtime discriminator, NOT persistence)
583 //
584 // Distinguishes a USER float in this engine's mode from an incidental float
585 // (e.g. autotile overflow). It is live runtime state the capture funnel reads
586 // to decide whether a float should persist into the record — there is no
587 // parallel "saved floats" store; the WindowPlacement record is the single
588 // source of truth for cross-mode float state.
589 // ═══════════════════════════════════════════════════════════════════════════
590
591 virtual void markModeSpecificFloated(const QString& windowId)
592 {
593 Q_UNUSED(windowId)
594 }
595
596 // Per-window restore persistence is unified: engines implement
597 // capturePlacement()/restorePlacement() (below) and the common
598 // WindowPlacementStore handles capture timing, serialization, and the single
599 // WindowPlacements config key. No engine-specific serialize/deserialize hooks.
600
601 // ═══════════════════════════════════════════════════════════════════════════
602 // OPTIONAL: Init hooks (override to receive shared services)
603 // ═══════════════════════════════════════════════════════════════════════════
604
608 virtual void setWindowRegistry(QObject* registry)
609 {
610 Q_UNUSED(registry)
611 }
612 // ═══════════════════════════════════════════════════════════════════════════
613 // OPTIONAL: Master operations (autotile-specific, no-op on snap engine)
614 // ═══════════════════════════════════════════════════════════════════════════
615
616 virtual void increaseMasterRatio(qreal delta = 0.05)
617 {
618 Q_UNUSED(delta)
619 }
620 virtual void decreaseMasterRatio(qreal delta = 0.05)
621 {
622 Q_UNUSED(delta)
623 }
624 virtual void increaseMasterCount()
625 {
626 }
627 virtual void decreaseMasterCount()
628 {
629 }
630 virtual void focusMaster()
631 {
632 }
634 {
635 }
636
637 // ═══════════════════════════════════════════════════════════════════════════
638 // Engine state serialization
639 // ═══════════════════════════════════════════════════════════════════════════
640
641 virtual QJsonObject serializeEngineState() const
642 {
643 return {};
644 }
645 virtual void deserializeEngineState(const QJsonObject& state)
646 {
647 Q_UNUSED(state)
648 }
649
650 // ═══════════════════════════════════════════════════════════════════════════
651 // Persistence
652 // ═══════════════════════════════════════════════════════════════════════════
653
654 virtual void saveState() = 0;
655 virtual void loadState() = 0;
656
657 // ═══════════════════════════════════════════════════════════════════════════
658 // State access
659 // ═══════════════════════════════════════════════════════════════════════════
660
666 virtual IPlacementState* stateForScreen(const QString& screenId) = 0;
667 virtual const IPlacementState* stateForScreen(const QString& screenId) const = 0;
668};
669
670} // namespace PhosphorEngine
Resolves the neighbouring surface — output or virtual desktop — in a direction, for cross-surface win...
Definition ICrossSurfaceResolver.h:21
Unified placement engine interface.
Definition IPlacementEngine.h:61
virtual QString activeScreen() const
Definition IPlacementEngine.h:480
virtual QString dragInsertPreviewScreenId() const
Definition IPlacementEngine.h:291
virtual void applyPerScreenConfig(const QString &screenId, const QVariantMap &overrides)
Definition IPlacementEngine.h:243
virtual void increaseMasterCount()
Definition IPlacementEngine.h:624
virtual QString engineId() const
Stable engine identity for HandoffContext.fromEngineId.
Definition IPlacementEngine.h:444
virtual void setAlgorithm(const QString &algorithmId)
Definition IPlacementEngine.h:472
void windowOpened(const QString &windowId, const QString &screenId)
Convenience overload — equivalent to windowOpened(id, screen, 0, 0).
Definition IPlacementEngine.h:81
virtual void setCurrentActivity(const QString &activity)
Definition IPlacementEngine.h:513
virtual int runtimeMaxWindows() const
Runtime max-windows limit.
Definition IPlacementEngine.h:563
virtual void setActiveScreenHint(const QString &screenId)
Definition IPlacementEngine.h:484
virtual void setWindowRegistry(QObject *registry)
Attach a window-class registry (QObject carrying WindowRegistry).
Definition IPlacementEngine.h:608
virtual void onWindowResized(const QString &windowId, const QRect &oldFrame, const QRect &newFrame, const QString &screenId)
Notify the engine that a tracked window finished an interactive resize.
Definition IPlacementEngine.h:345
virtual void setCurrentDesktopForScreen(const QString &screenId, int desktop)
Set a single screen's current virtual desktop (Plasma 6.7 "switch desktops independently for each scr...
Definition IPlacementEngine.h:503
virtual void setActiveScreens(const QSet< QString > &screens)
Definition IPlacementEngine.h:154
virtual void windowFocused(const QString &windowId, const QString &screenId)=0
A window gained focus (called when the compositor reports activation).
virtual QString screenForTrackedWindow(const QString &windowId) const
Return the screen this engine considers the window to be on, or empty if the window isn't tracked by ...
Definition IPlacementEngine.h:330
virtual void increaseMasterRatio(qreal delta=0.05)
Definition IPlacementEngine.h:616
virtual bool isWindowTracked(const QString &windowId) const
Definition IPlacementEngine.h:295
virtual void commitDragInsertPreview()
Definition IPlacementEngine.h:285
virtual void moveFocusedInDirection(const QString &direction, const NavigationContext &ctx)=0
Move the focused window to the adjacent slot.
virtual void scheduleRetileForScreen(const QString &screenId)
Definition IPlacementEngine.h:576
virtual void swapFocusedWithMaster()
Definition IPlacementEngine.h:633
virtual void handoffRelease(const QString &windowId)
Release ownership of a window WITHOUT modifying its geometry.
Definition IPlacementEngine.h:436
virtual bool isWindowTiled(const QString &windowId) const
Whether the window is actively tiled (engine-owned, non-floating).
Definition IPlacementEngine.h:314
virtual ~IPlacementEngine()=default
virtual void setCrossSurfaceResolver(ICrossSurfaceResolver *resolver)
Inject the cross-surface resolver used to find a neighbouring output / desktop when directional navig...
Definition IPlacementEngine.h:522
virtual void setInitialWindowOrder(const QString &screenId, const QStringList &windowIds)
Definition IPlacementEngine.h:233
virtual void restoreFocusedWindow(const NavigationContext &ctx)=0
Restore the focused window out of its managed state.
virtual void clearCurrentDesktopForScreen(const QString &screenId)
Drop a screen's per-output desktop, reverting it to the global current.
Definition IPlacementEngine.h:509
virtual IPlacementState * stateForScreen(const QString &screenId)=0
Per-screen state object for the given screen.
virtual void handoffReceive(const HandoffContext &ctx)
Receive ownership of a window from another engine.
Definition IPlacementEngine.h:419
virtual void focusMaster()
Definition IPlacementEngine.h:630
virtual QString algorithmId() const
Definition IPlacementEngine.h:468
virtual void deserializeEngineState(const QJsonObject &state)
Definition IPlacementEngine.h:645
virtual bool hasDragInsertPreview() const
Definition IPlacementEngine.h:275
virtual void focusInDirection(const QString &direction, const NavigationContext &ctx)=0
Move keyboard focus to the adjacent window.
virtual void windowOpened(const QString &windowId, const QString &screenId, int minWidth=0, int minHeight=0)=0
A new window appeared on this engine's screen.
virtual void clearModeSpecificFloatMarker(const QString &windowId)
Definition IPlacementEngine.h:267
virtual void moveFocusedToPosition(int position, const NavigationContext &ctx)=0
Move the focused window to the Nth position.
virtual void refreshConfigFromSettings()
Re-read all tuning values from the engine's settings interface.
Definition IPlacementEngine.h:552
virtual QSet< QString > activeScreens() const
Definition IPlacementEngine.h:150
virtual bool isWindowManaged(const QString &windowId) const
Whether the engine considers the window "managed" (eligible for layout operations).
Definition IPlacementEngine.h:306
virtual void retile(const QString &screenId=QString())
Definition IPlacementEngine.h:572
virtual const IPlacementState * stateForScreen(const QString &screenId) const =0
virtual bool restorePlacement(const WindowPlacement &placement, const QString &screenId)
Apply placement to a (re)opening window on screenId.
Definition IPlacementEngine.h:217
virtual bool isEnabled() const noexcept
Definition IPlacementEngine.h:476
virtual qreal effectiveSplitRatioStep(const QString &screenId) const
Definition IPlacementEngine.h:555
virtual bool isActiveOnScreen(const QString &screenId) const =0
Whether this engine is active on the given screen.
virtual void toggleWindowFloat(const QString &windowId, const QString &screenId)=0
Toggle between managed and floating.
virtual void swapFocusedInDirection(const QString &direction, const NavigationContext &ctx)=0
Swap the focused window with the adjacent window.
virtual bool isModeSpecificFloated(const QString &windowId) const
Definition IPlacementEngine.h:262
virtual void rotateWindows(bool clockwise, const NavigationContext &ctx)=0
Rotate all managed windows on the screen.
virtual bool beginDragInsertPreview(const QString &windowId, const QString &screenId)
Definition IPlacementEngine.h:279
virtual void snapAllWindows(const NavigationContext &ctx)=0
Snap every unmanaged window on the screen to the current layout.
virtual void setWindowFloat(const QString &windowId, bool shouldFloat)=0
Set floating state explicitly (directional, not toggle).
virtual QJsonObject serializeEngineState() const
Definition IPlacementEngine.h:641
virtual void cycleFocus(bool forward, const NavigationContext &ctx)=0
Cycle keyboard focus through managed windows.
virtual void toggleFocusedFloat(const NavigationContext &ctx)=0
Toggle the focused window between managed and floating.
virtual void windowClosed(const QString &windowId)=0
A window was closed.
virtual void clearPerScreenConfig(const QString &screenId)
Definition IPlacementEngine.h:248
virtual void reapplyLayout(const NavigationContext &ctx)=0
Re-apply the current layout to all managed windows.
virtual void updateStickyScreenPins(const std::function< bool(const QString &)> &isWindowSticky)
Definition IPlacementEngine.h:526
virtual void updateDragInsertPreview(int insertIndex)
Update the target insert index for an active drag-insert preview.
Definition IPlacementEngine.h:459
virtual void reapplyManagedWindowAppearance()
Re-drive the compositor's per-window appearance (border, hidden title bar) for every window this engi...
Definition IPlacementEngine.h:174
virtual void setCurrentDesktop(int desktop)
Definition IPlacementEngine.h:493
virtual void cancelDragInsertPreview()
Definition IPlacementEngine.h:288
virtual void decreaseMasterRatio(qreal delta=0.05)
Definition IPlacementEngine.h:620
virtual void pruneStatesForDesktop(int removedDesktop)
Definition IPlacementEngine.h:534
virtual void pushToEmptyZone(const NavigationContext &ctx)=0
Move the focused window to the first empty slot.
virtual void markModeSpecificFloated(const QString &windowId)
Definition IPlacementEngine.h:591
virtual void decreaseMasterCount()
Definition IPlacementEngine.h:627
virtual int computeDragInsertIndexAtPoint(const QString &screenId, const QPoint &cursorPos) const
Compute the insert index for a cursor position on a managed screen.
Definition IPlacementEngine.h:451
virtual QSet< int > desktopsWithActiveState() const
Definition IPlacementEngine.h:530
virtual QStringList managedWindowOrder(const QString &screenId) const
Definition IPlacementEngine.h:228
virtual QVariantMap perScreenOverrides(const QString &screenId) const
Definition IPlacementEngine.h:252
virtual void pruneStatesForActivities(const QStringList &validActivities)
Definition IPlacementEngine.h:538
virtual std::optional< WindowPlacement > capturePlacement(const QString &windowId) const
Report windowId's CURRENT placement for persistence, or nullopt if this engine does not manage it.
Definition IPlacementEngine.h:198
Per-screen placement state contract.
Definition IPlacementState.h:26
Definition EngineTypes.h:13
Context for a cross-engine window handoff.
Definition IPlacementEngine.h:385
QString fromEngineId
source engine identity ("snap" / "autotile" / "")
Definition IPlacementEngine.h:387
QRect sourceGeometry
window's frame at handoff time (for size preservation)
Definition IPlacementEngine.h:395
QPoint dropPos
cursor position at drop, or invalid for non-drag handoffs
Definition IPlacementEngine.h:394
QString toScreenId
destination screen (must be owned by to engine)
Definition IPlacementEngine.h:388
QStringList sourceZoneIds
zones the window held at source (empty if not snapped)
Definition IPlacementEngine.h:396
QString windowId
Definition IPlacementEngine.h:386
Target window + screen for a navigation or lifecycle operation.
Definition NavigationContext.h:18
One window's single, authoritative placement record — the unit of the unified, engine-agnostic restor...
Definition WindowPlacement.h:66