Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
ServiceConstants.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
6#include <QByteArray>
7#include <QLatin1String>
8#include <QtGlobal>
9#include <algorithm>
10#include <cmath>
11
13
22inline constexpr QLatin1String Name("org.phosphor_works.Placement");
23inline constexpr QLatin1String ObjectPath("/org/phosphor_works/Placement");
24
36inline constexpr QLatin1String HostApi("placement");
37
60inline constexpr int QuickLayoutSlotCount = 9;
61
68inline constexpr int MaxRunningWindowsPayloadBytes = 1 << 20;
69
70namespace Interface {
71inline constexpr QLatin1String Settings("org.phosphor_works.Placement.Settings");
72inline constexpr QLatin1String WindowDrag("org.phosphor_works.Placement.WindowDrag");
73inline constexpr QLatin1String WindowTracking("org.phosphor_works.Placement.WindowTracking");
74inline constexpr QLatin1String Overlay("org.phosphor_works.Placement.Overlay");
75// Shared tiling-family engine pipeline (autotile + scrolling). The
76// lifecycle surface moved here from the Autotile interface (then
77// org.plasmazones.Autotile, see the v5 and v11 notes below) when the
78// scrolling engine joined; the Autotile name now carries only autotile's own
79// verbs. The project ships daemon and effect together, so no wire
80// compatibility alias is kept.
81inline constexpr QLatin1String Tiling("org.phosphor_works.Placement.Tiling");
82// Engine-specific sibling interfaces (autotile verbs / scrolling screen
83// set). Listed so this namespace stays a complete index of published
84// interfaces even though the adaptors' Q_CLASSINFO must repeat the
85// literal (macro argument).
86inline constexpr QLatin1String Autotile("org.phosphor_works.Placement.Autotile");
87inline constexpr QLatin1String Scrolling("org.phosphor_works.Placement.Scrolling");
88inline constexpr QLatin1String LayoutRegistry("org.phosphor_works.Placement.LayoutRegistry");
89inline constexpr QLatin1String Screen("org.phosphor_works.Placement.Screen");
90inline constexpr QLatin1String ZoneDetection("org.phosphor_works.Placement.ZoneDetection");
91inline constexpr QLatin1String CompositorBridge("org.phosphor_works.Placement.CompositorBridge");
92inline constexpr QLatin1String Snap("org.phosphor_works.Placement.Snap");
93inline constexpr QLatin1String Rules("org.phosphor_works.Placement.Rules");
94inline constexpr QLatin1String Control("org.phosphor_works.Placement.Control");
95inline constexpr QLatin1String Shader("org.phosphor_works.Placement.Shader");
96}
97
101namespace Error {
102inline constexpr QLatin1String Busy("org.phosphor_works.Placement.Error.Busy");
103inline constexpr QLatin1String Shutdown("org.phosphor_works.Placement.Error.Shutdown");
104}
105
113inline constexpr QLatin1String ShaderProfileTree("shaderProfileTree");
114inline constexpr QLatin1String MotionProfileTree("motionProfileTree");
115inline constexpr QLatin1String AnimationShaderSearchPaths("animationShaderSearchPaths");
116inline constexpr QLatin1String DecorationProfileTree("decorationProfileTree");
117inline constexpr QLatin1String OverlayShaderTree("overlayShaderTree");
122inline constexpr QLatin1String DecorationBlurScaleMultiplier("decorationBlurScaleMultiplier");
123
133inline constexpr QLatin1String InnerGap("innerGap");
134inline constexpr QLatin1String OuterGap("outerGap");
135inline constexpr QLatin1String UsePerSideOuterGap("usePerSideOuterGap");
136inline constexpr QLatin1String OuterGapTop("outerGapTop");
137inline constexpr QLatin1String OuterGapBottom("outerGapBottom");
138inline constexpr QLatin1String OuterGapLeft("outerGapLeft");
139inline constexpr QLatin1String OuterGapRight("outerGapRight");
141}
142
154inline constexpr QLatin1String IsMinimized("isMinimized");
158inline constexpr QLatin1String IsDemandingAttention("isDemandingAttention");
159inline constexpr QLatin1String IsFullscreen("isFullscreen");
160inline constexpr QLatin1String IsSticky("isSticky");
161inline constexpr QLatin1String IsMaximized("isMaximized");
162inline constexpr QLatin1String IsAxisMaximized("isAxisMaximized");
163inline constexpr QLatin1String IsFocused("isFocused");
164inline constexpr QLatin1String IsTransient("isTransient");
165inline constexpr QLatin1String IsNotification("isNotification");
166inline constexpr QLatin1String KeepAbove("keepAbove");
167inline constexpr QLatin1String KeepBelow("keepBelow");
168inline constexpr QLatin1String SkipTaskbar("skipTaskbar");
169inline constexpr QLatin1String SkipPager("skipPager");
170inline constexpr QLatin1String SkipSwitcher("skipSwitcher");
171inline constexpr QLatin1String IsModal("isModal");
172inline constexpr QLatin1String HasDecoration("hasDecoration");
173inline constexpr QLatin1String IsResizable("isResizable");
174inline constexpr QLatin1String IsMovable("isMovable");
175inline constexpr QLatin1String IsMaximizable("isMaximizable");
176inline constexpr QLatin1String Width("width");
177inline constexpr QLatin1String Height("height");
178inline constexpr QLatin1String PositionX("positionX");
179inline constexpr QLatin1String PositionY("positionY");
180inline constexpr QLatin1String CaptionNormal("captionNormal");
184inline constexpr QLatin1String VirtualDesktops("virtualDesktops");
188inline constexpr QLatin1String Activities("activities");
189}
190
202namespace ScrollTabKey {
203inline constexpr QLatin1String TabStyle("tabStyle");
204inline constexpr QLatin1String GapsBetweenTabs("gapsBetweenTabs");
205inline constexpr QLatin1String CornerRadius("cornerRadius");
206inline constexpr QLatin1String ActiveColor("activeColor");
207inline constexpr QLatin1String InactiveColor("inactiveColor");
208inline constexpr QLatin1String UrgentColor("urgentColor");
209// The tab label's font. Paint keys like TabStyle, GapsBetweenTabs and
210// CornerRadius, carried on the per-screen override map only — a window rule
211// cannot restyle one tab's text, only recolour it, so unlike the colours
212// above these have no counterpart on the colour map. There is no size key:
213// the effect's painter fits the label to the pill thickness.
214inline constexpr QLatin1String FontFamily("fontFamily");
215inline constexpr QLatin1String FontWeight("fontWeight");
216inline constexpr QLatin1String FontItalic("fontItalic");
217inline constexpr QLatin1String FontUnderline("fontUnderline");
218inline constexpr QLatin1String FontStrikeout("fontStrikeout");
219}
220
243inline constexpr QLatin1String FocusFollowsMouse("focusFollowsMouse");
244inline constexpr QLatin1String CropStraddlers("cropStraddlers");
245inline constexpr QLatin1String VerticalAxis("verticalAxis");
246}
247
285inline constexpr QLatin1String TabCount("tabCount");
290inline constexpr QLatin1String ActiveTab("activeTab");
293inline constexpr QLatin1String TabPosition("tabPosition");
298inline constexpr QLatin1String TabLength("tabLength");
299}
300
314namespace StripModelKey {
317inline constexpr QLatin1String Axis("axis");
320inline constexpr QLatin1String ViewOffsetPx("viewOffsetPx");
322inline constexpr QLatin1String ViewportPx("viewportPx");
324inline constexpr QLatin1String StripExtentPx("stripExtentPx");
326inline constexpr QLatin1String ActiveColumn("activeColumn");
328inline constexpr QLatin1String Columns("columns");
330inline constexpr QLatin1String Index("index");
332inline constexpr QLatin1String StripPosPx("stripPosPx");
334inline constexpr QLatin1String ExtentPx("extentPx");
337inline constexpr QLatin1String Display("display");
339inline constexpr QLatin1String ActiveTile("activeTile");
341inline constexpr QLatin1String Maximized("maximized");
343inline constexpr QLatin1String Tiles("tiles");
345inline constexpr QLatin1String WindowId("windowId");
347inline constexpr QLatin1String CrossPx("crossPx");
349inline constexpr QLatin1String Minimized("minimized");
350}
351
363namespace DropProxyKey {
366inline constexpr QLatin1String Rect("rect");
368inline constexpr QLatin1String Cells("cells");
371inline constexpr QLatin1String Id("id");
372}
373
377namespace Apps {
378namespace Settings {
379inline constexpr QLatin1String ServiceName("org.phosphor_works.Facet");
380inline constexpr QLatin1String ObjectPath("/org/phosphor_works/Facet");
381inline constexpr QLatin1String Interface("org.phosphor_works.Facet");
382}
383namespace Editor {
384inline constexpr QLatin1String ServiceName("org.phosphor_works.PlasmaZones.Editor");
385inline constexpr QLatin1String ObjectPath("/org/phosphor_works/PlasmaZones/Editor");
386inline constexpr QLatin1String Interface("org.phosphor_works.PlasmaZones.Editor");
387}
388}
389
390// Protocol version. Bumped when the D-Bus method/signal schema changes in a
391// backwards-incompatible way (e.g. dragStopped out-params changed, new
392// required signal). Both sides check the peer's version at bridge registration
393// and reject if below their minimum. The version is a simple integer string
394// ("1", "2", …) to keep comparison trivial.
395//
396// v1: original protocol (the 2.4.0 through 2.8.8 releases; no 3.x release
397// spoke it, and 3.0.0 already carried v3)
398// v2: split dragStopped + snapAssistReady signal (Phase C);
399// WindowGeometryEntry gained `screenId` (a(siiiis)) so the compositor
400// can seed its tracked-screen cache from the daemon's authoritative
401// answer instead of re-deriving from geometry (which races with VS
402// reconfig).
403// v3: setSnapAssistThumbnail signature changed from (s, s data:URL) to
404// (s, i, i, ay raw ARGB32) returning b. Thumbnail capture moved
405// out of the daemon and into the kwin-effect (OffscreenQuickScene
406// + WindowThumbnail through KWin's live compositor texture);
407// daemon ScreenShot2 D-Bus dependency and the matching
408// X-KDE-DBUS-Restricted-Interfaces gate are dropped. Mismatched
409// peers fail the bridge handshake instead of producing
410// method-not-found at first thumbnail post.
411// v4: setWindowMetadata widened from 4 args (instanceId, appId,
412// desktopFile, title) to 10: adds windowRole, pid, virtualDesktop,
413// activity, windowType, plus a trailing a{sv} (QVariantMap) carrying the
414// extended window-property snapshot (state flags, geometry, accessory
415// flags, captionNormal — see WindowMetadataKey) so the daemon's
416// window-rule resolvers match the same KWin-property fields the effect
417// path resolves live. A stale effect sending an older form would fail
418// marshalling, so the bridge handshake rejects mismatched peers up front.
419//
420// Inside v4 and WITHOUT a bump, TileRequestEntry gained `stacking`,
421// a(siiiissbb) -> a(siiiissbbs): 3.2.7 carries the shorter form and
422// 3.3.0 the longer one, and both carry v4, so the handshake does not
423// separate a peer on either side of that change.
424//
425// v5: the v3.4 wire. Everything below landed in one unreleased cycle unless
426// its paragraph says otherwise, so it is a single step away from the v4
427// that last shipped. Do NOT split it back into one bump per change: no
428// released peer ever spoke an
429// intermediate version, and MinPeerApiVersion has always tracked
430// ApiVersion exactly, so those steps were unobservable outside the
431// branch. A new change AFTER v5 ships needs v6.
432//
433// Interfaces (the names this release used, before the v11 rename).
434// The org.plasmazones.Autotile lifecycle surface moved
435// wholesale to the engine-neutral org.plasmazones.Tiling interface
436// (property managedScreens, signal managedScreensChanged), with
437// engine-specific verbs split onto org.plasmazones.Autotile /
438// org.plasmazones.Scrolling. The scrolling tab indicators moved from a
439// daemon-rendered layer surface into the KWin effect's own paint pass,
440// so org.plasmazones.Scrolling LOST scrollTabSurfaces and
441// scrollTabSurfaceChanged and org.plasmazones.Tiling GAINED the
442// transport that replaces them (scrollTabStrips / scrollTabStripsChanged,
443// scrollTabPaintOverrides / scrollTabPaintOverridesChanged,
444// scrollTabColors / scrollTabColorsChanged).
445//
446// NOT part of this step: org.plasmazones.Overlay's
447// setWindowThumbnailDmabuf, the zero-copy thumbnail path. It has been on
448// the wire with its present signature since 3.1.0, the first release to
449// carry v4. A false reply routes the caller back to
450// setSnapAssistThumbnail, which is what makes it safe for a peer to try
451// the dma-buf form first, so the two are one transport with a fallback
452// rather than two independent methods.
453//
454// windowsTileRequested. TileRequestEntry widened from a(siiiissbbs) to
455// a(siiiissbbbssiiibsb). The added fields, in wire order: scrollEdge
456// (which side of the strip a column departed towards, a closed set of
457// left / right / top / bottom because a strip's axis is per-screen);
458// windowedFullscreen, inserted after floating, which has the effect flip
459// KWin fullscreen state on the client while committing the column rect;
460// viewDelta, how far the strip's VIEW slid along that screen's own strip
461// axis, so the effect springs it once per output and moves the strip
462// rigidly instead of starting an independent per-window spring for each
463// column; visualX / visualY / hasVisualPos, because a parked column
464// commits below the union of all outputs but has to be SEEN travelling
465// while the view slides, so the safe commit and the paint position are
466// separate answers; tabFrom, naming the tab an arriving tab replaces in a
467// tabbed column so the effect can cross-fade the two rather than hard-cut
468// between two windows in one rect; and viewImmediate, marking a batch
469// whose view travel is user-driven continuous motion (the drag edge
470// auto-scroll heartbeat) so the effect applies the delta outright instead
471// of animating it, because a leg retargeted every 16 ms never progresses
472// on a stateless curve.
473//
474// Snap.resolveWindowRestore gained three in-args: isOpenPath, minWidth,
475// minHeight. The cross-screen tile reclaim hangs off this slot and some
476// of its drivers are NOT opens (the unminimize of a daemon-restart
477// orphan, the pending-restores sweep, the bring-up stacking sweep and the
478// desktop-arrival re-drive among them; PhosphorEngine::RestoreReason is
479// the full list); without the argument the daemon could not
480// tell them apart, and unminimizing a window teleported it across
481// monitors. It shipped as an isOpenPath BOOL, (ssbibii), in 3.4.0 and
482// became the restoreReason enum, (ssbiiii), in 3.4.5: the
483// desktop-arrival re-drive is a login-restore continuation that must skip
484// the desktop restore but still qualify for the reclaim, which two states
485// cannot express. That second change is the exception to this block's
486// one-unreleased-cycle rule. It is a signature change that took NO bump:
487// 3.4.4 and 3.4.5 both carry v8, so the handshake does not separate a
488// peer on either side of it.
489//
490// The min sizes exist because a reclaim ADOPTS the window into
491// a strip or layout and the adopting engine evaluates its oversized /
492// float verdict exactly once from them, so passing 0,0 left an oversized
493// window tiled for the session. The reclaim was later removed (a window
494// is restored only on the output it opens on); restoreReason still gates
495// the snap restore's same-app record FIFO, placement rules and the
496// free-size restore, and the min sizes are accepted and ignored.
497//
498// Why the handshake and not signature matching. Parts of the above
499// widen NOTHING: the interface moves above, and scrollEdge's closed set
500// growing from {left,right} to {left,right,top,bottom} while viewDelta
501// stayed an int.
502// A peer mismatched on those demarshals PERFECTLY and then misbehaves,
503// dropping every vertical park at its own validationError and reading a
504// vertical view delta as a horizontal slide. The version handshake is the
505// ONLY thing that refuses such a pairing, which is why both sides must be
506// built and shipped from the same source.
507// v6: columnMaximized on TileRequestEntry, widening it from
508// a(siiiissbbbssiiibsb) to a(siiiissbbbbssiiibsb). The flag is inserted
509// after windowedFullscreen, its nearest sibling in both meaning and
510// handling: both are scrolling-only compositor states the effect imposes
511// on the client while the strip keeps owning the rect.
512//
513// It exists because the effect intercepts a window's maximize request
514// and routes it to the scrolling engine's maximize-column verb, which
515// makes KWin's maximize bit a VIEW of engine state rather than state in
516// its own right. Something has to drive that bit when the verb is
517// reached any other way (the Meta+Alt+F shortcut, a width verb that
518// lands full width), or the titlebar button renders un-toggled and the
519// two entry points disagree about one window.
520//
521// Carried as data rather than inferred from the committed rect, which
522// the effect already has. A tile's main extent is the column's main
523// extent LESS any within-column tab-indicator reservation, so a
524// maximized tabbed column measures under full width and would read as
525// not-maximized. The engine measures the column's FULL rect against the
526// work area's main extent — the quantity the effect cannot reconstruct
527// from the tile rects it receives. It is NOT read off the strip's
528// pre-maximize slot, which answers "is there a stored width to go back
529// to" rather than "is this column maximized". Same doctrine as tabFrom:
530// the engine names what it did instead of leaving the compositor to
531// infer it from rect coincidence.
532//
533// Scrolling.toggleMaximizeColumn gains a windowId argument in the same
534// step, (s) -> (ss). A method signature change breaks a mismatched peer
535// the same way a widened struct does, and it folds in here rather than
536// taking a bump of its own for the reason v5 states above: neither form
537// ever shipped, so no released peer spoke an intermediate version.
538//
539// The first form of the verb was screen-scoped, acting on the strip's
540// ACTIVE column, while the effect dispatches it from ONE window's
541// maximize request. Those are the same column only when the requesting window is
542// already focused. A client's own maximize request from a background
543// window, and a titlebar click that does not raise first, both cancelled
544// the clicked window's maximize and then resized a different column.
545// The window is now named on the wire so the engine can act on the
546// column holding it. An empty windowId keeps the old meaning (the active
547// column), which is the in-process spelling the keyboard shortcut uses.
548// v7: Scrolling.toggleMaximizeColumn gains a BOOLEAN RETURN, (ss) -> (ss)b.
549// A signature change, so it takes a bump like any other.
550//
551// It and its later twin toggleMaximizeToEdges report what they did, and
552// the twin needs to because its caller is holding compositor state that
553// only the answer can settle: the
554// effect leaves KWin's maximize bit where the user's click put it and
555// dispatches, so a request
556// nothing acts on leaves the window in the state the user asked for with
557// no batch coming to impose the strip's own. A void method still replies
558// success on a silent no-op, so nothing short of a return value can carry
559// that back.
560//
561// False means THE STRIP DID NOT CHANGE, from either kind of refusal:
562// refused at the boundary (no engine, empty screen id, the engine not
563// active on that screen, the per-context gate closed), or accepted and
564// acted on by nothing (no state for the context, an empty strip, a window
565// no column holds, a column the toggle refuses). The effect's response is
566// the same to both — put the bit back where the engine last had it — so
567// the two are deliberately not distinguished on the wire.
568//
569// The MEANING of that boolean tightened after it was first introduced,
570// from "the daemon accepted the request" to "the strip changed", and it
571// was rewritten in place rather than taking a bump of its own for the
572// reason v5 states above: no released peer ever spoke an intermediate
573// version, so the steps within this cycle are unobservable outside the
574// branch. A change to it AFTER v7 ships needs v8.
575//
576// NOT part of v7, though it is described here beside the verb it
577// changes. 3.4.3 shipped v7 with columnMaximized, and what follows first
578// shipped in 3.4.4, the release that carries v8, so the v8 handshake is
579// what separates the two forms. The TileRequestEntry field is RETARGETED
580// from columnMaximized to maximizedToEdges, same position after
581// windowedFullscreen, signature unchanged at a(siiiissbbbbssiiibsb).
582// The old flag was MEASURED (rendered extent vs work area) and mirrored
583// maximize-column; the new one is DECLARED per-column state (niri
584// maximize-window-to-edges: raw work area on both axes, gap-free),
585// driven by the new Scrolling.toggleMaximizeToEdges verb, (ss) -> b on
586// toggleMaximizeColumn's exact shape. The KWin maximize bit now mirrors
587// ONLY this state; toggleMaximizeColumn reverts to a pure width verb
588// with no wire representation (niri Mod+F), though it keeps its boolean
589// return, and the effect's maximize interception dispatches the new
590// verb instead. A peer mismatched on the retarget demarshals perfectly
591// and then mirrors the wrong state — the handshake, not the signature,
592// is what refuses that pairing. Both verbs answer the same boolean under
593// the same name on the wire, `changed`.
594//
595// v8: Scrolling gains stripContextChanged (sss), the strip-identity
596// announcement for the daemon/compositor seam
597// (docs/strip-identity-seam-plan.md).
598//
599// A NEW REQUIRED SIGNAL, which is the case the bump rule at the head of
600// this ledger names, and it takes a step of its own rather than folding
601// into v7 because v7 SHIPPED in 3.4.3 — the fold-in rule above applies
602// only within an unreleased cycle, and v7's own text says a change to it
603// after it ships needs v8.
604//
605// Required in the sense that matters here: the effect retires the
606// per-window strip state it holds for a screen when that screen's strip
607// identity changes, and a daemon that does not announce it leaves that
608// state describing a strip nobody is looking at. Nothing about the
609// pairing fails loudly — the signature still matches, no call errors,
610// no marshalling breaks — so a parked column simply paints at the
611// previous strip's position and keeps doing it. A silent wrong answer is
612// exactly what the handshake exists to refuse, and it is the reason a
613// signal-only addition is not treated as harmlessly additive here.
614//
615// v9: Scrolling gains leaveNativeFullscreenRequested (s), a screen-scoped
616// signal the daemon emits immediately BEFORE dispatching a keyboard strip
617// verb (the wheel path does the same on its own), telling the compositor
618// to release the OWN fullscreen of every scroll-tracked tile on that
619// screen so the strip and a window covering it could not drift apart.
620// Such a tile refuses every geometry commit through the effect's
621// fullscreen bail. v10 retires it.
622//
623// ANOTHER new REQUIRED signal, so it takes a step of its own for exactly
624// the reason v8 did: v8 shipped in 3.4.4, and the
625// fold-into-the-unreleased-cycle rule does not reach across a release.
626// Its failure mode is the silent kind as well. A daemon that emits it to
627// an effect with no such slot, or an effect waiting on a daemon that
628// never emits it, matches every other signature on the interface and
629// errors nowhere. The toggle's relayout is simply built against a window
630// the compositor is refusing to move, which is the bug this signal
631// exists to close.
632//
633// A SIGNAL rather than a field on the geometry batch, which is what the
634// gap note in the wheel path originally anticipated. The exit has to land
635// BEFORE the relayout, so the verb's batch is built against a window the
636// compositor will accept, and a batch field arrives carrying the very
637// geometry it was supposed to precede. Gating on the batch's own
638// strip-motion fields was measured wrong for a second reason: a batch
639// cannot tell a user verb from an insert-driven reflow, and it dropped
640// the fullscreen whenever an unrelated window merely opened and slid the
641// strip.
642//
643// Tiling managedScreensChanged ALSO gains a third argument in this same
644// step, screenDesktops (a{sv}) — the screenId to virtual-desktop map the
645// announced set was RESOLVED AGAINST. One bump, not two: both changes
646// land in the SAME unreleased cycle, which is the case the fold-in rule
647// at v5 spells out ("Do NOT split it back into one bump per change"), and
648// no released peer ever speaks an intermediate version.
649//
650// A CHANGED REQUIRED SIGNAL this time rather than a new one, on the
651// managed-set announcement the whole tiling seam is built on, and a
652// mismatched pairing fails as silently as the rest.
653//
654// The race: the announce is asynchronous while the compositor's own
655// desktopChanged is not, so it can arrive after the user has switched
656// again. The effect cannot detect that on its own — by then its
657// last-reported desktop already equals the live one, so a stale announce
658// is indistinguishable from a fresh one, and it would install a managed
659// set computed for one desktop while filtering windows by another. The
660// stamp makes the announce self-describing.
661//
662// v10: Scrolling gains setWindowFullscreenFloat (s s b -> b), the hold the
663// KWin effect sends when a strip tile enters or leaves its OWN
664// fullscreen, and LOSES leaveNativeFullscreenRequested. The effect used
665// to float such a tile through WindowTracking.setWindowFloatingForScreen,
666// which the daemon treats as a USER float: every F11 raised a "floated"
667// navigation OSD and restored free geometry over the fullscreen surface.
668// The new verb floats with the same slot memory but announces on the
669// engine's passive channel; its boolean answers whether the engine holds,
670// or has returned, this call's own float (a repeat hold answers true),
671// not whether the strip changed. With the tile out of the strip for the
672// whole hold, no strip verb finds a fullscreen tile to release, so the v9
673// signal had nothing left to do and is removed rather than kept as dead
674// wire. Both are REQUIRED changes with the silent
675// failure mode the ledger keeps refusing: an effect calling a method an
676// old daemon lacks gets a D-Bus error and leaves the tile in the strip,
677// and an old daemon emitting a signal the effect no longer connects
678// simply goes unheard.
679//
680// Also in v10, Tiling gains windowReannounced (s s i i): the same
681// placement as windowOpened for a window that did not just open (a
682// desktop-switch catch-scan, a cross-output re-add, an unminimize), so
683// "Focus new windows" can focus genuine opens only. windowOpened now
684// means a genuine open, and windowsOpenedBatch entries never take focus.
685//
686// Also in v10, WindowTracking gains reportOutputSettle
687// (a(ssssbiiiiiiiiiiibbbbssiiibiiii) -> a(sis)) and the parkDropped
688// (s s) signal: the effect reports the windows a screen-change settle
689// moved, with the state they had before their output went away, and the
690// daemon answers each with a verdict (re-seat a window KWin returned
691// untouched, float an evacuee in place, re-assert a placement KWin moved,
692// or treat the crossing as the user's move). parkDropped tells the effect
693// to forget its record of a window the daemon no longer keeps parked. An
694// old daemon answers the call with an error and the effect replays every
695// crossing as a move; an old effect never calls. WindowTracking also
696// gains seedScreenDesktop (s i): the desktop an output shows as it is
697// added, taken by the engines without a desktop switch. And
698// windowCrossedScreens (s s s): the effect's notice that KWin moved a
699// window across screens where a tiling engine runs, so the daemon drops
700// what it held of the window on the screen left. An old daemon answers
701// with an error, which the fire-and-forget call ignores.
702//
703// Also in v10, WindowTracking.applyGeometryRequested gains a trailing
704// purpose (siiiissb -> siiiissbi, PlacementPurpose): whether the
705// placement is a user verb on the window or a re-statement of one it
706// already has, which decides whether its maximize and fullscreen end. A
707// receiver whose slot takes the old eight arguments still gets the signal
708// (QtDBus delivers a longer signal to a shorter slot) and keeps the
709// user-verb behaviour it always had. WindowTracking also gains
710// fullscreenHandBackRequested (s): a user verb the daemon places no
711// geometry for (a float with nothing to restore, a move to a tiling
712// engine), on which the effect ends the window's own fullscreen. An old
713// effect never connects it, and the window stays fullscreen as before.
714//
715// Also in v10, Scrolling.scrollingScreensChanged gains isContextSwitch
716// (b) and leavingToAutotile (as) (as -> asbas): whether a desktop or
717// activity switch changed the set, and which screens left it for
718// autotile, so the effect re-announces windows only on an engine flip
719// inside the tiling union.
720//
721// Also in v10, WindowTracking gains activeWindowScreenChanged (s s): the
722// focused window moved to another screen without a new activation (a
723// KWin, user or daemon move), so the screen every window shortcut acts
724// on follows it. An old daemon answers with an error, which the
725// fire-and-forget call ignores, and its shortcuts keep acting on the
726// screen the window was last activated on.
727//
728// Also in v10, WindowTracking.getPreTileGeometries entries gain a
729// trailing windowId (a(siiiis) -> a(siiiiss)), the window whose record
730// each one is, so the effect seeds that window only, never a same-app
731// sibling (F627).
732//
733// Also in v10, WindowTracking gains the pendingRestoresChanged signal
734// (no arguments): getPendingRestoreGeometries may answer differently
735// after a layout assignment, a desktop or activity switch, a context
736// being disabled or an output change, so the effect fetches its
737// instant-restore cache again (F625). An old effect never connects it
738// and keeps the cache it fetched at daemon-ready.
739//
740// Also in v10, WindowTracking gains the parkReseated (s s) signal: the
741// daemon put a window back into its parked place on an output that
742// returned, sent just ahead of the parkDropped for the same window and
743// output when nothing else stays parked for it there. At an arrival
744// re-seat (the window's own announce on that output, which carries no
745// settle verdict) the effect gives the window's minimize-float back on
746// it, and reads the parkDropped that follows as a seat, keeping the
747// Monocle claim for the re-seat batch (F1147). An old daemon never
748// emits it: the effect gives nothing back at an arrival re-seat, and
749// the parkDropped that follows reads as a seat that put nothing back,
750// so the effect forgets the window's Monocle claim and minimize-float
751// for that output. A re-seat inside a settle is unaffected: its Readopt
752// verdict decides, and the effect ignores a parkReseated there. An old
753// effect never connects it and reads the parkDropped as it always did.
754//
755// After v10, WITHOUT a bump: Scrolling gains reportCommittedSize
756// (s i i i i), through which the effect reports the size a client
757// settled on when it differs from the rect the strip offered it,
758// so the engine can hold the column to it. v10 shipped in 3.5.0, so the
759// method cannot fold into it, and it takes no v11 because it is
760// ADDITIVE and neither mismatched pairing gives a wrong answer, which is
761// the failure the bump rule exists to refuse. A new effect on a daemon
762// from before the method (3.5.0 and 3.5.1; it is there from 3.5.2) gets
763// UnknownMethod, latches the method off once per daemon
764// session, and lays the strip out as before the method existed. An old
765// effect never calls it, with the same result. Both degrade to the
766// pre-method behaviour, a column that does not widen to its window, and
767// a bump would instead refuse the whole bridge over a missing nicety. A
768// later change that makes the method REQUIRED, or changes its arguments,
769// needs v11.
770//
771// Also after v10, WITHOUT a bump: reportCommittedSize widens in MEANING,
772// with the same (s i i i i) signature. The engine now reads an answer
773// longer ACROSS the strip, inside the work area, as a floor on the
774// tile's share of its stacked column (#1156), where it used to ignore
775// it. The effect now also reports a parked tile's settled commit when
776// it equals the offer along the strip, and the engine ends a peek
777// memory on that matched answer (#1154). Both pairings degrade safely.
778// A new effect on a daemon from before this change sends matched
779// answers the old engine reads as steady state and drops, and cross
780// answers it was already sending, so a straddle-only column keeps
781// parking and a tall stacked window keeps overlapping, as before. An
782// old effect on a new daemon never sends a matched answer, so the
783// memory ends only the old way, and the cross answers it already sends
784// start holding their tiles. Neither gives a wrong answer, so neither
785// needs v11.
786//
787// Also after v10, WITHOUT a bump: reportCommittedSize carries X11 clients'
788// answers too (#1157), with the same signature. The effect used to
789// record the strip's offer, and so report an answer to it, for Wayland
790// clients only, and an X11 window that widened itself past its column
791// was never reported. The engine never asked which kind of client
792// answered. A new effect on a daemon that has the method sends X11
793// answers the engine holds its columns to exactly as it holds a Wayland
794// one, which is the fix, and on a daemon without it the method is
795// latched off as above. An old effect on a new daemon never sends an
796// X11 answer, so an X11 window that outgrows its column keeps the next
797// column starting under it, as before. Neither gives a wrong answer.
798//
799// Also after v10, WITHOUT a bump: the methods through which the compositor
800// reports what it saw (window metadata and frames, opens and closes,
801// screen crossings and output settles, drags, committed sizes,
802// fullscreen holds, the work area and primary screen, Snap Assist
803// candidates, and the other reports the daemon's
804// DbusHelpers::admitCompositorReport gate covers) answer AccessDenied
805// to every bus caller but the one that registered the bridge, and
806// registerBridge answers a REJECTED session to a second peer while the
807// registered one is still on the bus (#1155). registerBridge also
808// answers REJECTED to any caller outside the compositor's own process
809// (the far end of the daemon's Wayland connection, or a direct child
810// of kwin_wayland_wrapper), so a bridge must run inside the compositor.
811// No signature changes. A compositor that waits for its registration
812// to answer before it reports sees no difference against either
813// daemon, and an old daemon admits every caller as it always did. The
814// change is for a client that reports before it has registered, or
815// without registering, or registers from another process: its
816// registration or its calls are refused, and a fire-and-forget report
817// is dropped with no answer the client sees. That is a client defect
818// the gate exists to expose, not a pairing the version can sort out, so
819// it takes no v11.
820// PhosphorCompositor::DaemonClient documents the ordering it needs.
821//
822// Also after v10, WITHOUT a bump: Screen gains setPixelSizeFromKWin
823// (s i i), through which the effect reports each output's exact size
824// in device pixels (its current mode, rotated) beside the work area it
825// already reports, and 0x0 when the output goes away. A Wayland client
826// cannot read an output's mode, so before this the daemon could only
827// estimate the size as the logical size times the scale, which misses
828// the mode by a pixel on a fractional scale. It is ADDITIVE, and it sits
829// behind the same compositor-report gate as its siblings. A new effect
830// on a daemon without the method gets UnknownMethod on a
831// fire-and-forget call and is otherwise unaffected. An old effect on a
832// new daemon never reports. The daemon's rules then read a size only
833// where one was seeded from an earlier session's report, and otherwise
834// leave the screen width, height and aspect ratio fields unknown: a
835// positive condition on them is false and a negated one is refused,
836// while orientation falls back to the logical geometry. Only
837// getScreenInfo keeps answering with the estimate. An unanswered
838// condition is no wrong answer the handshake must refuse, so it takes
839// no v11. getScreenInfo gains pixelSizeSource beside pixelSize in the
840// same change, which a reader that does not know the key never looks
841// at.
842//
843// v11: the dynamic-workspaces wire (per-monitor workspaces over KWin's
844// per-output virtual desktops). It bumps because none of it is
845// additive in the sense the after-v10 notes rely on: a v10 effect would
846// pass the handshake, never connect the moves and switches below, and
847// the daemon would commit engine and workspace state for compositor
848// actions that never happen. Windows would not move while the engines
849// re-homed them, a workspace verb would do nothing visible, and the
850// owner-wins correction would never land.
851//
852// Names. The service, object path, interfaces and error names moved
853// from org.plasmazones, /PlasmaZones, org.plasmazones.<Interface> and
854// org.plasmazones.Error.* to org.phosphor_works.Placement,
855// /org/phosphor_works/Placement, org.phosphor_works.Placement.<Interface>
856// and org.phosphor_works.Placement.Error.*, and the apps' own D-Bus
857// names to the Apps namespace's entries. A v10 peer therefore never reaches
858// the version check at all: it finds no service under the name it
859// knows, which a reader should not mistake for a handshake refusal.
860//
861// WindowTracking gains setScreenDesktopRequested (s s i): switch ONE
862// output's current desktop, named by its stable VirtualDesktop::id()
863// rather than a number a concurrent renumber can re-point, with a
864// ScreenDesktopSwitchPurpose (a user focus verb is shown like any user
865// switch, a daemon correction is not). The compositor answers each
866// request for an output it knows with EXACTLY ONE screenDesktopChanged
867// carrying the output's live desktop: the switch's own report when the
868// output switched, otherwise a forced one (an unknown desktop, a refusal
869// under global desktops, a correction deferred under Show Desktop, an
870// output already on that desktop). Never both, because the daemon counts
871// one answer per request.
872//
873// WindowTracking gains windowWorkspaceMoveRequested (s s i s): a
874// workspace move as ONE step carrying both legs, the destination
875// desktop (by id, or by its 1-based number when the id is empty) and
876// the destination output (empty keeps the window where it is). The
877// compositor judges the arrival's visibility and focus on the
878// destination output. An empty id with a number below 1 is the
879// output-only form, which joins the desktop the destination shows,
880// and does nothing when the output is unknown (an unknown output
881// otherwise drops only the output leg); an id or number naming no
882// desktop runs neither leg and the window is placed again where it is.
883// A window on all desktops takes neither leg of a move with a desktop
884// leg and is not placed again. Besides the workspace verbs, an engine's
885// crossing sends it when it has to carry the window to another output
886// itself. It replaces the pair of signals the branch first used (a
887// desktop move by id, and a separate output move), which made the
888// compositor judge the desktop move on the output the window was
889// leaving. Neither of those ever shipped.
890//
891// WindowTracking gains reportPerOutputDesktopsMode (b): the
892// compositor's actual per-output-virtual-desktops mode, the
893// authoritative arm of the feature gate.
894//
895// The dynamic-workspaces map stream the branch carried for a future
896// overview (a signal and its replay method) is removed before release:
897// nothing read it.
898
899inline constexpr int ApiVersion = 11;
900inline constexpr int MinPeerApiVersion = 11;
901
902// Scrolling.reportCommittedSize tolerance, in logical pixels, on each axis:
903// a size a client committed within this many pixels of the rect the strip
904// offered it COUNTS AS THE OFFER, the size the engine holds the column to.
905// For an ordinary tile it is not an answer and teaches the engine nothing. A
906// PARKED tile is the exception: its matched commit is reported whatever the
907// delta, because the client's answer to a park is what ends the engine's peek
908// memory (see the after-v10 note on reportCommittedSize). Fractional scaling,
909// and a server-side decoration with fractional borders, round the frame of a
910// client that took its tile exactly to a pixel either side of it, and reading
911// that pixel as an answer would plant (or give back) a one-pixel floor and
912// relayout the strip for it.
913//
914// Both ends of the wire apply it, and they must agree, which is why it lives
915// here. For a tile that is not parked the compositor reports only answers
916// beyond it, and the engine reads any answer within it as the offer. A wider
917// value on the compositor side would withhold answers the engine would act
918// on. A narrower one would send answers the engine discards as the offer.
919inline constexpr int CommittedSizeTolerancePx = 1;
920
921// Hard cap on blocking synchronous D-Bus calls to the daemon: the editor and
922// settings apps go through it (ClientHelpers' syncCall in this library, and
923// the settings app's own helper), and the phosphor-screens Resolver takes it
924// as its default. Qt's default is 25 seconds, long enough to freeze the UI
925// for tens of seconds if the daemon event loop is busy. Daemon-side
926// settings/shader handlers are all in-memory hash lookups (sub-millisecond
927// in the healthy case), so 500 ms is generous while still degrading
928// gracefully to caller-side defaults when the daemon is unresponsive.
929//
930// It is reused, with the same value, where the bound is on something else.
931// The daemon passes it to its own blocking calls to the bus daemon (the
932// sender lookups in OverlayAdaptor and CompositorBridgeAdaptor), and the KWin
933// effect's TilingHandler passes it as the reply timeout of asynchronous calls,
934// so a watcher on a daemon that never answers is released after it.
935inline constexpr int SyncCallTimeoutMs = 500;
936
937// Timeout for the compositor side's daemon-readiness probe (an Introspect call
938// fired against the org.phosphor_works.Placement service to detect "daemon up but the
939// daemonReady signal was emitted before the effect connected"). Two probes
940// use it: the KWin effect's inline one and the default of
941// PhosphorCompositor::DaemonClient::probeDaemonAvailable. 3 s gives
942// the daemon ample time to answer once its event loop is responsive while
943// still keeping the effect from hanging on a wedged daemon.
944inline constexpr int DaemonReadyProbeTimeoutMs = 3000;
945
946// Timeout for either of the kwin-effect's snap-assist thumbnail posts: the
947// dma-buf setWindowThumbnailDmabuf (the default transport) and its raw ARGB32
948// fallback setSnapAssistThumbnail. 2 s is "definitely something is wrong, drop the
949// watcher" rather than expected latency. Without it, the effect would
950// otherwise leak a watcher per snap-assist candidate per show until Qt's
951// default 25 s timeout expires, which under daemon stress turns a
952// transient hang into accumulated compositor-process state.
953inline constexpr int SnapAssistThumbnailPostTimeoutMs = 2000;
954
955// Shared entry budget for the snap-assist thumbnail caches. Only the sizing
956// INPUT is shared, and each consumer bounds something different with it. The
957// daemon's SnapAssistThumbnailProvider prices it at a 256² ARGB32 image to get
958// the BYTE bound of its cost-weighted QCache (CacheMaxBytes), so that cache
959// holds more entries when captures are small and fewer when they are large.
960// The daemon's DmabufTextureProvider uses it as the entry count of its
961// pending-descriptor QCache. The kwin-effect's SnapAssistThumbnailCapture
962// uses it as the entry count of the "skip recently-posted handle" dedup
963// window. Keeping the literal here (rather than unrelated
964// `static constexpr int`s in the daemon and the effect) means a tuning bump
965// moves every consumer on rebuild. It does NOT make their eviction agree: the
966// daemon can still evict ahead of the effect's window, which the comments on
967// SnapAssistThumbnailProvider::CacheCapacity and
968// SnapAssistThumbnailCapture::RecentPostedCapacity describe together with the
969// fallbacks that bound it.
970inline constexpr int SnapAssistThumbnailCacheCapacity = 24;
971
972// Shared per-axis ceiling for snap-assist thumbnails. The daemon rejects
973// anything larger at the service boundary (OverlayService, for both
974// transports and for direct C++ callers). At the D-Bus boundary
975// (OverlayAdaptor) the dma-buf method checks its dimensions against this
976// value, and the raw-pixel method refuses a payload over the byte size of an
977// image at this ceiling, a cap it derives from this constant before it
978// authenticates the sender. The kwin-effect clamps its capture box against
979// the same value so it can never produce a payload the daemon is guaranteed
980// to refuse — an oversize refusal never marks the handle as recently-posted,
981// which would otherwise re-capture on every show.
982inline constexpr int SnapAssistThumbnailMaxDimension = 1024;
983
984// How big the snap-assist card actually draws a thumbnail, in logical
985// pixels, as a function of the zone it sits in and how many candidates
986// share it. This is the C++ twin of the sizing bindings in
987// plasmazones/src/ui/SnapAssistContent.qml (candidateFlow.iconSize: cardScaleBase,
988// iconSizeRatio, minIconSize) and MUST be kept in step with them. The
989// effect captures at this size times the output scale rather than at a
990// fixed 256, so a burst of candidates ships small buffers and a lone
991// candidate in a big zone on a HiDPI output is not upscaled. Drift between
992// the two only costs sharpness or bytes, never correctness, and the
993// headroom factor absorbs the rounding.
994inline constexpr double SnapAssistCardScaleBase = 0.35;
995inline constexpr double SnapAssistIconSizeRatio = 0.6;
996inline constexpr int SnapAssistMinIconLogicalPx = 16; // Kirigami.Units.iconSizes.small
997inline constexpr double SnapAssistThumbnailHeadroom = 1.25;
998
999inline int snapAssistThumbnailBoxPx(int zoneMinAxisLogicalPx, int candidateCount, double outputScale)
1000{
1001 const double cardScale = SnapAssistCardScaleBase / std::max(1.0, std::sqrt(double(std::max(1, candidateCount))));
1002 const double iconLogical =
1003 std::max(double(SnapAssistMinIconLogicalPx),
1004 double(std::max(0, zoneMinAxisLogicalPx)) * cardScale * SnapAssistIconSizeRatio);
1005 const double devicePx = iconLogical * std::max(1.0, outputScale) * SnapAssistThumbnailHeadroom;
1006 // Clamped as a double, before the conversion: converting a double that is
1007 // outside int's range (a huge or infinite outputScale) is undefined, so the
1008 // clamp has to run while the value is still a double.
1009 const double boxPx =
1010 std::clamp(std::ceil(devicePx), double(SnapAssistMinIconLogicalPx), double(SnapAssistThumbnailMaxDimension));
1011 return int(boxPx);
1012}
1013
1014// The default-OFF rule for a boolean environment switch: set to any value
1015// other than "0" enables, "0" or unset disables. Value-checked rather than
1016// presence-checked so an explicit opt-out is honoured, and not parsed as an
1017// integer so the presence-style spellings the switches have always been
1018// documented with ("=1", "=true", "=yes") keep working. "=0" is the only
1019// opt-out; anything else set is an opt-in.
1020//
1021// Switches in this header pick one of two rules: this one, or the default-ON
1022// envSwitchEnabledByDefault below. The "=0" spelling disables under both, so
1023// a kill switch reads the same to a user whichever twin backs it.
1024inline bool envSwitchEnabled(const char* name)
1025{
1026 if (!qEnvironmentVariableIsSet(name)) {
1027 return false;
1028 }
1029 return qgetenv(name).trimmed() != "0";
1030}
1031
1032// The opt-out twin of envSwitchEnabled, for a switch that defaults to on:
1033// unset enables, and "0" is the only spelling that disables. Any other value
1034// is read as an explicit opt-in and left enabled, so the documented "=1" /
1035// "=true" spellings keep meaning what they say.
1036inline bool envSwitchEnabledByDefault(const char* name)
1037{
1038 if (!qEnvironmentVariableIsSet(name)) {
1039 return true;
1040 }
1041 return qgetenv(name).trimmed() != "0";
1042}
1043
1044// Single accessor for the zero-copy thumbnail gate. Read in places with
1045// different lifetimes (the effect's capture ctor, the daemon's D-Bus slot,
1046// the daemon's Vulkan device-extension wiring, and the effect's daemon-ready
1047// re-arm); routing every read through one helper keeps the spelling and the
1048// read discipline from drifting apart. The env var is process-constant, so
1049// callers may cache the result freely.
1050//
1051// Default-on: the dma-buf path is the normal transport, and
1052// PLASMAZONES_DMABUF_THUMBNAILS=0 is the kill switch for a driver or session
1053// where it misbehaves. The raw-pixel path stays in place as the automatic
1054// fallback for every case the gate cannot predict — a software or otherwise
1055// unsupported RHI backend in the daemon, a cross-GPU import the driver
1056// refuses, a missing EGL/Vulkan extension, or a format/modifier combination
1057// the importer rejects. Both processes read the same variable, and the two
1058// sides do NOT have to agree: the daemon refusing the import simply routes
1059// the effect back to pixels.
1061{
1062 return envSwitchEnabledByDefault("PLASMAZONES_DMABUF_THUMBNAILS");
1063}
1064
1065// Diagnostic switch for the snap-assist thumbnail pipeline. When set, both
1066// the kwin-effect capture side and the daemon receive side log one line per
1067// thumbnail with the fitted size, per-stage timings (render, readback,
1068// convert, D-Bus round-trip, cache insert, QML fetch) and byte counts, under
1069// the *.snapassist.trace logging categories. Read-only instrumentation: it
1070// changes nothing about what is captured or how. Shared here for the same
1071// reason as the dma-buf gate above, so both processes agree on the spelling,
1072// and it follows the same "=0 disables" rule.
1074{
1075 return envSwitchEnabled("PLASMAZONES_THUMBNAIL_TRACE");
1076}
1077
1078} // namespace PhosphorProtocol::Service
Definition ServiceConstants.h:383
constexpr QLatin1String ServiceName("org.phosphor_works.PlasmaZones.Editor")
constexpr QLatin1String Interface("org.phosphor_works.PlasmaZones.Editor")
constexpr QLatin1String ObjectPath("/org/phosphor_works/PlasmaZones/Editor")
Definition ServiceConstants.h:378
constexpr QLatin1String Interface("org.phosphor_works.Facet")
constexpr QLatin1String ObjectPath("/org/phosphor_works/Facet")
constexpr QLatin1String ServiceName("org.phosphor_works.Facet")
Single-instance app identities.
Definition ServiceConstants.h:377
Keys of the drop-proxy JSON a shell registers on org.phosphor_works.Placement.WindowDrag (registerDro...
Definition ServiceConstants.h:363
constexpr QLatin1String Cells("cells")
Array of cells, one per drawn zone, each {id, rect}.
constexpr QLatin1String Rect("rect")
The miniature's bounding rect on its screen.
constexpr QLatin1String Id("id")
A cell's target: the snapping zone id, braces included, as the layout interfaces spell it.
D-Bus error names returned via QDBusMessage::createErrorReply.
Definition ServiceConstants.h:101
constexpr QLatin1String Shutdown("org.phosphor_works.Placement.Error.Shutdown")
constexpr QLatin1String Busy("org.phosphor_works.Placement.Error.Busy")
Definition ServiceConstants.h:70
constexpr QLatin1String LayoutRegistry("org.phosphor_works.Placement.LayoutRegistry")
constexpr QLatin1String Autotile("org.phosphor_works.Placement.Autotile")
constexpr QLatin1String Shader("org.phosphor_works.Placement.Shader")
constexpr QLatin1String WindowDrag("org.phosphor_works.Placement.WindowDrag")
constexpr QLatin1String Tiling("org.phosphor_works.Placement.Tiling")
constexpr QLatin1String Control("org.phosphor_works.Placement.Control")
constexpr QLatin1String Scrolling("org.phosphor_works.Placement.Scrolling")
constexpr QLatin1String CompositorBridge("org.phosphor_works.Placement.CompositorBridge")
constexpr QLatin1String Snap("org.phosphor_works.Placement.Snap")
constexpr QLatin1String Settings("org.phosphor_works.Placement.Settings")
constexpr QLatin1String Screen("org.phosphor_works.Placement.Screen")
constexpr QLatin1String ZoneDetection("org.phosphor_works.Placement.ZoneDetection")
constexpr QLatin1String WindowTracking("org.phosphor_works.Placement.WindowTracking")
constexpr QLatin1String Overlay("org.phosphor_works.Placement.Overlay")
constexpr QLatin1String Rules("org.phosphor_works.Placement.Rules")
Keys of the scrolling BEHAVIOUR map that crosses the daemon → KWin effect boundary on org....
Definition ServiceConstants.h:242
constexpr QLatin1String FocusFollowsMouse("focusFollowsMouse")
constexpr QLatin1String CropStraddlers("cropStraddlers")
constexpr QLatin1String VerticalAxis("verticalAxis")
Keys of the scrolling tab-indicator maps that cross the daemon → KWin effect boundary on org....
Definition ServiceConstants.h:202
constexpr QLatin1String CornerRadius("cornerRadius")
constexpr QLatin1String FontStrikeout("fontStrikeout")
constexpr QLatin1String GapsBetweenTabs("gapsBetweenTabs")
constexpr QLatin1String FontUnderline("fontUnderline")
constexpr QLatin1String UrgentColor("urgentColor")
constexpr QLatin1String FontWeight("fontWeight")
constexpr QLatin1String InactiveColor("inactiveColor")
constexpr QLatin1String FontFamily("fontFamily")
constexpr QLatin1String FontItalic("fontItalic")
constexpr QLatin1String TabStyle("tabStyle")
constexpr QLatin1String ActiveColor("activeColor")
Property names exposed by the Settings interface's runtime D-Bus surface (distinct from the persisted...
Definition ServiceConstants.h:112
constexpr QLatin1String OuterGapLeft("outerGapLeft")
constexpr QLatin1String OuterGapBottom("outerGapBottom")
constexpr QLatin1String AnimationShaderSearchPaths("animationShaderSearchPaths")
constexpr QLatin1String OuterGap("outerGap")
constexpr QLatin1String OuterGapTop("outerGapTop")
constexpr QLatin1String DecorationProfileTree("decorationProfileTree")
constexpr QLatin1String UsePerSideOuterGap("usePerSideOuterGap")
constexpr QLatin1String ShaderProfileTree("shaderProfileTree")
constexpr QLatin1String DecorationBlurScaleMultiplier("decorationBlurScaleMultiplier")
The user's decoration blur-quality tier.
constexpr QLatin1String MotionProfileTree("motionProfileTree")
constexpr QLatin1String InnerGap("innerGap")
constexpr QLatin1String OuterGapRight("outerGapRight")
constexpr QLatin1String OverlayShaderTree("overlayShaderTree")
Keys of the STRIP MODEL payload, org.phosphor_works.Placement.Scrolling.stripModelJson: the whole str...
Definition ServiceConstants.h:314
constexpr QLatin1String StripPosPx("stripPosPx")
A column's leading edge in strip coordinates.
constexpr QLatin1String Minimized("minimized")
Whether the tile is minimized (kept in the stack order, laid out nowhere).
constexpr QLatin1String WindowId("windowId")
A tile's window id.
constexpr QLatin1String ActiveTile("activeTile")
Index into the column's tiles of its active tile.
constexpr QLatin1String StripExtentPx("stripExtentPx")
The strip's total extent: every non-minimized column plus the gaps.
constexpr QLatin1String Index("index")
A column's strip index, which is also what focusColumnAt takes.
constexpr QLatin1String Display("display")
A column's display as a PhosphorScrollEngine::ColumnDisplay underlying value (0 Normal,...
constexpr QLatin1String ViewOffsetPx("viewOffsetPx")
The viewport's leading edge in strip coordinates.
constexpr QLatin1String Maximized("maximized")
The column's declared maximize-to-edges state.
constexpr QLatin1String ViewportPx("viewportPx")
The viewport's extent along the strip (the work area's main extent).
constexpr QLatin1String ActiveColumn("activeColumn")
Strip index of the active column, -1 on an empty strip.
constexpr QLatin1String Columns("columns")
The column array, in strip order.
constexpr QLatin1String Axis("axis")
0 for a horizontal strip, 1 for a vertical one.
constexpr QLatin1String Tiles("tiles")
The column's tile array, in stack order, minimized tiles included.
constexpr QLatin1String ExtentPx("extentPx")
A column's extent along the strip; 0 for a fully minimized column.
constexpr QLatin1String CrossPx("crossPx")
A tile's resolved extent across the strip; 0 for a minimized tile.
Tab keys on the STRIP PREVIEW payload — the per-tile description of the tab indicator its column draw...
Definition ServiceConstants.h:281
constexpr QLatin1String ActiveTab("activeTab")
The tile's own 0-based tab within that count.
constexpr QLatin1String TabCount("tabCount")
How many tabs the tile's column shows, and absent or 0 when it draws no indicator — the single "no in...
constexpr QLatin1String TabPosition("tabPosition")
Which edge the indicator runs along, as a PhosphorScrollEngine:: TabIndicatorPosition underlying valu...
constexpr QLatin1String TabLength("tabLength")
How much of that edge the indicator covers, 0.0 to 1.0, centered on it.
Keys for the extended-window-property QVariantMap (the trailing a{sv} argument of setWindowMetadata).
Definition ServiceConstants.h:153
constexpr QLatin1String IsResizable("isResizable")
constexpr QLatin1String IsMaximized("isMaximized")
constexpr QLatin1String CaptionNormal("captionNormal")
constexpr QLatin1String PositionY("positionY")
constexpr QLatin1String HasDecoration("hasDecoration")
constexpr QLatin1String KeepAbove("keepAbove")
constexpr QLatin1String Height("height")
constexpr QLatin1String IsMaximizable("isMaximizable")
constexpr QLatin1String Width("width")
constexpr QLatin1String IsTransient("isTransient")
constexpr QLatin1String IsAxisMaximized("isAxisMaximized")
constexpr QLatin1String IsModal("isModal")
constexpr QLatin1String Activities("activities")
Full activity UUID list for a window on SEVERAL (but not all) activities.
constexpr QLatin1String IsFullscreen("isFullscreen")
constexpr QLatin1String IsSticky("isSticky")
constexpr QLatin1String IsNotification("isNotification")
constexpr QLatin1String VirtualDesktops("virtualDesktops")
Full 1-based desktop-number list for a window on SEVERAL (but not all) virtual desktops.
constexpr QLatin1String KeepBelow("keepBelow")
constexpr QLatin1String IsMinimized("isMinimized")
constexpr QLatin1String IsDemandingAttention("isDemandingAttention")
Urgency (KWin's demandsAttention).
constexpr QLatin1String PositionX("positionX")
constexpr QLatin1String SkipPager("skipPager")
constexpr QLatin1String SkipTaskbar("skipTaskbar")
constexpr QLatin1String SkipSwitcher("skipSwitcher")
constexpr QLatin1String IsMovable("isMovable")
constexpr QLatin1String IsFocused("isFocused")
Definition ServiceConstants.h:12
constexpr int CommittedSizeTolerancePx
Definition ServiceConstants.h:919
constexpr QLatin1String ObjectPath("/org/phosphor_works/Placement")
constexpr int MinPeerApiVersion
Definition ServiceConstants.h:900
constexpr int SyncCallTimeoutMs
Definition ServiceConstants.h:935
constexpr int SnapAssistThumbnailCacheCapacity
Definition ServiceConstants.h:970
constexpr double SnapAssistIconSizeRatio
Definition ServiceConstants.h:995
constexpr int QuickLayoutSlotCount
Quick-layout slots are numbered 1..QuickLayoutSlotCount.
Definition ServiceConstants.h:60
constexpr int ApiVersion
Definition ServiceConstants.h:899
constexpr int SnapAssistThumbnailMaxDimension
Definition ServiceConstants.h:982
constexpr double SnapAssistCardScaleBase
Definition ServiceConstants.h:994
constexpr int SnapAssistMinIconLogicalPx
Definition ServiceConstants.h:996
constexpr double SnapAssistThumbnailHeadroom
Definition ServiceConstants.h:997
constexpr QLatin1String Name("org.phosphor_works.Placement")
The placement service's D-Bus identity.
int snapAssistThumbnailBoxPx(int zoneMinAxisLogicalPx, int candidateCount, double outputScale)
Definition ServiceConstants.h:999
bool envSwitchEnabledByDefault(const char *name)
Definition ServiceConstants.h:1036
constexpr int MaxRunningWindowsPayloadBytes
The largest running-windows payload (Settings.provideRunningWindows) the daemon relays,...
Definition ServiceConstants.h:68
bool snapAssistThumbnailTraceEnabled()
Definition ServiceConstants.h:1073
bool snapAssistDmabufThumbnailsEnabled()
Definition ServiceConstants.h:1060
bool envSwitchEnabled(const char *name)
Definition ServiceConstants.h:1024
constexpr int SnapAssistThumbnailPostTimeoutMs
Definition ServiceConstants.h:953
constexpr int DaemonReadyProbeTimeoutMs
Definition ServiceConstants.h:944
constexpr QLatin1String HostApi("placement")
Not a D-Bus name.