9#include "phosphorworkspaces_export.h"
320 void onSourceCountChanged(
int count);
321 void onSourceCurrentChanged(const QString& desktopId);
322 void onSourceDesktopCreatedUnreadable(const QString& desktopId);
323 void onSourceDesktopRemoved(const QString& desktopId);
324 void onSourceRowsChanged(
int rows);
325 void refreshFromSource();
331 void subscribeToSource();
332 void unsubscribeFromSource();
337 void clampScreenDesktopsToCount();
341 QString takeReportedScreenId(const QString& screenId);
343 void noteDesktopListChanging();
346 void retryOrAbandonRefresh();
349 bool liveListMatches(
int count) const;
351 void commitLiveList();
355 QList<QMetaObject::Connection> m_sourceConnections;
356 bool m_running = false;
359 bool m_subscribed = false;
361 bool m_available = false;
362 int m_currentDesktop = 1;
366 QHash<QString,
int> m_screenDesktops;
369 QHash<QString, QString> m_renamedScreenIds;
370 int m_desktopCount = 1;
371 int m_desktopRows = 1;
372 QStringList m_desktopNames;
373 QStringList m_desktopIds;
374 uint m_refreshGeneration = 0;
376 QStringList m_baselineDesktopIds;
379 bool m_desktopListChangePending = false;
382 QStringList m_rawDesktopNames;
386 QStringList m_liveIds;
388 QHash<QString, QString> m_liveRawNames;
391 QString m_pendingCurrentId;
395 bool m_refreshInFlight = false;
397 int m_refreshRetries = 0;
Definition IVirtualDesktopManager.h:13
Where a VirtualDesktopManager's desktops come from: the transport to the compositor that owns them.
Definition IVirtualDesktopBackend.h:43
void removeScreenDesktop(const QString &screenId)
Drop a screen's recorded per-output desktop when the output is removed, so the map doesn't retain sta...
void screenDesktopSeeded(const QString &screenId, int desktop)
A screen's desktop was recorded as the output (re)connected (seedScreenDesktop).
void desktopsChanged()
The desktop LIST changed — a desktop was added, removed, reordered, or renamed.
void renameScreen(const QString &oldId, const QString &newId)
Carry a recorded per-output desktop across a screen-id rename.
void createDesktopAnswered(uint position, const QString &name, PhosphorWorkspaces::VirtualDesktopManager::CallAnswer answer)
KWin answered the createDesktop call made with these arguments, after any kwinDesktopCreated it cause...
void removeDesktopAnswered(const QString &desktopId, PhosphorWorkspaces::VirtualDesktopManager::CallAnswer answer)
KWin answered the removeDesktop call for desktopId, after any kwinDesktopRemoved it caused (CallAnswe...
void desktopRemovedAt(int removedPosition)
Exactly one desktop was removed, and this is the 1-based POSITION it held before it went.
void currentDesktopChanged(int desktop)
bool isAvailable() const
True once init() reached the backend's desktops (for KWin's, once KWin's VirtualDesktopManager interf...
void screenDesktopChanged(const QString &screenId, int desktop)
A single screen's current virtual desktop changed (per-output virtual desktops).
QStringList desktopIds() const
KWin's desktop UUIDs, in position order and index-aligned with desktopNames().
bool commitDesktopList(QList< DesktopEntry > desktops, const QString ¤tId, int rows)
Commit one whole desktop list: the core behind both of the backend's reads and the list built from it...
QStringList desktopNames() const
void createDesktop(uint position, const QString &name)
Ask KWin to create a desktop at the given 0-based global position (KWin's D-Bus signature; the caller...
void ingestDesktopCreated(const QString &desktopId, int position, const QString &name)
The backend's desktopCreated and desktopDataChanged.
VirtualDesktopManager(QObject *parent=nullptr)
No backend: unavailable, a single synthetic desktop.
void desktopListChangeSettled()
The change desktopListChanging announced has committed, or was given up on after the list could not b...
int currentDesktop() const override
The global (active-screen) current virtual desktop, 1-based.
QStringList rawDesktopNames() const
KWin's names EXACTLY as KWin reports them, aligned 1:1 with desktopIds().
CallAnswer
How the compositor answered one of the desktop methods (createDesktopAnswered, removeDesktopAnswered)...
Definition VirtualDesktopManager.h:36
void desktopCountChanged(int count)
The committed count changed.
void updateScreenDesktop(const QString &screenId, int desktop)
Record a screen's current virtual desktop (1-based).
void setCurrentDesktopById(const QString &desktopId)
Switch by KWin's desktop UUID rather than by position.
void setBaselineDesktopIds(const QStringList &desktopIds)
The desktop ids a previous session saw, in position order, so a change KWin made while nothing was li...
void desktopRenamed(const QString &desktopId, const QString &name)
A desktop present before and after a commit carries a different raw KWin name (rawDesktopNames).
bool perScreenModeActive() const override
Superseded, kept for the installed API (IVirtualDesktopManager): no production code calls it,...
int currentDesktopForScreen(const QString &screenId) const override
The current virtual desktop for a specific screen, 1-based.
QString desktopIdAt(int desktop) const
UUID at 1-based global index, or empty when out of range.
void setDesktopName(const QString &desktopId, const QString &name)
Ask KWin to rename the desktop with the given UUID string.
QString liveScreenIdFor(const QString &screenId) const
The id a per-output report naming screenId is recorded under: the new id while screenId is an aliased...
void setCurrentDesktop(int desktop)
Ask KWin to switch to the desktop at this 1-based position.
void kwinDesktopCreated(const QString &desktopId)
A KWin desktopCreated arrived carrying this UUID.
int desktopIndexOf(const QString &desktopId) const
1-based global index of the UUID, or 0 when unknown.
void kwinDesktopRemoved(const QString &desktopId)
A KWin desktopRemoved arrived carrying this UUID (same timing contract).
PhosphorWorkspaces::DesktopEntry DesktopEntry
Definition VirtualDesktopManager.h:305
void removeDesktop(const QString &desktopId)
Ask KWin to remove the desktop with the given UUID string.
void ingestDesktopDataChanged(const QString &desktopId, int position, const QString &name)
void desktopsRenumbered(const PhosphorEngine::DesktopRemap &remap)
The desktop positions moved: a removal, an insert, a reorder, or any mix of them, as one old-to-new m...
void seedScreenDesktop(const QString &screenId, int desktop)
Record the desktop an output shows as it is connected or comes back.
int desktopRows() const
Number of rows in KWin's virtual-desktop grid (>= 1).
void desktopListChanging()
KWin started a change that can move desktop positions (a create, a remove, a move),...
void desktopListChanged(const QStringList &desktopIds)
The ordered global id list settled (create, remove, reorder).
bool hasScreenDesktopReport(const QString &screenId) const
True when a per-output report exists for screenId (or, for a virtual screen id, for its parent output...
void refresh()
Re-read the whole desktop list from the backend, for a consumer that knows its picture went stale (th...
Definition DesktopRemap.h:12
Definition WindowTrackingService.h:46