Changeset View
Changeset View
Standalone View
Standalone View
composite.h
Show All 17 Lines | |||||
18 | You should have received a copy of the GNU General Public License | 18 | You should have received a copy of the GNU General Public License | ||
19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
20 | *********************************************************************/ | 20 | *********************************************************************/ | ||
21 | 21 | | |||
22 | #ifndef KWIN_COMPOSITE_H | 22 | #ifndef KWIN_COMPOSITE_H | ||
23 | #define KWIN_COMPOSITE_H | 23 | #define KWIN_COMPOSITE_H | ||
24 | // KWin | 24 | // KWin | ||
25 | #include <kwinglobals.h> | 25 | #include <kwinglobals.h> | ||
26 | // KDE | | |||
27 | #include <KSelectionOwner> | | |||
28 | // Qt | 26 | // Qt | ||
29 | #include <QObject> | 27 | #include <QObject> | ||
30 | #include <QElapsedTimer> | 28 | #include <QElapsedTimer> | ||
31 | #include <QTimer> | 29 | #include <QTimer> | ||
32 | #include <QBasicTimer> | 30 | #include <QBasicTimer> | ||
33 | #include <QRegion> | 31 | #include <QRegion> | ||
34 | 32 | | |||
35 | namespace KWin { | 33 | namespace KWin { | ||
36 | 34 | | |||
37 | class Client; | 35 | class Client; | ||
36 | class CompositorSelectionOwner; | ||||
38 | class Scene; | 37 | class Scene; | ||
39 | 38 | | |||
40 | class CompositorSelectionOwner : public KSelectionOwner | | |||
41 | { | | |||
42 | Q_OBJECT | | |||
43 | public: | | |||
44 | CompositorSelectionOwner(const char *selection); | | |||
45 | private: | | |||
46 | friend class Compositor; | | |||
47 | bool owning; | | |||
48 | private Q_SLOTS: | | |||
49 | void looseOwnership(); | | |||
50 | }; | | |||
51 | | ||||
52 | class KWIN_EXPORT Compositor : public QObject { | 39 | class KWIN_EXPORT Compositor : public QObject { | ||
53 | Q_OBJECT | 40 | Q_OBJECT | ||
54 | public: | 41 | public: | ||
55 | enum SuspendReason { NoReasonSuspend = 0, UserSuspend = 1<<0, BlockRuleSuspend = 1<<1, ScriptSuspend = 1<<2, AllReasonSuspend = 0xff }; | 42 | enum SuspendReason { NoReasonSuspend = 0, UserSuspend = 1<<0, BlockRuleSuspend = 1<<1, ScriptSuspend = 1<<2, AllReasonSuspend = 0xff }; | ||
56 | Q_DECLARE_FLAGS(SuspendReasons, SuspendReason) | 43 | Q_DECLARE_FLAGS(SuspendReasons, SuspendReason) | ||
57 | ~Compositor(); | 44 | ~Compositor(); | ||
58 | // when adding repaints caused by a window, you probably want to use | 45 | // when adding repaints caused by a window, you probably want to use | ||
59 | // either Toplevel::addRepaint() or Toplevel::addWorkspaceRepaint() | 46 | // either Toplevel::addRepaint() or Toplevel::addWorkspaceRepaint() | ||
▲ Show 20 Lines • Show All 151 Lines • ▼ Show 20 Line(s) | 190 | private: | |||
211 | void setupX11Support(); | 198 | void setupX11Support(); | ||
212 | 199 | | |||
213 | /** | 200 | /** | ||
214 | * Whether the Compositor is currently suspended, 8 bits encoding the reason | 201 | * Whether the Compositor is currently suspended, 8 bits encoding the reason | ||
215 | **/ | 202 | **/ | ||
216 | SuspendReasons m_suspended; | 203 | SuspendReasons m_suspended; | ||
217 | 204 | | |||
218 | QBasicTimer compositeTimer; | 205 | QBasicTimer compositeTimer; | ||
219 | CompositorSelectionOwner* cm_selection; | 206 | CompositorSelectionOwner *m_selectionOwner; | ||
220 | QTimer m_releaseSelectionTimer; | 207 | QTimer m_releaseSelectionTimer; | ||
221 | QList<xcb_atom_t> m_unusedSupportProperties; | 208 | QList<xcb_atom_t> m_unusedSupportProperties; | ||
222 | QTimer m_unusedSupportPropertyTimer; | 209 | QTimer m_unusedSupportPropertyTimer; | ||
223 | qint64 vBlankInterval, fpsInterval; | 210 | qint64 vBlankInterval, fpsInterval; | ||
224 | int m_xrrRefreshRate; | 211 | int m_xrrRefreshRate; | ||
225 | QRegion repaints_region; | 212 | QRegion repaints_region; | ||
226 | 213 | | |||
227 | QTimer compositeResetTimer; // for compressing composite resets | 214 | QTimer compositeResetTimer; // for compressing composite resets | ||
Show All 14 Lines |