Merge lp:~mc-return/compiz/compiz.merge-src-header-files-cleanup into lp:compiz/0.9.10
- compiz.merge-src-header-files-cleanup
- Merge into 0.9.10
Proposed by
MC Return
Status: | Work in progress |
---|---|
Proposed branch: | lp:~mc-return/compiz/compiz.merge-src-header-files-cleanup |
Merge into: | lp:compiz/0.9.10 |
Diff against target: |
980 lines (+311/-234) 9 files modified
src/asyncserverwindow.h (+4/-0) src/configurerequestbuffer-impl.h (+7/-3) src/eventmanagement.h (+0/-2) src/privateaction.h (+7/-6) src/privateeventsource.h (+3/-3) src/privateiosource.h (+11/-8) src/privatematch.h (+17/-6) src/privateoption.h (+10/-6) src/privatescreen.h (+252/-200) |
To merge this branch: | bzr merge lp:~mc-return/compiz/compiz.merge-src-header-files-cleanup |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Compiz Maintainers | Pending | ||
Review via email: mp+165781@code.launchpad.net |
Commit message
src/*.h files cleanup:
Used prefix instead of postfix increment.
Fixed indentation.
Description of the change
WIP
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'src/asyncserverwindow.h' | |||
2 | --- src/asyncserverwindow.h 2012-12-13 11:12:32 +0000 | |||
3 | +++ src/asyncserverwindow.h 2013-06-20 07:03:30 +0000 | |||
4 | @@ -39,11 +39,15 @@ | |||
5 | 39 | 39 | ||
6 | 40 | virtual int requestConfigureOnClient (const XWindowChanges &xwc, | 40 | virtual int requestConfigureOnClient (const XWindowChanges &xwc, |
7 | 41 | unsigned int valueMask) = 0; | 41 | unsigned int valueMask) = 0; |
8 | 42 | |||
9 | 42 | virtual int requestConfigureOnWrapper (const XWindowChanges &xwc, | 43 | virtual int requestConfigureOnWrapper (const XWindowChanges &xwc, |
10 | 43 | unsigned int valueMask) = 0; | 44 | unsigned int valueMask) = 0; |
11 | 45 | |||
12 | 44 | virtual int requestConfigureOnFrame (const XWindowChanges &xwc, | 46 | virtual int requestConfigureOnFrame (const XWindowChanges &xwc, |
13 | 45 | unsigned int valueMask) = 0; | 47 | unsigned int valueMask) = 0; |
14 | 48 | |||
15 | 46 | virtual void sendSyntheticConfigureNotify () = 0; | 49 | virtual void sendSyntheticConfigureNotify () = 0; |
16 | 50 | |||
17 | 47 | virtual bool hasCustomShape () const = 0; | 51 | virtual bool hasCustomShape () const = 0; |
18 | 48 | }; | 52 | }; |
19 | 49 | } | 53 | } |
20 | 50 | 54 | ||
21 | === modified file 'src/configurerequestbuffer-impl.h' | |||
22 | --- src/configurerequestbuffer-impl.h 2012-12-13 11:12:32 +0000 | |||
23 | +++ src/configurerequestbuffer-impl.h 2013-06-20 07:03:30 +0000 | |||
24 | @@ -59,6 +59,7 @@ | |||
25 | 59 | public Releasable | 59 | public Releasable |
26 | 60 | { | 60 | { |
27 | 61 | public: | 61 | public: |
28 | 62 | |||
29 | 62 | typedef boost::shared_ptr <BufferLock> Ptr; | 63 | typedef boost::shared_ptr <BufferLock> Ptr; |
30 | 63 | 64 | ||
31 | 64 | virtual ~BufferLock () {} | 65 | virtual ~BufferLock () {} |
32 | @@ -89,9 +90,12 @@ | |||
33 | 89 | 90 | ||
34 | 90 | void untrackLock (compiz::window::configure_buffers::BufferLock *lock); | 91 | void untrackLock (compiz::window::configure_buffers::BufferLock *lock); |
35 | 91 | 92 | ||
39 | 92 | void pushClientRequest (const XWindowChanges &xwc, unsigned int mask); | 93 | void pushClientRequest (const XWindowChanges &xwc, |
40 | 93 | void pushWrapperRequest (const XWindowChanges &xwc, unsigned int mask); | 94 | unsigned int mask); |
41 | 94 | void pushFrameRequest (const XWindowChanges &xwc, unsigned int mask); | 95 | void pushWrapperRequest (const XWindowChanges &xwc, |
42 | 96 | unsigned int mask); | ||
43 | 97 | void pushFrameRequest (const XWindowChanges &xwc, | ||
44 | 98 | unsigned int mask); | ||
45 | 95 | void pushSyntheticConfigureNotify (); | 99 | void pushSyntheticConfigureNotify (); |
46 | 96 | compiz::window::configure_buffers::Releasable::Ptr obtainLock (); | 100 | compiz::window::configure_buffers::Releasable::Ptr obtainLock (); |
47 | 97 | 101 | ||
48 | 98 | 102 | ||
49 | === modified file 'src/eventmanagement.h' | |||
50 | --- src/eventmanagement.h 2012-10-11 10:06:30 +0000 | |||
51 | +++ src/eventmanagement.h 2013-06-20 07:03:30 +0000 | |||
52 | @@ -75,6 +75,4 @@ | |||
53 | 75 | } | 75 | } |
54 | 76 | } | 76 | } |
55 | 77 | 77 | ||
56 | 78 | |||
57 | 79 | |||
58 | 80 | #endif | 78 | #endif |
59 | 81 | 79 | ||
60 | === modified file 'src/privateaction.h' | |||
61 | --- src/privateaction.h 2012-10-02 10:28:01 +0000 | |||
62 | +++ src/privateaction.h 2013-06-20 07:03:30 +0000 | |||
63 | @@ -41,8 +41,8 @@ | |||
64 | 41 | virtual void setActive (bool) = 0; | 41 | virtual void setActive (bool) = 0; |
65 | 42 | }; | 42 | }; |
66 | 43 | 43 | ||
69 | 44 | void setActionActiveState (const CompAction &action, | 44 | void setActionActiveState (const CompAction &action, |
70 | 45 | bool active); | 45 | bool active); |
71 | 46 | } | 46 | } |
72 | 47 | } | 47 | } |
73 | 48 | 48 | ||
74 | @@ -50,15 +50,16 @@ | |||
75 | 50 | public compiz::actions::BoundAction | 50 | public compiz::actions::BoundAction |
76 | 51 | { | 51 | { |
77 | 52 | public: | 52 | public: |
78 | 53 | |||
79 | 53 | PrivateAction (); | 54 | PrivateAction (); |
81 | 54 | PrivateAction (const PrivateAction&); | 55 | PrivateAction (const PrivateAction &); |
82 | 55 | 56 | ||
83 | 56 | void setActive (bool); | 57 | void setActive (bool); |
84 | 57 | 58 | ||
87 | 58 | CompAction::CallBack initiate; | 59 | CompAction::CallBack initiate; |
88 | 59 | CompAction::CallBack terminate; | 60 | CompAction::CallBack terminate; |
89 | 60 | 61 | ||
91 | 61 | CompAction::State state; | 62 | CompAction::State state; |
92 | 62 | 63 | ||
93 | 63 | CompAction::BindingType type; | 64 | CompAction::BindingType type; |
94 | 64 | 65 | ||
95 | 65 | 66 | ||
96 | === modified file 'src/privateeventsource.h' | |||
97 | --- src/privateeventsource.h 2012-12-02 12:06:02 +0000 | |||
98 | +++ src/privateeventsource.h 2013-06-20 07:03:30 +0000 | |||
99 | @@ -54,9 +54,9 @@ | |||
100 | 54 | 54 | ||
101 | 55 | private: | 55 | private: |
102 | 56 | 56 | ||
106 | 57 | Display *mDpy; | 57 | Display *mDpy; |
107 | 58 | Glib::PollFD mPollFD; | 58 | Glib::PollFD mPollFD; |
108 | 59 | int mConnectionFD; | 59 | int mConnectionFD; |
109 | 60 | }; | 60 | }; |
110 | 61 | 61 | ||
111 | 62 | #endif | 62 | #endif |
112 | 63 | 63 | ||
113 | === modified file 'src/privateiosource.h' | |||
114 | --- src/privateiosource.h 2012-12-02 12:06:02 +0000 | |||
115 | +++ src/privateiosource.h 2013-06-20 07:03:30 +0000 | |||
116 | @@ -47,22 +47,25 @@ | |||
117 | 47 | virtual ~CompWatchFd (); | 47 | virtual ~CompWatchFd (); |
118 | 48 | 48 | ||
119 | 49 | static | 49 | static |
123 | 50 | CompWatchFd * create (int, | 50 | CompWatchFd * create (int , |
124 | 51 | Glib::IOCondition, | 51 | Glib::IOCondition , |
125 | 52 | FdWatchCallBack); | 52 | FdWatchCallBack ); |
126 | 53 | 53 | ||
127 | 54 | protected: | 54 | protected: |
128 | 55 | 55 | ||
131 | 56 | explicit CompWatchFd (int, Glib::IOCondition, FdWatchCallBack); | 56 | explicit |
132 | 57 | bool internalCallback (Glib::IOCondition); | 57 | CompWatchFd (int , |
133 | 58 | Glib::IOCondition , | ||
134 | 59 | FdWatchCallBack ); | ||
135 | 60 | bool internalCallback (Glib::IOCondition); | ||
136 | 58 | 61 | ||
137 | 59 | private: | 62 | private: |
138 | 60 | 63 | ||
140 | 61 | int mFd; | 64 | int mFd; |
141 | 62 | FdWatchCallBack mCallBack; | 65 | FdWatchCallBack mCallBack; |
142 | 63 | CompWatchFdHandle mHandle; | 66 | CompWatchFdHandle mHandle; |
145 | 64 | bool mForceFail; | 67 | bool mForceFail; |
146 | 65 | bool mExecuting; | 68 | bool mExecuting; |
147 | 66 | 69 | ||
148 | 67 | friend class ::compiz::private_screen::EventManager; | 70 | friend class ::compiz::private_screen::EventManager; |
149 | 68 | }; | 71 | }; |
150 | 69 | 72 | ||
151 | === modified file 'src/privatematch.h' | |||
152 | --- src/privatematch.h 2009-03-16 09:18:16 +0000 | |||
153 | +++ src/privatematch.h 2013-06-20 07:03:30 +0000 | |||
154 | @@ -34,9 +34,12 @@ | |||
155 | 34 | #define MATCH_OP_AND_MASK (1 << 0) | 34 | #define MATCH_OP_AND_MASK (1 << 0) |
156 | 35 | #define MATCH_OP_NOT_MASK (1 << 1) | 35 | #define MATCH_OP_NOT_MASK (1 << 1) |
157 | 36 | 36 | ||
159 | 37 | class MatchOp { | 37 | class MatchOp |
160 | 38 | { | ||
161 | 38 | public: | 39 | public: |
163 | 39 | typedef enum { | 40 | |
164 | 41 | typedef enum | ||
165 | 42 | { | ||
166 | 40 | TypeNone, | 43 | TypeNone, |
167 | 41 | TypeGroup, | 44 | TypeGroup, |
168 | 42 | TypeExp | 45 | TypeExp |
169 | @@ -52,22 +55,27 @@ | |||
170 | 52 | unsigned int flags; | 55 | unsigned int flags; |
171 | 53 | }; | 56 | }; |
172 | 54 | 57 | ||
174 | 55 | class MatchExpOp : public MatchOp { | 58 | class MatchExpOp : public MatchOp |
175 | 59 | { | ||
176 | 56 | public: | 60 | public: |
177 | 61 | |||
178 | 57 | MatchExpOp (); | 62 | MatchExpOp (); |
179 | 58 | MatchExpOp (const MatchExpOp &); | 63 | MatchExpOp (const MatchExpOp &); |
180 | 59 | 64 | ||
181 | 60 | MatchOp::Type type () { return MatchOp::TypeExp; }; | 65 | MatchOp::Type type () { return MatchOp::TypeExp; }; |
182 | 61 | 66 | ||
184 | 62 | CompString value; | 67 | CompString value; |
185 | 63 | 68 | ||
186 | 64 | boost::shared_ptr<CompMatch::Expression> e; | 69 | boost::shared_ptr<CompMatch::Expression> e; |
187 | 65 | }; | 70 | }; |
188 | 66 | 71 | ||
190 | 67 | class MatchGroupOp : public MatchOp { | 72 | class MatchGroupOp : public MatchOp |
191 | 73 | { | ||
192 | 68 | public: | 74 | public: |
193 | 75 | |||
194 | 69 | MatchGroupOp (); | 76 | MatchGroupOp (); |
195 | 70 | ~MatchGroupOp (); | 77 | ~MatchGroupOp (); |
196 | 78 | |||
197 | 71 | MatchGroupOp (const MatchGroupOp &); | 79 | MatchGroupOp (const MatchGroupOp &); |
198 | 72 | 80 | ||
199 | 73 | MatchGroupOp & operator= (const MatchGroupOp &); | 81 | MatchGroupOp & operator= (const MatchGroupOp &); |
200 | @@ -77,11 +85,14 @@ | |||
201 | 77 | MatchOp::List op; | 85 | MatchOp::List op; |
202 | 78 | }; | 86 | }; |
203 | 79 | 87 | ||
205 | 80 | class PrivateMatch { | 88 | class PrivateMatch |
206 | 89 | { | ||
207 | 81 | public: | 90 | public: |
208 | 91 | |||
209 | 82 | PrivateMatch (); | 92 | PrivateMatch (); |
210 | 83 | 93 | ||
211 | 84 | public: | 94 | public: |
212 | 95 | |||
213 | 85 | MatchGroupOp op; | 96 | MatchGroupOp op; |
214 | 86 | }; | 97 | }; |
215 | 87 | 98 | ||
216 | 88 | 99 | ||
217 | === modified file 'src/privateoption.h' | |||
218 | --- src/privateoption.h 2012-01-24 08:24:18 +0000 | |||
219 | +++ src/privateoption.h 2013-06-20 07:03:30 +0000 | |||
220 | @@ -34,23 +34,27 @@ | |||
221 | 34 | #include <core/match.h> | 34 | #include <core/match.h> |
222 | 35 | #include <core/screen.h> | 35 | #include <core/screen.h> |
223 | 36 | 36 | ||
225 | 37 | typedef struct _CompOptionIntRestriction { | 37 | typedef struct _CompOptionIntRestriction |
226 | 38 | { | ||
227 | 38 | int min; | 39 | int min; |
228 | 39 | int max; | 40 | int max; |
229 | 40 | } IntRestriction; | 41 | } IntRestriction; |
230 | 41 | 42 | ||
232 | 42 | typedef struct _CompOptionFloatRestriction { | 43 | typedef struct _CompOptionFloatRestriction |
233 | 44 | { | ||
234 | 43 | float min; | 45 | float min; |
235 | 44 | float max; | 46 | float max; |
236 | 45 | float precision; | 47 | float precision; |
237 | 46 | } FloatRestriction; | 48 | } FloatRestriction; |
238 | 47 | 49 | ||
242 | 48 | typedef union { | 50 | typedef union |
243 | 49 | IntRestriction i; | 51 | { |
244 | 50 | FloatRestriction f; | 52 | IntRestriction i; |
245 | 53 | FloatRestriction f; | ||
246 | 51 | } RestrictionUnion; | 54 | } RestrictionUnion; |
247 | 52 | 55 | ||
249 | 53 | class PrivateRestriction { | 56 | class PrivateRestriction |
250 | 57 | { | ||
251 | 54 | public: | 58 | public: |
252 | 55 | CompOption::Type type; | 59 | CompOption::Type type; |
253 | 56 | RestrictionUnion rest; | 60 | RestrictionUnion rest; |
254 | 57 | 61 | ||
255 | === modified file 'src/privatescreen.h' | |||
256 | --- src/privatescreen.h 2013-05-12 08:20:10 +0000 | |||
257 | +++ src/privatescreen.h 2013-06-20 07:03:30 +0000 | |||
258 | @@ -53,10 +53,10 @@ | |||
259 | 53 | 53 | ||
260 | 54 | class CoreWindow; | 54 | class CoreWindow; |
261 | 55 | 55 | ||
264 | 56 | extern bool shutDown; | 56 | extern bool shutDown; |
265 | 57 | extern bool restartSignal; | 57 | extern bool restartSignal; |
266 | 58 | 58 | ||
268 | 59 | extern bool useDesktopHints; | 59 | extern bool useDesktopHints; |
269 | 60 | 60 | ||
270 | 61 | extern std::list <CompString> initialPlugins; | 61 | extern std::list <CompString> initialPlugins; |
271 | 62 | 62 | ||
272 | @@ -66,27 +66,30 @@ | |||
273 | 66 | CompAction::CallBack initiate; | 66 | CompAction::CallBack initiate; |
274 | 67 | CompAction::CallBack terminate; | 67 | CompAction::CallBack terminate; |
275 | 68 | 68 | ||
278 | 69 | unsigned int edge; | 69 | unsigned int edge; |
279 | 70 | unsigned int state; | 70 | unsigned int state; |
280 | 71 | 71 | ||
282 | 72 | CompOption::Vector options; | 72 | CompOption::Vector options; |
283 | 73 | } CompDelayedEdgeSettings; | 73 | } CompDelayedEdgeSettings; |
284 | 74 | 74 | ||
285 | 75 | 75 | ||
288 | 76 | struct CompScreenEdge { | 76 | struct CompScreenEdge |
289 | 77 | Window id; | 77 | { |
290 | 78 | Window id; | ||
291 | 78 | unsigned int count; | 79 | unsigned int count; |
292 | 79 | }; | 80 | }; |
293 | 80 | 81 | ||
297 | 81 | struct CompGroup { | 82 | struct CompGroup |
298 | 82 | unsigned int refCnt; | 83 | { |
299 | 83 | Window id; | 84 | unsigned int refCnt; |
300 | 85 | Window id; | ||
301 | 84 | }; | 86 | }; |
302 | 85 | 87 | ||
307 | 86 | struct CompStartupSequence { | 88 | struct CompStartupSequence |
308 | 87 | SnStartupSequence *sequence; | 89 | { |
309 | 88 | unsigned int viewportX; | 90 | SnStartupSequence *sequence; |
310 | 89 | unsigned int viewportY; | 91 | unsigned int viewportX; |
311 | 92 | unsigned int viewportY; | ||
312 | 90 | }; | 93 | }; |
313 | 91 | 94 | ||
314 | 92 | namespace compiz | 95 | namespace compiz |
315 | @@ -118,7 +121,7 @@ | |||
316 | 118 | 121 | ||
317 | 119 | typedef CompWindow::ForEach Functor; | 122 | typedef CompWindow::ForEach Functor; |
318 | 120 | 123 | ||
320 | 121 | WindowManager(); | 124 | WindowManager (); |
321 | 122 | 125 | ||
322 | 123 | CompGroup * addGroup (Window id); | 126 | CompGroup * addGroup (Window id); |
323 | 124 | void removeGroup (CompGroup *group); | 127 | void removeGroup (CompGroup *group); |
324 | @@ -127,90 +130,102 @@ | |||
325 | 127 | void eraseWindowFromMap (Window id); | 130 | void eraseWindowFromMap (Window id); |
326 | 128 | void removeDestroyed (); | 131 | void removeDestroyed (); |
327 | 129 | 132 | ||
329 | 130 | void updateClientList (PrivateScreen& ps); | 133 | void updateClientList (PrivateScreen &ps); |
330 | 131 | 134 | ||
332 | 132 | void addToDestroyedWindows(CompWindow * cw) | 135 | void addToDestroyedWindows (CompWindow *cw) |
333 | 133 | { destroyedWindows.push_back (cw); } | 136 | { destroyedWindows.push_back (cw); } |
334 | 134 | 137 | ||
340 | 135 | void incrementPendingDestroys() { pendingDestroys++; } | 138 | void incrementPendingDestroys () |
341 | 136 | const CompWindowVector& getClientList () const | 139 | { |
342 | 137 | { return clientList; } | 140 | ++pendingDestroys; |
343 | 138 | const CompWindowVector& getClientListStacking () const | 141 | } |
344 | 139 | { return clientListStacking; } | 142 | |
345 | 143 | const CompWindowVector &getClientList () const | ||
346 | 144 | { | ||
347 | 145 | return clientList; | ||
348 | 146 | } | ||
349 | 147 | |||
350 | 148 | const CompWindowVector &getClientListStacking () const | ||
351 | 149 | { | ||
352 | 150 | return clientListStacking; | ||
353 | 151 | } | ||
354 | 140 | 152 | ||
355 | 141 | CompWindow * findWindow (Window id) const; | 153 | CompWindow * findWindow (Window id) const; |
361 | 142 | CompWindow * getTopWindow() const; | 154 | CompWindow * getTopWindow () const; |
362 | 143 | CompWindow * getTopServerWindow() const; | 155 | CompWindow * getTopServerWindow () const; |
363 | 144 | 156 | ||
364 | 145 | 157 | ||
365 | 146 | void removeFromFindWindowCache(CompWindow* w) | 158 | void removeFromFindWindowCache (CompWindow *w) |
366 | 147 | { | 159 | { |
367 | 148 | if (w == lastFoundWindow) | 160 | if (w == lastFoundWindow) |
368 | 149 | lastFoundWindow = 0; | 161 | lastFoundWindow = 0; |
369 | 150 | } | 162 | } |
370 | 151 | 163 | ||
372 | 152 | void addWindowToMap(CompWindow* w) | 164 | void addWindowToMap(CompWindow *w) |
373 | 153 | { | 165 | { |
374 | 154 | if (w->id () != 1) | 166 | if (w->id () != 1) |
375 | 155 | windowsMap[w->id ()] = w; | 167 | windowsMap[w->id ()] = w; |
376 | 156 | } | 168 | } |
377 | 157 | 169 | ||
383 | 158 | void validateServerWindows(); | 170 | void validateServerWindows (); |
384 | 159 | 171 | ||
385 | 160 | void invalidateServerWindows(); | 172 | void invalidateServerWindows (); |
386 | 161 | 173 | ||
387 | 162 | void insertWindow (CompWindow* w, Window aboveId); | 174 | void insertWindow (CompWindow *w, |
388 | 175 | Window aboveId); | ||
389 | 163 | void unhookWindow (CompWindow *w); | 176 | void unhookWindow (CompWindow *w); |
397 | 164 | CompWindowList& getWindows() { return windows; } | 177 | CompWindowList &getWindows () { return windows; } |
398 | 165 | 178 | ||
399 | 166 | CompWindowList& getDestroyedWindows() { return destroyedWindows; } | 179 | CompWindowList &getDestroyedWindows () { return destroyedWindows; } |
400 | 167 | 180 | ||
401 | 168 | void insertServerWindow(CompWindow* w, Window aboveId); | 181 | void insertServerWindow (CompWindow *w, |
402 | 169 | void unhookServerWindow(CompWindow *w); | 182 | Window aboveId); |
403 | 170 | CompWindowList& getServerWindows() { return serverWindows; } | 183 | void unhookServerWindow (CompWindow *w); |
404 | 184 | CompWindowList &getServerWindows () { return serverWindows; } | ||
405 | 171 | 185 | ||
406 | 172 | typedef CompWindowList::const_iterator iterator; | 186 | typedef CompWindowList::const_iterator iterator; |
407 | 173 | typedef CompWindowList::const_reverse_iterator reverse_iterator; | 187 | typedef CompWindowList::const_reverse_iterator reverse_iterator; |
408 | 174 | 188 | ||
422 | 175 | iterator begin() const { return windows.begin(); } | 189 | iterator begin () const { return windows.begin (); } |
423 | 176 | iterator end() const { return windows.end(); } | 190 | iterator end () const { return windows.end (); } |
424 | 177 | reverse_iterator rbegin() const { return windows.rbegin(); } | 191 | reverse_iterator rbegin () const { return windows.rbegin (); } |
425 | 178 | reverse_iterator rend() const { return windows.rend(); } | 192 | reverse_iterator rend () const { return windows.rend (); } |
426 | 179 | 193 | ||
427 | 180 | iterator serverBegin() const { return serverWindows.begin(); } | 194 | iterator serverBegin () const { return serverWindows.begin (); } |
428 | 181 | iterator serverEnd() const { return serverWindows.end(); } | 195 | iterator serverEnd () const { return serverWindows.end (); } |
429 | 182 | reverse_iterator rserverBegin() const { return serverWindows.rbegin(); } | 196 | reverse_iterator rserverBegin () const { return serverWindows.rbegin (); } |
430 | 183 | reverse_iterator rserverEnd() const { return serverWindows.rend(); } | 197 | reverse_iterator rserverEnd () const { return serverWindows.rend (); } |
431 | 184 | 198 | ||
432 | 185 | void clearFullscreenHints() const; | 199 | void clearFullscreenHints () const; |
433 | 186 | void showOrHideForDesktop(unsigned int desktop) const; | 200 | void showOrHideForDesktop (unsigned int desktop) const; |
434 | 187 | void setWindowActiveness(::compiz::private_screen::History& history) const; | 201 | void setWindowActiveness (::compiz::private_screen::History& history) const; |
435 | 188 | void setNumberOfDesktops (unsigned int nDesktop) const; | 202 | void setNumberOfDesktops (unsigned int nDesktop) const; |
437 | 189 | void updateWindowSizes() const; | 203 | void updateWindowSizes () const; |
438 | 190 | 204 | ||
440 | 191 | void forEachWindow(Functor const& f) const | 205 | void forEachWindow (Functor const& f) const |
441 | 192 | { | 206 | { |
443 | 193 | std::for_each(windows.begin(), windows.end(), f); | 207 | std::for_each (windows.begin (), windows.end (), f); |
444 | 194 | } | 208 | } |
445 | 195 | 209 | ||
446 | 196 | private: | 210 | private: |
453 | 197 | CompWindowList windows; | 211 | |
454 | 198 | CompWindowList serverWindows; | 212 | CompWindowList windows; |
455 | 199 | CompWindowList destroyedWindows; | 213 | CompWindowList serverWindows; |
456 | 200 | bool stackIsFresh; | 214 | CompWindowList destroyedWindows; |
457 | 201 | 215 | bool stackIsFresh; | |
458 | 202 | CompWindow::Map windowsMap; | 216 | |
459 | 217 | CompWindow::Map windowsMap; | ||
460 | 203 | std::list<CompGroup *> groups; | 218 | std::list<CompGroup *> groups; |
461 | 204 | 219 | ||
471 | 205 | CompWindowVector clientList; /* clients in mapping order */ | 220 | CompWindowVector clientList; /* clients in mapping order */ |
472 | 206 | CompWindowVector clientListStacking; /* clients in stacking order */ | 221 | CompWindowVector clientListStacking; /* clients in stacking order */ |
473 | 207 | 222 | ||
474 | 208 | std::vector<Window> clientIdList; /* client ids in mapping order */ | 223 | std::vector<Window> clientIdList; /* client ids in mapping order */ |
475 | 209 | std::vector<Window> clientIdListStacking;/* client ids in stacking order */ | 224 | std::vector<Window> clientIdListStacking;/* client ids in stacking order */ |
476 | 210 | 225 | ||
477 | 211 | unsigned int pendingDestroys; | 226 | unsigned int pendingDestroys; |
478 | 212 | 227 | ||
479 | 213 | mutable CompWindow* lastFoundWindow; | 228 | mutable CompWindow *lastFoundWindow; |
480 | 214 | }; | 229 | }; |
481 | 215 | 230 | ||
482 | 216 | unsigned int windowStateFromString (const char *str); | 231 | unsigned int windowStateFromString (const char *str); |
483 | @@ -218,11 +233,13 @@ | |||
484 | 218 | class PluginManager | 233 | class PluginManager |
485 | 219 | { | 234 | { |
486 | 220 | public: | 235 | public: |
487 | 236 | |||
488 | 221 | PluginManager(); | 237 | PluginManager(); |
489 | 222 | 238 | ||
491 | 223 | void updatePlugins (CompScreen* screen, CompOption::Value::Vector const& extraPluginsRequested); | 239 | void updatePlugins (CompScreen *screen, |
492 | 240 | CompOption::Value::Vector const &extraPluginsRequested); | ||
493 | 224 | 241 | ||
495 | 225 | void setPlugins(CompOption::Value::Vector const& vList) | 242 | void setPlugins(CompOption::Value::Vector const &vList) |
496 | 226 | { | 243 | { |
497 | 227 | plugin.set (CompOption::TypeString, vList); | 244 | plugin.set (CompOption::TypeString, vList); |
498 | 228 | } | 245 | } |
499 | @@ -230,9 +247,10 @@ | |||
500 | 230 | bool isDirtyPluginList () const { return dirtyPluginList; } | 247 | bool isDirtyPluginList () const { return dirtyPluginList; } |
501 | 231 | void setDirtyPluginList () { dirtyPluginList = true; } | 248 | void setDirtyPluginList () { dirtyPluginList = true; } |
502 | 232 | 249 | ||
504 | 233 | CompOption::Value::Vector mergedPluginList(CompOption::Value::Vector const& extraPluginsRequested) const; | 250 | CompOption::Value::Vector mergedPluginList(CompOption::Value::Vector const &extraPluginsRequested) const; |
505 | 234 | 251 | ||
506 | 235 | private: | 252 | private: |
507 | 253 | |||
508 | 236 | CompOption::Value plugin; | 254 | CompOption::Value plugin; |
509 | 237 | bool dirtyPluginList; | 255 | bool dirtyPluginList; |
510 | 238 | typedef std::set<CompString> CompStringSet; | 256 | typedef std::set<CompString> CompStringSet; |
511 | @@ -265,6 +283,7 @@ | |||
512 | 265 | public GrabList | 283 | public GrabList |
513 | 266 | { | 284 | { |
514 | 267 | public: | 285 | public: |
515 | 286 | |||
516 | 268 | EventManager (); | 287 | EventManager (); |
517 | 269 | ~EventManager (); | 288 | ~EventManager (); |
518 | 270 | 289 | ||
519 | @@ -278,24 +297,22 @@ | |||
520 | 278 | CompAction::State state, | 297 | CompAction::State state, |
521 | 279 | CompOption::Vector &arguments); | 298 | CompOption::Vector &arguments); |
522 | 280 | 299 | ||
525 | 281 | void startEventLoop(Display* dpy); | 300 | void startEventLoop (Display *dpy); |
526 | 282 | void quit() { mainloop->quit(); } | 301 | void quit () { mainloop->quit(); } |
527 | 283 | 302 | ||
532 | 284 | CompWatchFdHandle addWatchFd ( | 303 | CompWatchFdHandle addWatchFd (int fd, |
533 | 285 | int fd, | 304 | short int events, |
534 | 286 | short int events, | 305 | FdWatchCallBack callBack); |
531 | 287 | FdWatchCallBack callBack); | ||
535 | 288 | 306 | ||
536 | 289 | void removeWatchFd (CompWatchFdHandle handle); | 307 | void removeWatchFd (CompWatchFdHandle handle); |
537 | 290 | 308 | ||
542 | 291 | CompFileWatch* addFileWatch ( | 309 | CompFileWatch* addFileWatch (const char *path, |
543 | 292 | const char *path, | 310 | int mask, |
544 | 293 | int mask, | 311 | FileWatchCallBack callBack); |
541 | 294 | FileWatchCallBack callBack); | ||
545 | 295 | 312 | ||
546 | 296 | CompFileWatch* removeFileWatch (CompFileWatchHandle handle); | 313 | CompFileWatch* removeFileWatch (CompFileWatchHandle handle); |
547 | 297 | 314 | ||
549 | 298 | const CompFileWatchList& getFileWatches () const; | 315 | const CompFileWatchList &getFileWatches () const; |
550 | 299 | 316 | ||
551 | 300 | void grabNotified() { grabbed = true; } | 317 | void grabNotified() { grabbed = true; } |
552 | 301 | void ungrabNotified() { grabbed = false; } | 318 | void ungrabNotified() { grabbed = false; } |
553 | @@ -310,7 +327,8 @@ | |||
554 | 310 | void resetPossibleTap() { possibleTap = 0; } | 327 | void resetPossibleTap() { possibleTap = 0; } |
555 | 311 | 328 | ||
556 | 312 | private: | 329 | private: |
558 | 313 | void *possibleTap; | 330 | |
559 | 331 | void *possibleTap; | ||
560 | 314 | 332 | ||
561 | 315 | Glib::RefPtr <Glib::MainLoop> mainloop; | 333 | Glib::RefPtr <Glib::MainLoop> mainloop; |
562 | 316 | 334 | ||
563 | @@ -338,22 +356,27 @@ | |||
564 | 338 | Window grabWindow; | 356 | Window grabWindow; |
565 | 339 | }; | 357 | }; |
566 | 340 | 358 | ||
568 | 341 | class KeyGrab { | 359 | class KeyGrab |
569 | 360 | { | ||
570 | 342 | public: | 361 | public: |
571 | 362 | |||
572 | 343 | int keycode; | 363 | int keycode; |
573 | 344 | unsigned int modifiers; | 364 | unsigned int modifiers; |
574 | 345 | int count; | 365 | int count; |
575 | 346 | }; | 366 | }; |
576 | 347 | 367 | ||
578 | 348 | class ButtonGrab { | 368 | class ButtonGrab |
579 | 369 | { | ||
580 | 349 | public: | 370 | public: |
581 | 371 | |||
582 | 350 | int button; | 372 | int button; |
583 | 351 | unsigned int modifiers; | 373 | unsigned int modifiers; |
584 | 352 | int count; | 374 | int count; |
585 | 353 | }; | 375 | }; |
586 | 354 | 376 | ||
589 | 355 | struct Grab { | 377 | struct Grab |
590 | 356 | Grab(Cursor cursor, const char *name) : cursor(cursor), name(name) {} | 378 | { |
591 | 379 | Grab (Cursor cursor, const char *name) : cursor (cursor), name (name) {} | ||
592 | 357 | Cursor cursor; | 380 | Cursor cursor; |
593 | 358 | const char *name; | 381 | const char *name; |
594 | 359 | }; | 382 | }; |
595 | @@ -371,40 +394,44 @@ | |||
596 | 371 | 394 | ||
597 | 372 | class GrabManager : boost::noncopyable | 395 | class GrabManager : boost::noncopyable |
598 | 373 | { | 396 | { |
624 | 374 | public: | 397 | public: |
625 | 375 | GrabManager(CompScreen *screen); | 398 | |
626 | 376 | 399 | GrabManager(CompScreen *screen); | |
627 | 377 | bool addPassiveKeyGrab (CompAction::KeyBinding &key); | 400 | |
628 | 378 | void removePassiveKeyGrab (CompAction::KeyBinding &key); | 401 | bool addPassiveKeyGrab (CompAction::KeyBinding &key); |
629 | 379 | bool addPassiveButtonGrab (CompAction::ButtonBinding &button); | 402 | void removePassiveKeyGrab (CompAction::KeyBinding &key); |
630 | 380 | void removePassiveButtonGrab (CompAction::ButtonBinding &button); | 403 | bool addPassiveButtonGrab (CompAction::ButtonBinding &button); |
631 | 381 | 404 | void removePassiveButtonGrab (CompAction::ButtonBinding &button); | |
632 | 382 | void grabUngrabOneKey (unsigned int modifiers, | 405 | |
633 | 383 | int keycode, | 406 | void grabUngrabOneKey (unsigned int modifiers, |
634 | 384 | bool grab); | 407 | int keycode, |
635 | 385 | bool grabUngrabKeys (unsigned int modifiers, | 408 | bool grab); |
636 | 386 | int keycode, | 409 | bool grabUngrabKeys (unsigned int modifiers, |
637 | 387 | bool grab); | 410 | int keycode, |
638 | 388 | void updatePassiveKeyGrabs (); | 411 | bool grab); |
639 | 389 | void updatePassiveButtonGrabs(Window serverFrame); | 412 | void updatePassiveKeyGrabs (); |
640 | 390 | 413 | void updatePassiveButtonGrabs(Window serverFrame); | |
641 | 391 | void setCurrentState(CompAction::State state); | 414 | |
642 | 392 | 415 | void setCurrentState(CompAction::State state); | |
643 | 393 | private: | 416 | |
644 | 394 | CompScreen * const screen; | 417 | private: |
645 | 395 | CompAction::State currentState; | 418 | |
646 | 396 | 419 | CompScreen *const screen; | |
647 | 397 | std::list<ButtonGrab> buttonGrabs; | 420 | CompAction::State currentState; |
648 | 398 | std::list<KeyGrab> keyGrabs; | 421 | |
649 | 422 | std::list<ButtonGrab> buttonGrabs; | ||
650 | 423 | std::list<KeyGrab> keyGrabs; | ||
651 | 399 | }; | 424 | }; |
652 | 400 | 425 | ||
653 | 401 | class History : public virtual ::compiz::History, | 426 | class History : public virtual ::compiz::History, |
654 | 402 | boost::noncopyable | 427 | boost::noncopyable |
655 | 403 | { | 428 | { |
656 | 404 | public: | 429 | public: |
657 | 430 | |||
658 | 405 | History(); | 431 | History(); |
659 | 406 | 432 | ||
661 | 407 | void setCurrentActiveWindowHistory (int x, int y); | 433 | void setCurrentActiveWindowHistory (int x, |
662 | 434 | int y); | ||
663 | 408 | 435 | ||
664 | 409 | void addToCurrentActiveWindowHistory (Window id); | 436 | void addToCurrentActiveWindowHistory (Window id); |
665 | 410 | 437 | ||
666 | @@ -414,9 +441,10 @@ | |||
667 | 414 | unsigned int activeNum () const; | 441 | unsigned int activeNum () const; |
668 | 415 | 442 | ||
669 | 416 | private: | 443 | private: |
670 | 444 | |||
671 | 417 | CompActiveWindowHistory history[ACTIVE_WINDOW_HISTORY_NUM]; | 445 | CompActiveWindowHistory history[ACTIVE_WINDOW_HISTORY_NUM]; |
672 | 418 | int currentHistory_; | 446 | int currentHistory_; |
674 | 419 | unsigned int activeNum_; | 447 | unsigned int activeNum_; |
675 | 420 | }; | 448 | }; |
676 | 421 | 449 | ||
677 | 422 | class ViewportRetrievalInterface | 450 | class ViewportRetrievalInterface |
678 | @@ -449,14 +477,15 @@ | |||
679 | 449 | namespace viewports | 477 | namespace viewports |
680 | 450 | { | 478 | { |
681 | 451 | void viewportForGeometry (const CompWindow::Geometry &gm, | 479 | void viewportForGeometry (const CompWindow::Geometry &gm, |
683 | 452 | CompPoint &viewport, | 480 | CompPoint &viewport, |
684 | 453 | ViewportRetrievalInterface *viewports, | 481 | ViewportRetrievalInterface *viewports, |
686 | 454 | const CompSize &screenSize); | 482 | const CompSize &screenSize); |
687 | 455 | } | 483 | } |
688 | 456 | 484 | ||
689 | 457 | class StartupSequence : boost::noncopyable | 485 | class StartupSequence : boost::noncopyable |
690 | 458 | { | 486 | { |
691 | 459 | public: | 487 | public: |
692 | 488 | |||
693 | 460 | StartupSequence(); | 489 | StartupSequence(); |
694 | 461 | void addSequence (SnStartupSequence *sequence, CompPoint const& vp); | 490 | void addSequence (SnStartupSequence *sequence, CompPoint const& vp); |
695 | 462 | void removeSequence (SnStartupSequence *sequence); | 491 | void removeSequence (SnStartupSequence *sequence); |
696 | @@ -466,6 +495,7 @@ | |||
697 | 466 | virtual void updateStartupFeedback () = 0; | 495 | virtual void updateStartupFeedback () = 0; |
698 | 467 | bool emptySequence() const { return startupSequences.empty(); } | 496 | bool emptySequence() const { return startupSequences.empty(); } |
699 | 468 | private: | 497 | private: |
700 | 498 | |||
701 | 469 | std::list<CompStartupSequence *> startupSequences; | 499 | std::list<CompStartupSequence *> startupSequences; |
702 | 470 | CompTimer startupSequenceTimer; | 500 | CompTimer startupSequenceTimer; |
703 | 471 | }; | 501 | }; |
704 | @@ -474,44 +504,49 @@ | |||
705 | 474 | class StartupSequenceImpl : public StartupSequence | 504 | class StartupSequenceImpl : public StartupSequence |
706 | 475 | { | 505 | { |
707 | 476 | public: | 506 | public: |
709 | 477 | StartupSequenceImpl(PrivateScreen* priv) : priv(priv) {} | 507 | |
710 | 508 | StartupSequenceImpl(PrivateScreen *priv) : priv (priv) {} | ||
711 | 478 | 509 | ||
712 | 479 | virtual void updateStartupFeedback (); | 510 | virtual void updateStartupFeedback (); |
713 | 480 | private: | 511 | private: |
715 | 481 | PrivateScreen* const priv; | 512 | |
716 | 513 | PrivateScreen *const priv; | ||
717 | 482 | }; | 514 | }; |
718 | 483 | 515 | ||
719 | 484 | class Extension | 516 | class Extension |
720 | 485 | { | 517 | { |
750 | 486 | public: | 518 | public: |
751 | 487 | Extension() : is_enabled(), extension() {} | 519 | |
752 | 488 | 520 | Extension() : is_enabled(), extension() {} | |
753 | 489 | template<Bool ExtensionQuery (Display*, int*, int*)> | 521 | |
754 | 490 | bool init(Display * dpy) | 522 | template<Bool ExtensionQuery (Display*, int*, int*)> |
755 | 491 | { | 523 | bool init(Display * dpy) |
756 | 492 | int error; | 524 | { |
757 | 493 | is_enabled = ExtensionQuery(dpy, &extension, &error); | 525 | int error; |
758 | 494 | return is_enabled; | 526 | is_enabled = ExtensionQuery(dpy, &extension, &error); |
759 | 495 | } | 527 | return is_enabled; |
760 | 496 | 528 | } | |
761 | 497 | template<Bool ExtensionQuery(Display*, int*, int*, int*, int*, int*)> | 529 | |
762 | 498 | bool init(Display * dpy) | 530 | template<Bool ExtensionQuery(Display*, int*, int*, int*, int*, int*)> |
763 | 499 | { | 531 | bool init(Display * dpy) |
764 | 500 | int opcode; | 532 | { |
765 | 501 | int error; | 533 | int opcode; |
766 | 502 | is_enabled = ExtensionQuery(dpy, &opcode, &extension, &error, NULL, NULL); | 534 | int error; |
767 | 503 | 535 | is_enabled = ExtensionQuery(dpy, &opcode, &extension, &error, NULL, NULL); | |
768 | 504 | if (!is_enabled) extension = -1; | 536 | |
769 | 505 | 537 | if (!is_enabled) | |
770 | 506 | return is_enabled; | 538 | extension = -1; |
771 | 507 | } | 539 | |
772 | 508 | 540 | return is_enabled; | |
773 | 509 | int isEnabled () const { return is_enabled; } | 541 | } |
774 | 510 | int get () const { return extension; } | 542 | |
775 | 511 | 543 | int isEnabled () const { return is_enabled; } | |
776 | 512 | private: | 544 | int get () const { return extension; } |
777 | 513 | bool is_enabled; | 545 | |
778 | 514 | int extension; | 546 | private: |
779 | 547 | |||
780 | 548 | bool is_enabled; | ||
781 | 549 | int extension; | ||
782 | 515 | }; | 550 | }; |
783 | 516 | 551 | ||
784 | 517 | class Ping : | 552 | class Ping : |
785 | @@ -724,6 +759,7 @@ | |||
786 | 724 | { pingTimer.setCallback(callback); } | 759 | { pingTimer.setCallback(callback); } |
787 | 725 | 760 | ||
788 | 726 | public: | 761 | public: |
789 | 762 | |||
790 | 727 | Display* dpy; | 763 | Display* dpy; |
791 | 728 | compiz::private_screen::Extension xSync; | 764 | compiz::private_screen::Extension xSync; |
792 | 729 | compiz::private_screen::Extension xRandr; | 765 | compiz::private_screen::Extension xRandr; |
793 | @@ -744,7 +780,6 @@ | |||
794 | 744 | 780 | ||
795 | 745 | Window wmSnSelectionWindow; | 781 | Window wmSnSelectionWindow; |
796 | 746 | 782 | ||
797 | 747 | int clientPointerDeviceId; | ||
798 | 748 | Cursor normalCursor; | 783 | Cursor normalCursor; |
799 | 749 | Cursor busyCursor; | 784 | Cursor busyCursor; |
800 | 750 | Cursor invisibleCursor; | 785 | Cursor invisibleCursor; |
801 | @@ -753,6 +788,7 @@ | |||
802 | 753 | bool initialized; | 788 | bool initialized; |
803 | 754 | 789 | ||
804 | 755 | private: | 790 | private: |
805 | 791 | |||
806 | 756 | CompScreen* screen; | 792 | CompScreen* screen; |
807 | 757 | compiz::private_screen::Extension xkbEvent; | 793 | compiz::private_screen::Extension xkbEvent; |
808 | 758 | 794 | ||
809 | @@ -822,6 +858,7 @@ | |||
810 | 822 | ::compiz::private_screen::History | 858 | ::compiz::private_screen::History |
811 | 823 | { | 859 | { |
812 | 824 | public: | 860 | public: |
813 | 861 | |||
814 | 825 | CompScreenImpl (); | 862 | CompScreenImpl (); |
815 | 826 | ~CompScreenImpl (); | 863 | ~CompScreenImpl (); |
816 | 827 | 864 | ||
817 | @@ -919,7 +956,8 @@ | |||
818 | 919 | CompWindowList & serverWindows (); | 956 | CompWindowList & serverWindows (); |
819 | 920 | CompWindowList & destroyedWindows (); | 957 | CompWindowList & destroyedWindows (); |
820 | 921 | 958 | ||
822 | 922 | void warpPointer (int dx, int dy); | 959 | void warpPointer (int dx, |
823 | 960 | int dy); | ||
824 | 923 | 961 | ||
825 | 924 | Time getCurrentTime (); | 962 | Time getCurrentTime (); |
826 | 925 | 963 | ||
827 | @@ -929,7 +967,8 @@ | |||
828 | 929 | 967 | ||
829 | 930 | void focusDefaultWindow (); | 968 | void focusDefaultWindow (); |
830 | 931 | 969 | ||
832 | 932 | void insertWindow (CompWindow *w, Window aboveId); | 970 | void insertWindow (CompWindow *w, |
833 | 971 | Window aboveId); | ||
834 | 933 | void unhookWindow (CompWindow *w); | 972 | void unhookWindow (CompWindow *w); |
835 | 934 | 973 | ||
836 | 935 | void insertServerWindow (CompWindow *w, Window aboveId); | 974 | void insertServerWindow (CompWindow *w, Window aboveId); |
837 | @@ -981,7 +1020,9 @@ | |||
838 | 981 | 1020 | ||
839 | 982 | void runCommand (CompString command); | 1021 | void runCommand (CompString command); |
840 | 983 | 1022 | ||
842 | 984 | void moveViewport (int tx, int ty, bool sync); | 1023 | void moveViewport (int tx, |
843 | 1024 | int ty, | ||
844 | 1025 | bool sync); | ||
845 | 985 | 1026 | ||
846 | 986 | void sendWindowActivationRequest (Window id); | 1027 | void sendWindowActivationRequest (Window id); |
847 | 987 | 1028 | ||
848 | @@ -1026,32 +1067,32 @@ | |||
849 | 1026 | 1067 | ||
850 | 1027 | void updateSupportedWmHints (); | 1068 | void updateSupportedWmHints (); |
851 | 1028 | 1069 | ||
855 | 1029 | unsigned int showingDesktopMask() const; | 1070 | unsigned int showingDesktopMask () const; |
856 | 1030 | virtual bool grabsEmpty() const; | 1071 | virtual bool grabsEmpty () const; |
857 | 1031 | virtual void sizePluginClasses(unsigned int size); | 1072 | virtual void sizePluginClasses (unsigned int size); |
858 | 1032 | virtual void setWindowState (unsigned int state, Window id); | 1073 | virtual void setWindowState (unsigned int state, Window id); |
860 | 1033 | virtual void addToDestroyedWindows(CompWindow * cw); | 1074 | virtual void addToDestroyedWindows (CompWindow * cw); |
861 | 1034 | virtual void processEvents (); | 1075 | virtual void processEvents (); |
862 | 1035 | virtual void alwaysHandleEvent (XEvent *event); | 1076 | virtual void alwaysHandleEvent (XEvent *event); |
863 | 1036 | 1077 | ||
864 | 1037 | virtual ServerGrabInterface * serverGrabInterface (); | 1078 | virtual ServerGrabInterface * serverGrabInterface (); |
865 | 1038 | 1079 | ||
866 | 1039 | virtual void updatePassiveKeyGrabs () const; | 1080 | virtual void updatePassiveKeyGrabs () const; |
868 | 1040 | virtual void updatePassiveButtonGrabs(Window serverFrame); | 1081 | virtual void updatePassiveButtonGrabs (Window serverFrame); |
869 | 1041 | 1082 | ||
871 | 1042 | virtual bool displayInitialised() const; | 1083 | virtual bool displayInitialised () const; |
872 | 1043 | virtual void applyStartupProperties (CompWindow *window); | 1084 | virtual void applyStartupProperties (CompWindow *window); |
878 | 1044 | virtual void updateClientList(); | 1085 | virtual void updateClientList (); |
879 | 1045 | virtual CompWindow * getTopWindow() const; | 1086 | virtual CompWindow * getTopWindow () const; |
880 | 1046 | virtual CompWindow * getTopServerWindow() const; | 1087 | virtual CompWindow * getTopServerWindow () const; |
881 | 1047 | virtual CoreOptions& getCoreOptions(); | 1088 | virtual CoreOptions& getCoreOptions (); |
882 | 1048 | virtual Colormap colormap() const; | 1089 | virtual Colormap colormap () const; |
883 | 1049 | virtual void setCurrentDesktop (unsigned int desktop); | 1090 | virtual void setCurrentDesktop (unsigned int desktop); |
889 | 1050 | virtual Window activeWindow() const; | 1091 | virtual Window activeWindow () const; |
890 | 1051 | virtual bool grabWindowIsNot(Window w) const; | 1092 | virtual bool grabWindowIsNot (Window w) const; |
891 | 1052 | virtual void incrementPendingDestroys(); | 1093 | virtual void incrementPendingDestroys (); |
892 | 1053 | virtual void setNextActiveWindow(Window id); | 1094 | virtual void setNextActiveWindow (Window id); |
893 | 1054 | virtual Window getNextActiveWindow() const; | 1095 | virtual Window getNextActiveWindow () const; |
894 | 1055 | virtual CompWindow * focusTopMostWindow (); | 1096 | virtual CompWindow * focusTopMostWindow (); |
895 | 1056 | 1097 | ||
896 | 1057 | public : | 1098 | public : |
897 | @@ -1120,43 +1161,54 @@ | |||
898 | 1120 | 1161 | ||
899 | 1121 | 1162 | ||
900 | 1122 | private: | 1163 | private: |
909 | 1123 | virtual bool _setOptionForPlugin(const char *, const char *, CompOption::Value &); | 1164 | virtual bool _setOptionForPlugin (const char *, const char *, CompOption::Value &); |
910 | 1124 | virtual bool _initPluginForScreen(CompPlugin *); | 1165 | virtual bool _initPluginForScreen (CompPlugin *); |
911 | 1125 | virtual void _finiPluginForScreen(CompPlugin *); | 1166 | virtual void _finiPluginForScreen (CompPlugin *); |
912 | 1126 | virtual void _handleEvent(XEvent *event); | 1167 | virtual void _handleEvent (XEvent *event); |
913 | 1127 | virtual void _logMessage(const char *, CompLogLevel, const char*); | 1168 | virtual void _logMessage (const char *, |
914 | 1128 | virtual void _enterShowDesktopMode(); | 1169 | CompLogLevel, const char *); |
915 | 1129 | virtual void _leaveShowDesktopMode(CompWindow *); | 1170 | virtual void _enterShowDesktopMode (); |
916 | 1130 | virtual void _addSupportedAtoms(std::vector<Atom>& atoms); | 1171 | virtual void _leaveShowDesktopMode (CompWindow *); |
917 | 1172 | virtual void _addSupportedAtoms (std::vector<Atom>& atoms); | ||
918 | 1131 | 1173 | ||
930 | 1132 | // These are stubs - but allow mocking of AbstractCompWindow | 1174 | // These are stubs - but allow mocking of AbstractCompWindow |
931 | 1133 | virtual void _fileWatchAdded(CompFileWatch *); | 1175 | virtual void _fileWatchAdded (CompFileWatch *); |
932 | 1134 | virtual void _fileWatchRemoved(CompFileWatch *); | 1176 | virtual void _fileWatchRemoved (CompFileWatch *); |
933 | 1135 | virtual void _sessionEvent(CompSession::Event, CompOption::Vector &); | 1177 | virtual void _sessionEvent (CompSession::Event , |
934 | 1136 | virtual void _handleCompizEvent(const char *, const char *, CompOption::Vector &); | 1178 | CompOption::Vector &); |
935 | 1137 | virtual bool _fileToImage(CompString &, CompSize &, int &, void *&); | 1179 | virtual void _handleCompizEvent (const char *, |
936 | 1138 | virtual bool _imageToFile(CompString &, CompString &, CompSize &, int, void *); | 1180 | const char *, |
937 | 1139 | virtual CompMatch::Expression * _matchInitExp(const CompString&); | 1181 | CompOption::Vector &); |
938 | 1140 | virtual void _matchExpHandlerChanged(); | 1182 | virtual bool _fileToImage (CompString &, |
939 | 1141 | virtual void _matchPropertyChanged(CompWindow *); | 1183 | CompSize &, |
940 | 1142 | virtual void _outputChangeNotify(); | 1184 | int &, |
941 | 1185 | void *&); | ||
942 | 1186 | virtual bool _imageToFile (CompString &, | ||
943 | 1187 | CompString &, | ||
944 | 1188 | CompSize &, | ||
945 | 1189 | int , | ||
946 | 1190 | void *); | ||
947 | 1191 | virtual CompMatch::Expression * _matchInitExp (const CompString &); | ||
948 | 1192 | virtual void _matchExpHandlerChanged (); | ||
949 | 1193 | virtual void _matchPropertyChanged (CompWindow *); | ||
950 | 1194 | virtual void _outputChangeNotify (); | ||
951 | 1143 | 1195 | ||
952 | 1144 | void grabServer (); | 1196 | void grabServer (); |
953 | 1145 | void ungrabServer (); | 1197 | void ungrabServer (); |
954 | 1146 | void syncServer (); | 1198 | void syncServer (); |
955 | 1147 | 1199 | ||
957 | 1148 | bool handlePingTimeout(); | 1200 | bool handlePingTimeout(); |
958 | 1149 | 1201 | ||
963 | 1150 | Window below; | 1202 | Window below; |
964 | 1151 | CompTimer autoRaiseTimer_; | 1203 | CompTimer autoRaiseTimer_; |
965 | 1152 | Window autoRaiseWindow_; | 1204 | Window autoRaiseWindow_; |
966 | 1153 | CompIcon *defaultIcon_; | 1205 | CompIcon *defaultIcon_; |
967 | 1154 | compiz::private_screen::GrabManager mutable grabManager; | 1206 | compiz::private_screen::GrabManager mutable grabManager; |
973 | 1155 | ValueHolder valueHolder; | 1207 | ValueHolder valueHolder; |
974 | 1156 | bool eventHandled; | 1208 | bool eventHandled; |
975 | 1157 | PrivateScreen privateScreen; | 1209 | PrivateScreen privateScreen; |
976 | 1158 | compiz::private_screen::WindowManager windowManager; | 1210 | compiz::private_screen::WindowManager windowManager; |
977 | 1159 | unsigned int showingDesktopMask_; | 1211 | unsigned int showingDesktopMask_; |
978 | 1160 | }; | 1212 | }; |
979 | 1161 | 1213 | ||
980 | 1162 | #endif | 1214 | #endif |