Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
monitor_restore.h File Reference

Verified physical-output restoration, independent of the compositor transport. More...

#include <algorithm>
#include <map>
#include <optional>
#include <string>
#include <vector>
Include dependency graph for monitor_restore.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  VDISPLAY::kscreen_output_t
 One output as kscreen-doctor -j reports it. More...

Typedefs

using VDISPLAY::monitor_restore::targets_t = std::map<std::string, int>
using VDISPLAY::monitor_restore::snapshot_t = std::optional<std::vector<kscreen_output_t>>

Functions

template<class Query, class Apply>
bool VDISPLAY::monitor_restore::restore (const targets_t &saved, Query query, Apply apply)

Detailed Description

Verified physical-output restoration, independent of the compositor transport.

Definition in file monitor_restore.h.

Typedef Documentation

◆ snapshot_t

using VDISPLAY::monitor_restore::snapshot_t = std::optional<std::vector<kscreen_output_t>>

Definition at line 28 of file monitor_restore.h.

◆ targets_t

using VDISPLAY::monitor_restore::targets_t = std::map<std::string, int>

Definition at line 27 of file monitor_restore.h.

Function Documentation

◆ restore()

template<class Query, class Apply>
bool VDISPLAY::monitor_restore::restore ( const targets_t & saved,
Query query,
Apply apply )

Restore only saved connectors still physically present. A successful command is not confirmation: read the compositor back before releasing the virtual output. Conversely, a timed-out command may have applied its transaction; a confirmed live layout is sufficient in that case too. A missing snapshot is an error, never an empty/headless desktop.

Definition at line 38 of file monitor_restore.h.