Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
ISnapSettings.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
7#include <QObject>
8#include <QStringList>
9
10namespace PhosphorEngine {
11
13{
14public:
15 virtual ~ISnapSettings() = default;
16
17 // Global snapping master toggle. When false the user has turned snapping
18 // off entirely: no window may be auto-snapped on open via any path (app
19 // rule, session restore, empty-zone auto-assign, last-used-zone).
20 // SnapEngine::resolveWindowRestore gates on this so the engine-internal
21 // auto-snap path and the daemon-side D-Bus gate (SnapAdaptor::applySnapResult)
22 // stay in lockstep.
23 virtual bool snappingEnabled() const = 0;
24
25 virtual QStringList excludedApplications() const = 0;
26 virtual QStringList excludedWindowClasses() const = 0;
28 virtual bool moveNewWindowsToLastZone() const = 0;
29 virtual bool restoreWindowsToZonesOnLogin() const = 0;
30
31 // Force-on master toggle: when true, every layout reaching the snap-to-
32 // empty-zone path auto-assigns new windows to its first empty zone
33 // regardless of its individual `autoAssign` flag. Effective behavior is
34 // `globalAutoAssign OR layout->autoAssign()`. Autotile screens never
35 // reach this path — they're short-circuited upstream in
36 // SnapEngine::windowOpened (see lifecycle.cpp), so this flag is in
37 // practice a manual-layout-only override. Default false preserves the
38 // pre-#370 per-layout-only semantics.
39 virtual bool autoAssignAllLayouts() const = 0;
40};
41
42} // namespace PhosphorEngine
43
44Q_DECLARE_INTERFACE(PhosphorEngine::ISnapSettings, "org.plasmazones.ISnapSettings")
Definition ISnapSettings.h:13
virtual QStringList excludedApplications() const =0
virtual bool restoreWindowsToZonesOnLogin() const =0
virtual bool autoAssignAllLayouts() const =0
virtual bool moveNewWindowsToLastZone() const =0
virtual QStringList excludedWindowClasses() const =0
virtual ~ISnapSettings()=default
virtual bool snappingEnabled() const =0
virtual StickyWindowHandling stickyWindowHandling() const =0
Definition EngineTypes.h:13
StickyWindowHandling
Definition EngineTypes.h:102