summaryrefslogtreecommitdiff
path: root/src/protocols/core/Compositor.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocols/core/Compositor.hpp')
-rw-r--r--src/protocols/core/Compositor.hpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/protocols/core/Compositor.hpp b/src/protocols/core/Compositor.hpp
index 0eff3f08..dc61917d 100644
--- a/src/protocols/core/Compositor.hpp
+++ b/src/protocols/core/Compositor.hpp
@@ -35,13 +35,21 @@ class CContentType;
class CWLCallbackResource {
public:
- CWLCallbackResource(UP<CWlCallback>&& resource_);
+ CWLCallbackResource(SP<CWlCallback>&& resource_);
+ ~CWLCallbackResource() noexcept = default;
+ // disable copy
+ CWLCallbackResource(const CWLCallbackResource&) = delete;
+ CWLCallbackResource& operator=(const CWLCallbackResource&) = delete;
- bool good();
- void send(const Time::steady_tp& now);
+ // allow move
+ CWLCallbackResource(CWLCallbackResource&&) noexcept = default;
+ CWLCallbackResource& operator=(CWLCallbackResource&&) noexcept = default;
+
+ bool good();
+ void send(const Time::steady_tp& now);
private:
- UP<CWlCallback> m_resource;
+ SP<CWlCallback> m_resource;
};
class CWLRegionResource {
@@ -94,8 +102,8 @@ class CWLSurfaceResource {
SSurfaceState m_current;
SSurfaceState m_pending;
std::queue<UP<SSurfaceState>> m_pendingStates;
+ bool m_pendingWaiting = false;
- std::vector<UP<CWLCallbackResource>> m_callbacks;
WP<CWLSurfaceResource> m_self;
WP<CWLSurface> m_hlSurface;
std::vector<PHLMONITORREF> m_enteredOutputs;
@@ -110,6 +118,7 @@ class CWLSurfaceResource {
SP<CWLSurfaceResource> findFirstPreorder(std::function<bool(SP<CWLSurfaceResource>)> fn);
SP<CWLSurfaceResource> findWithCM();
void presentFeedback(const Time::steady_tp& when, PHLMONITOR pMonitor, bool discarded = false);
+ void scheduleState(WP<SSurfaceState> state);
void commitState(SSurfaceState& state);
NColorManagement::SImageDescription getPreferredImageDescription();
void sortSubsurfaces();