Changeset View
Changeset View
Standalone View
Standalone View
src/server/surface_interface_p.h
Show All 26 Lines | |||||
27 | // Wayland | 27 | // Wayland | ||
28 | #include <wayland-server.h> | 28 | #include <wayland-server.h> | ||
29 | 29 | | |||
30 | namespace KWayland | 30 | namespace KWayland | ||
31 | { | 31 | { | ||
32 | namespace Server | 32 | namespace Server | ||
33 | { | 33 | { | ||
34 | 34 | | |||
35 | class IdleInhibitorInterface; | ||||
36 | | ||||
35 | class SurfaceInterface::Private : public Resource::Private | 37 | class SurfaceInterface::Private : public Resource::Private | ||
36 | { | 38 | { | ||
37 | public: | 39 | public: | ||
38 | struct State { | 40 | struct State { | ||
39 | QRegion damage = QRegion(); | 41 | QRegion damage = QRegion(); | ||
40 | QRegion opaque = QRegion(); | 42 | QRegion opaque = QRegion(); | ||
41 | QRegion input = QRegion(); | 43 | QRegion input = QRegion(); | ||
42 | bool inputIsSet = false; | 44 | bool inputIsSet = false; | ||
Show All 29 Lines | |||||
72 | bool raiseChild(QPointer<SubSurfaceInterface> subsurface, SurfaceInterface *sibling); | 74 | bool raiseChild(QPointer<SubSurfaceInterface> subsurface, SurfaceInterface *sibling); | ||
73 | bool lowerChild(QPointer<SubSurfaceInterface> subsurface, SurfaceInterface *sibling); | 75 | bool lowerChild(QPointer<SubSurfaceInterface> subsurface, SurfaceInterface *sibling); | ||
74 | void setShadow(const QPointer<ShadowInterface> &shadow); | 76 | void setShadow(const QPointer<ShadowInterface> &shadow); | ||
75 | void setBlur(const QPointer<BlurInterface> &blur); | 77 | void setBlur(const QPointer<BlurInterface> &blur); | ||
76 | void setContrast(const QPointer<ContrastInterface> &contrast); | 78 | void setContrast(const QPointer<ContrastInterface> &contrast); | ||
77 | void setSlide(const QPointer<SlideInterface> &slide); | 79 | void setSlide(const QPointer<SlideInterface> &slide); | ||
78 | void installPointerConstraint(LockedPointerInterface *lock); | 80 | void installPointerConstraint(LockedPointerInterface *lock); | ||
79 | void installPointerConstraint(ConfinedPointerInterface *confinement); | 81 | void installPointerConstraint(ConfinedPointerInterface *confinement); | ||
82 | void installIdleInhibitor(IdleInhibitorInterface *inhibitor); | ||||
80 | 83 | | |||
81 | void commitSubSurface(); | 84 | void commitSubSurface(); | ||
82 | void commit(); | 85 | void commit(); | ||
83 | 86 | | |||
84 | State current; | 87 | State current; | ||
85 | State pending; | 88 | State pending; | ||
86 | State subSurfacePending; | 89 | State subSurfacePending; | ||
87 | QPointer<SubSurfaceInterface> subSurface; | 90 | QPointer<SubSurfaceInterface> subSurface; | ||
88 | QRegion trackedDamage; | 91 | QRegion trackedDamage; | ||
89 | 92 | | |||
90 | // workaround for https://bugreports.qt.io/browse/QTBUG-52192 | 93 | // workaround for https://bugreports.qt.io/browse/QTBUG-52192 | ||
91 | // A subsurface needs to be considered mapped even if it doesn't have a buffer attached | 94 | // A subsurface needs to be considered mapped even if it doesn't have a buffer attached | ||
92 | // Otherwise Qt's sub-surfaces will never be visible and the client will freeze due to | 95 | // Otherwise Qt's sub-surfaces will never be visible and the client will freeze due to | ||
93 | // waiting on the frame callback of the never visible surface | 96 | // waiting on the frame callback of the never visible surface | ||
94 | bool subSurfaceIsMapped = true; | 97 | bool subSurfaceIsMapped = true; | ||
95 | 98 | | |||
96 | QVector<OutputInterface *> outputs; | 99 | QVector<OutputInterface *> outputs; | ||
97 | 100 | | |||
98 | QPointer<LockedPointerInterface> lockedPointer; | 101 | QPointer<LockedPointerInterface> lockedPointer; | ||
99 | QPointer<ConfinedPointerInterface> confinedPointer; | 102 | QPointer<ConfinedPointerInterface> confinedPointer; | ||
100 | QHash<OutputInterface*, QMetaObject::Connection> outputDestroyedConnections; | 103 | QHash<OutputInterface*, QMetaObject::Connection> outputDestroyedConnections; | ||
104 | QVector<IdleInhibitorInterface*> idleInhibitors; | ||||
101 | 105 | | |||
102 | private: | 106 | private: | ||
103 | QMetaObject::Connection constrainsOneShotConnection; | 107 | QMetaObject::Connection constrainsOneShotConnection; | ||
104 | QMetaObject::Connection constrainsUnboundConnection; | 108 | QMetaObject::Connection constrainsUnboundConnection; | ||
105 | 109 | | |||
106 | SurfaceInterface *q_func() { | 110 | SurfaceInterface *q_func() { | ||
107 | return reinterpret_cast<SurfaceInterface *>(q); | 111 | return reinterpret_cast<SurfaceInterface *>(q); | ||
108 | } | 112 | } | ||
Show All 29 Lines |