Merge lp:~alan-griffiths/compiz-core/reduce-use-of-privatescreen into lp:compiz-core/0.9.8
- reduce-use-of-privatescreen
- Merge into 0.9.8
Proposed by
Alan Griffiths
Status: | Merged |
---|---|
Merged at revision: | 3135 |
Proposed branch: | lp:~alan-griffiths/compiz-core/reduce-use-of-privatescreen |
Merge into: | lp:compiz-core/0.9.8 |
Prerequisite: | lp:~alan-griffiths/compiz-core/move-stuff-to-CompScreenImpl |
Diff against target: |
2254 lines (+450/-405) 12 files modified
include/core/screen.h (+29/-20) src/action.cpp (+0/-1) src/event.cpp (+68/-68) src/eventsource.cpp (+2/-1) src/modifierhandler.cpp (+0/-1) src/plugin.cpp (+4/-4) src/privateeventsource.h (+4/-0) src/privatescreen.h (+24/-80) src/privatescreen/tests/test-privatescreen.cpp (+23/-2) src/privatewindow.h (+71/-1) src/screen.cpp (+220/-222) src/window.cpp (+5/-5) |
To merge this branch: | bzr merge lp:~alan-griffiths/compiz-core/reduce-use-of-privatescreen |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sam Spilsbury | Approve | ||
Review via email: mp+105322@code.launchpad.net |
Commit message
Description of the change
PrivateScreen et alia made an implementation detail of CompScreenImpl.
Remove inclusion of privatescreen.h where no longer needed.
To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'include/core/screen.h' |
2 | --- include/core/screen.h 2012-05-10 13:05:24 +0000 |
3 | +++ include/core/screen.h 2012-05-10 13:05:24 +0000 |
4 | @@ -68,6 +68,16 @@ |
5 | #define NOTIFY_MOVE_MASK (1 << 2) |
6 | #define NOTIFY_MODIFY_MASK (1 << 3) |
7 | |
8 | +#define SCREEN_EDGE_LEFT 0 |
9 | +#define SCREEN_EDGE_RIGHT 1 |
10 | +#define SCREEN_EDGE_TOP 2 |
11 | +#define SCREEN_EDGE_BOTTOM 3 |
12 | +#define SCREEN_EDGE_TOPLEFT 4 |
13 | +#define SCREEN_EDGE_TOPRIGHT 5 |
14 | +#define SCREEN_EDGE_BOTTOMLEFT 6 |
15 | +#define SCREEN_EDGE_BOTTOMRIGHT 7 |
16 | +#define SCREEN_EDGE_NUM 8 |
17 | + |
18 | typedef boost::function<void (short int)> FdWatchCallBack; |
19 | typedef boost::function<void (const char *)> FileWatchCallBack; |
20 | |
21 | @@ -329,39 +339,38 @@ |
22 | // Replacements for friends accessing priv. They are declared virtual to |
23 | // ensure the ABI is stable if/when they are moved to CompScreenImpl. |
24 | // They are only intended for use within compiz-core |
25 | - virtual bool displayInitialised() const; |
26 | + virtual bool displayInitialised() const = 0; |
27 | virtual void updatePassiveKeyGrabs () const = 0; |
28 | - virtual void applyStartupProperties (CompWindow *window); |
29 | - virtual void updateClientList(); |
30 | - virtual Window getTopWindow() const; |
31 | - virtual CoreOptions& getCoreOptions(); |
32 | - virtual Colormap colormap() const; |
33 | - virtual void setCurrentDesktop (unsigned int desktop); |
34 | - virtual Window activeWindow() const; |
35 | + virtual void applyStartupProperties (CompWindow *window) = 0; |
36 | + virtual void updateClientList() = 0; |
37 | + virtual Window getTopWindow() const = 0; |
38 | + virtual CoreOptions& getCoreOptions() = 0; |
39 | + virtual Colormap colormap() const = 0; |
40 | + virtual void setCurrentDesktop (unsigned int desktop) = 0; |
41 | + virtual Window activeWindow() const = 0; |
42 | virtual void updatePassiveButtonGrabs(Window serverFrame) = 0; |
43 | - virtual bool grabWindowIsNot(Window w) const; |
44 | - virtual void incrementPendingDestroys(); |
45 | + virtual bool grabWindowIsNot(Window w) const = 0; |
46 | + virtual void incrementPendingDestroys() = 0; |
47 | virtual void incrementDesktopWindowCount() = 0; |
48 | virtual void decrementDesktopWindowCount() = 0; |
49 | virtual unsigned int nextMapNum() = 0; |
50 | virtual unsigned int lastPing () const = 0; |
51 | - virtual void setNextActiveWindow(Window id); |
52 | - virtual Window getNextActiveWindow() const; |
53 | - virtual CompWindow * focusTopMostWindow (); |
54 | + virtual void setNextActiveWindow(Window id) = 0; |
55 | + virtual Window getNextActiveWindow() const = 0; |
56 | + virtual CompWindow * focusTopMostWindow () = 0; |
57 | |
58 | - virtual int getWmState (Window id); |
59 | - virtual void setWmState (int state, Window id) const; |
60 | + virtual int getWmState (Window id) = 0; |
61 | + virtual void setWmState (int state, Window id) const = 0; |
62 | virtual void getMwmHints (Window id, |
63 | unsigned int *func, |
64 | - unsigned int *decor) const; |
65 | - virtual unsigned int getProtocols (Window id); |
66 | - virtual unsigned int getWindowType (Window id); |
67 | - virtual unsigned int getWindowState (Window id); |
68 | + unsigned int *decor) const = 0; |
69 | + virtual unsigned int getProtocols (Window id) = 0; |
70 | + virtual unsigned int getWindowType (Window id) = 0; |
71 | + virtual unsigned int getWindowState (Window id) = 0; |
72 | // End of "internal use only" functions |
73 | |
74 | protected: |
75 | CompScreen(); |
76 | - boost::scoped_ptr<PrivateScreen> priv; |
77 | |
78 | private: |
79 | // The "wrapable" functions delegate to these (for mocking) |
80 | |
81 | === modified file 'src/action.cpp' |
82 | --- src/action.cpp 2012-02-16 01:11:23 +0000 |
83 | +++ src/action.cpp 2012-05-10 13:05:24 +0000 |
84 | @@ -32,7 +32,6 @@ |
85 | #include <core/action.h> |
86 | #include <core/screen.h> |
87 | #include "privateaction.h" |
88 | -#include "privatescreen.h" |
89 | |
90 | struct _Modifier { |
91 | const char *name; |
92 | |
93 | === modified file 'src/event.cpp' |
94 | --- src/event.cpp 2012-05-10 13:05:24 +0000 |
95 | +++ src/event.cpp 2012-05-10 13:05:24 +0000 |
96 | @@ -1048,7 +1048,7 @@ |
97 | */ |
98 | |
99 | if (event->type == ButtonPress || event->type == KeyPress) |
100 | - priv->eventManager.resetPossibleTap(); |
101 | + privateScreen.eventManager.resetPossibleTap(); |
102 | |
103 | eventHandled = true; // if we return inside WRAPABLE_HND_FUNCTN |
104 | |
105 | @@ -1061,12 +1061,12 @@ |
106 | if (keyEvent) |
107 | { |
108 | int mode = eventHandled ? AsyncKeyboard : ReplayKeyboard; |
109 | - XAllowEvents (priv->dpy, mode, event->xkey.time); |
110 | + XAllowEvents (privateScreen.dpy, mode, event->xkey.time); |
111 | } |
112 | |
113 | - if (priv->eventManager.grabsEmpty () && event->type == KeyPress) |
114 | + if (privateScreen.eventManager.grabsEmpty () && event->type == KeyPress) |
115 | { |
116 | - XUngrabKeyboard (priv->dpy, event->xkey.time); |
117 | + XUngrabKeyboard (privateScreen.dpy, event->xkey.time); |
118 | } |
119 | } |
120 | |
121 | @@ -1082,40 +1082,40 @@ |
122 | |
123 | switch (event->type) { |
124 | case ButtonPress: |
125 | - if (event->xbutton.root == priv->rootWindow()) |
126 | - priv->outputDevices.setCurrentOutput ( |
127 | + if (event->xbutton.root == privateScreen.rootWindow()) |
128 | + privateScreen.outputDevices.setCurrentOutput ( |
129 | outputDeviceForPoint (event->xbutton.x_root, |
130 | event->xbutton.y_root)); |
131 | break; |
132 | case MotionNotify: |
133 | - if (event->xmotion.root == priv->rootWindow()) |
134 | - priv->outputDevices.setCurrentOutput ( |
135 | + if (event->xmotion.root == privateScreen.rootWindow()) |
136 | + privateScreen.outputDevices.setCurrentOutput ( |
137 | outputDeviceForPoint (event->xmotion.x_root, |
138 | event->xmotion.y_root)); |
139 | break; |
140 | case KeyPress: |
141 | - w = findWindow (priv->orphanData.activeWindow); |
142 | + w = findWindow (privateScreen.orphanData.activeWindow); |
143 | if (w) |
144 | - priv->outputDevices.setCurrentOutput (w->outputDevice ()); |
145 | + privateScreen.outputDevices.setCurrentOutput (w->outputDevice ()); |
146 | break; |
147 | default: |
148 | break; |
149 | } |
150 | |
151 | - eventHandled = priv->handleActionEvent (event); |
152 | + eventHandled = privateScreen.handleActionEvent (event); |
153 | if (eventHandled) |
154 | { |
155 | - if (priv->eventManager.grabsEmpty ()) |
156 | - XAllowEvents (priv->dpy, AsyncPointer, event->xbutton.time); |
157 | + if (privateScreen.eventManager.grabsEmpty ()) |
158 | + XAllowEvents (privateScreen.dpy, AsyncPointer, event->xbutton.time); |
159 | return; |
160 | } |
161 | |
162 | switch (event->type) { |
163 | case SelectionRequest: |
164 | - priv->handleSelectionRequest (event); |
165 | + privateScreen.handleSelectionRequest (event); |
166 | break; |
167 | case SelectionClear: |
168 | - priv->handleSelectionClear (event); |
169 | + privateScreen.handleSelectionClear (event); |
170 | break; |
171 | case ConfigureNotify: |
172 | w = findWindow (event->xconfigure.window); |
173 | @@ -1132,8 +1132,8 @@ |
174 | w->priv->configureFrame (&event->xconfigure); |
175 | else |
176 | { |
177 | - if (event->xconfigure.window == priv->rootWindow()) |
178 | - priv->configure (&event->xconfigure); |
179 | + if (event->xconfigure.window == privateScreen.rootWindow()) |
180 | + privateScreen.configure (&event->xconfigure); |
181 | } |
182 | } |
183 | break; |
184 | @@ -1145,8 +1145,8 @@ |
185 | * the window to the window list as we might get configure requests |
186 | * which require us to stack other windows relative to it. Setting |
187 | * some default values if this is the case. */ |
188 | - if (!XGetWindowAttributes (priv->dpy, event->xcreatewindow.window, &wa)) |
189 | - priv->setDefaultWindowAttributes (&wa); |
190 | + if (!XGetWindowAttributes (privateScreen.dpy, event->xcreatewindow.window, &wa)) |
191 | + privateScreen.setDefaultWindowAttributes (&wa); |
192 | |
193 | foreach (CompWindow *w, screen->windows ()) |
194 | { |
195 | @@ -1189,12 +1189,12 @@ |
196 | * for FocusChangeMask. Also, we don't want to |
197 | * manage it straight away - in reality we want |
198 | * that to wait until the map request */ |
199 | - if ((wa.root == priv->rootWindow())) |
200 | + if ((wa.root == privateScreen.rootWindow())) |
201 | { |
202 | PrivateWindow::createCompWindow (getTopWindow (), wa, event->xcreatewindow.window); |
203 | } |
204 | else |
205 | - XSelectInput (priv->dpy, event->xcreatewindow.window, |
206 | + XSelectInput (privateScreen.dpy, event->xcreatewindow.window, |
207 | FocusChangeMask); |
208 | } |
209 | else |
210 | @@ -1253,7 +1253,7 @@ |
211 | /* been shaded */ |
212 | if (w->shaded ()) |
213 | { |
214 | - if (w->id () == priv->orphanData.activeWindow) |
215 | + if (w->id () == privateScreen.orphanData.activeWindow) |
216 | w->moveInputFocusTo (); |
217 | } |
218 | |
219 | @@ -1282,7 +1282,7 @@ |
220 | w->priv->minimized = false; |
221 | w->changeState (w->state () & ~CompWindowStateHiddenMask); |
222 | |
223 | - priv->updateClientList (); |
224 | + privateScreen.updateClientList (); |
225 | w->priv->withdraw (); |
226 | } |
227 | /* Closing: |
228 | @@ -1318,14 +1318,14 @@ |
229 | * we need to track it */ |
230 | if (!w) |
231 | { |
232 | - if (event->xreparent.parent == priv->rootWindow()) |
233 | + if (event->xreparent.parent == privateScreen.rootWindow()) |
234 | { |
235 | /* Failure means that window has been destroyed. We still have to add |
236 | * the window to the window list as we might get configure requests |
237 | * which require us to stack other windows relative to it. Setting |
238 | * some default values if this is the case. */ |
239 | - if (!XGetWindowAttributes (priv->dpy, event->xcreatewindow.window, &wa)) |
240 | - priv->setDefaultWindowAttributes (&wa); |
241 | + if (!XGetWindowAttributes (privateScreen.dpy, event->xcreatewindow.window, &wa)) |
242 | + privateScreen.setDefaultWindowAttributes (&wa); |
243 | |
244 | PrivateWindow::createCompWindow (getTopWindow (), wa, event->xcreatewindow.window); |
245 | break; |
246 | @@ -1356,14 +1356,14 @@ |
247 | if (w) |
248 | { |
249 | if ((w->priv->wrapper && event->xreparent.parent != w->priv->wrapper) || |
250 | - (!w->priv->wrapper && event->xreparent.parent != priv->rootWindow ())) |
251 | + (!w->priv->wrapper && event->xreparent.parent != privateScreen.rootWindow ())) |
252 | { |
253 | w->moveInputFocusToOtherWindow (); |
254 | w->destroy (); |
255 | |
256 | - XSelectInput (priv->dpy, w->id (), NoEventMask); |
257 | - XShapeSelectInput (priv->dpy, w->id (), NoEventMask); |
258 | - XUngrabButton (priv->dpy, AnyButton, AnyModifier, w->id ()); |
259 | + XSelectInput (privateScreen.dpy, w->id (), NoEventMask); |
260 | + XShapeSelectInput (privateScreen.dpy, w->id (), NoEventMask); |
261 | + XUngrabButton (privateScreen.dpy, AnyButton, AnyModifier, w->id ()); |
262 | } |
263 | } |
264 | |
265 | @@ -1381,20 +1381,20 @@ |
266 | w = findTopLevelWindow (event->xbutton.window); |
267 | if (w) |
268 | { |
269 | - if (priv->optionGetRaiseOnClick ()) |
270 | + if (privateScreen.optionGetRaiseOnClick ()) |
271 | { |
272 | w->updateAttributes (CompStackingUpdateModeAboveFullscreen); |
273 | } |
274 | |
275 | - if (w->id () != priv->orphanData.activeWindow) |
276 | + if (w->id () != privateScreen.orphanData.activeWindow) |
277 | if (!(w->type () & CompWindowTypeDockMask)) |
278 | if (w->focus ()) |
279 | w->moveInputFocusTo (); |
280 | } |
281 | } |
282 | |
283 | - if (priv->eventManager.grabsEmpty ()) |
284 | - XAllowEvents (priv->dpy, ReplayPointer, event->xbutton.time); |
285 | + if (privateScreen.eventManager.grabsEmpty ()) |
286 | + XAllowEvents (privateScreen.dpy, ReplayPointer, event->xbutton.time); |
287 | |
288 | break; |
289 | case PropertyNotify: |
290 | @@ -1426,7 +1426,7 @@ |
291 | CompWindowTypeDesktopMask)) |
292 | w->setDesktop (0xffffffff); |
293 | |
294 | - priv->updateClientList (); |
295 | + privateScreen.updateClientList (); |
296 | |
297 | matchPropertyChanged (w); |
298 | } |
299 | @@ -1582,7 +1582,7 @@ |
300 | |
301 | wState = CompWindow::constrainWindowState (wState, |
302 | w->actions ()); |
303 | - if (w->id () == priv->orphanData.activeWindow) |
304 | + if (w->id () == privateScreen.orphanData.activeWindow) |
305 | wState &= ~CompWindowStateDemandsAttentionMask; |
306 | |
307 | if (wState != w->state ()) |
308 | @@ -1624,7 +1624,7 @@ |
309 | } |
310 | else if (event->xclient.message_type == Atoms::desktopGeometry) |
311 | { |
312 | - if (event->xclient.window == priv->rootWindow()) |
313 | + if (event->xclient.window == privateScreen.rootWindow()) |
314 | { |
315 | CompOption::Value value; |
316 | |
317 | @@ -1729,7 +1729,7 @@ |
318 | } |
319 | else if (event->xclient.message_type == Atoms::showingDesktop) |
320 | { |
321 | - if (event->xclient.window == priv->rootWindow() || |
322 | + if (event->xclient.window == privateScreen.rootWindow() || |
323 | event->xclient.window == None) |
324 | { |
325 | if (event->xclient.data.l[0]) |
326 | @@ -1740,7 +1740,7 @@ |
327 | } |
328 | else if (event->xclient.message_type == Atoms::numberOfDesktops) |
329 | { |
330 | - if (event->xclient.window == priv->rootWindow()) |
331 | + if (event->xclient.window == privateScreen.rootWindow()) |
332 | { |
333 | CompOption::Value value; |
334 | |
335 | @@ -1751,8 +1751,8 @@ |
336 | } |
337 | else if (event->xclient.message_type == Atoms::currentDesktop) |
338 | { |
339 | - if (event->xclient.window == priv->rootWindow()) |
340 | - priv->setCurrentDesktop (event->xclient.data.l[0]); |
341 | + if (event->xclient.window == privateScreen.rootWindow()) |
342 | + privateScreen.setCurrentDesktop (event->xclient.data.l[0]); |
343 | } |
344 | else if (event->xclient.message_type == Atoms::winDesktop) |
345 | { |
346 | @@ -1789,7 +1789,7 @@ |
347 | |
348 | /* We should check the override_redirect flag here, because the |
349 | client might have changed it while being unmapped. */ |
350 | - if (XGetWindowAttributes (priv->dpy, w->id (), &attr)) |
351 | + if (XGetWindowAttributes (privateScreen.dpy, w->id (), &attr)) |
352 | w->priv->setOverrideRedirect (attr.override_redirect != 0); |
353 | |
354 | if (w->state () & CompWindowStateHiddenMask) |
355 | @@ -1805,7 +1805,7 @@ |
356 | } |
357 | else |
358 | { |
359 | - XMapWindow (priv->dpy, event->xmaprequest.window); |
360 | + XMapWindow (privateScreen.dpy, event->xmaprequest.window); |
361 | } |
362 | break; |
363 | case ConfigureRequest: |
364 | @@ -1888,7 +1888,7 @@ |
365 | w->configureXWindow (xwcm, &xwc); |
366 | } |
367 | else |
368 | - XConfigureWindow (priv->dpy, event->xconfigurerequest.window, |
369 | + XConfigureWindow (privateScreen.dpy, event->xconfigurerequest.window, |
370 | xwcm, &xwc); |
371 | } |
372 | break; |
373 | @@ -1896,8 +1896,8 @@ |
374 | break; |
375 | case FocusIn: |
376 | { |
377 | - if (!XGetWindowAttributes (priv->dpy, event->xfocus.window, &wa)) |
378 | - priv->setDefaultWindowAttributes (&wa); |
379 | + if (!XGetWindowAttributes (privateScreen.dpy, event->xfocus.window, &wa)) |
380 | + privateScreen.setDefaultWindowAttributes (&wa); |
381 | |
382 | /* If the call to XGetWindowAttributes failed it means |
383 | * the window was destroyed, so track the focus change |
384 | @@ -1907,12 +1907,12 @@ |
385 | * there |
386 | */ |
387 | |
388 | - if (wa.root == priv->rootWindow()) |
389 | + if (wa.root == privateScreen.rootWindow()) |
390 | { |
391 | if (event->xfocus.mode == NotifyGrab) |
392 | - priv->eventManager.grabNotified (); |
393 | + privateScreen.eventManager.grabNotified (); |
394 | else if (event->xfocus.mode == NotifyUngrab) |
395 | - priv->eventManager.ungrabNotified (); |
396 | + privateScreen.eventManager.ungrabNotified (); |
397 | else |
398 | { |
399 | CompWindowList dockWindows; |
400 | @@ -1927,11 +1927,11 @@ |
401 | if (getNextActiveWindow() == event->xfocus.window) |
402 | setNextActiveWindow(None); |
403 | |
404 | - if (w->id () != priv->orphanData.activeWindow) |
405 | + if (w->id () != privateScreen.orphanData.activeWindow) |
406 | { |
407 | - CompWindow *active = screen->findWindow (priv->orphanData.activeWindow); |
408 | + CompWindow *active = screen->findWindow (privateScreen.orphanData.activeWindow); |
409 | |
410 | - priv->orphanData.activeWindow = w->id (); |
411 | + privateScreen.orphanData.activeWindow = w->id (); |
412 | w->priv->activeNum = history.nextActiveNum(); |
413 | |
414 | if (active) |
415 | @@ -1990,10 +1990,10 @@ |
416 | |
417 | history.addToCurrentActiveWindowHistory (w->id ()); |
418 | |
419 | - XChangeProperty (priv->dpy , priv->rootWindow(), |
420 | + XChangeProperty (privateScreen.dpy , privateScreen.rootWindow(), |
421 | Atoms::winActive, |
422 | XA_WINDOW, 32, PropModeReplace, |
423 | - (unsigned char *) &priv->orphanData.activeWindow, 1); |
424 | + (unsigned char *) &privateScreen.orphanData.activeWindow, 1); |
425 | |
426 | w->windowNotify (CompWindowNotifyFocusChange); |
427 | } |
428 | @@ -2001,7 +2001,7 @@ |
429 | state &= ~CompWindowStateDemandsAttentionMask; |
430 | w->changeState (state); |
431 | } |
432 | - else if (event->xfocus.window == priv->rootWindow()) |
433 | + else if (event->xfocus.window == privateScreen.rootWindow()) |
434 | { |
435 | /* Don't ever let the focus go to the root |
436 | * window except in grab cases |
437 | @@ -2015,7 +2015,7 @@ |
438 | (event->xfocus.mode == NotifyNormal && |
439 | event->xfocus.detail == NotifyInferior)) |
440 | { |
441 | - priv->orphanData.activeWindow = None; |
442 | + privateScreen.orphanData.activeWindow = None; |
443 | |
444 | if (event->xfocus.detail == NotifyDetailNone || |
445 | (event->xfocus.mode == NotifyNormal && |
446 | @@ -2055,10 +2055,10 @@ |
447 | { |
448 | CompWindow *w; |
449 | |
450 | - w = screen->findWindow (priv->orphanData.activeWindow); |
451 | + w = screen->findWindow (privateScreen.orphanData.activeWindow); |
452 | |
453 | setNextActiveWindow(None); |
454 | - priv->orphanData.activeWindow = None; |
455 | + privateScreen.orphanData.activeWindow = None; |
456 | |
457 | if (w) |
458 | w->priv->updatePassiveButtonGrabs (); |
459 | @@ -2067,10 +2067,10 @@ |
460 | break; |
461 | case FocusOut: |
462 | if (event->xfocus.mode == NotifyUngrab) |
463 | - priv->eventManager.ungrabNotified (); |
464 | + privateScreen.eventManager.ungrabNotified (); |
465 | break; |
466 | case EnterNotify: |
467 | - if (event->xcrossing.root == priv->rootWindow()) |
468 | + if (event->xcrossing.root == privateScreen.rootWindow()) |
469 | w = findTopLevelWindow (event->xcrossing.window); |
470 | else |
471 | w = NULL; |
472 | @@ -2079,16 +2079,16 @@ |
473 | { |
474 | below = w->id (); |
475 | |
476 | - if (!priv->optionGetClickToFocus () && |
477 | - priv->eventManager.grabsEmpty () && |
478 | + if (!privateScreen.optionGetClickToFocus () && |
479 | + privateScreen.eventManager.grabsEmpty () && |
480 | event->xcrossing.mode != NotifyGrab && |
481 | event->xcrossing.detail != NotifyInferior) |
482 | { |
483 | bool raise; |
484 | int delay; |
485 | |
486 | - raise = priv->optionGetAutoraise (); |
487 | - delay = priv->optionGetAutoraiseDelay (); |
488 | + raise = privateScreen.optionGetAutoraise (); |
489 | + delay = privateScreen.optionGetAutoraiseDelay (); |
490 | |
491 | if (autoRaiseTimer_.active () && |
492 | autoRaiseWindow_ != w->id ()) |
493 | @@ -2130,8 +2130,8 @@ |
494 | } |
495 | break; |
496 | default: |
497 | - if (priv->xShape.isEnabled () && |
498 | - event->type == priv->xShape.get () + ShapeNotify) |
499 | + if (privateScreen.xShape.isEnabled () && |
500 | + event->type == privateScreen.xShape.get () + ShapeNotify) |
501 | { |
502 | w = findWindow (((XShapeEvent *) event)->window); |
503 | if (w) |
504 | @@ -2140,14 +2140,14 @@ |
505 | w->priv->updateRegion (); |
506 | } |
507 | } |
508 | - else if (event->type == priv->xSync.get () + XSyncAlarmNotify) |
509 | + else if (event->type == privateScreen.xSync.get () + XSyncAlarmNotify) |
510 | { |
511 | XSyncAlarmNotifyEvent *sa; |
512 | |
513 | sa = (XSyncAlarmNotifyEvent *) event; |
514 | |
515 | |
516 | - for (cps::WindowManager::iterator i = priv->windowManager.begin(); i != priv->windowManager.end(); ++i) |
517 | + for (cps::WindowManager::iterator i = privateScreen.windowManager.begin(); i != privateScreen.windowManager.end(); ++i) |
518 | { |
519 | CompWindow* const w(*i); |
520 | if (w->priv->syncAlarm == sa->alarm) |
521 | |
522 | === modified file 'src/eventsource.cpp' |
523 | --- src/eventsource.cpp 2012-02-06 17:28:43 +0000 |
524 | +++ src/eventsource.cpp 2012-05-10 13:05:24 +0000 |
525 | @@ -24,7 +24,8 @@ |
526 | * : Sam Spilsbury <sam.spilsbury@canonical.com> |
527 | */ |
528 | |
529 | -#include "privatescreen.h" |
530 | +#include "privateeventsource.h" |
531 | +#include "core/screen.h" |
532 | |
533 | CompEventSource * |
534 | CompEventSource::create () |
535 | |
536 | === modified file 'src/modifierhandler.cpp' |
537 | --- src/modifierhandler.cpp 2012-05-10 13:05:24 +0000 |
538 | +++ src/modifierhandler.cpp 2012-05-10 13:05:24 +0000 |
539 | @@ -27,7 +27,6 @@ |
540 | */ |
541 | |
542 | #include <core/screen.h> |
543 | -#include "privatescreen.h" |
544 | #include "privatewindow.h" |
545 | |
546 | const unsigned int ModifierHandler::virtualModMask[7] = { |
547 | |
548 | === modified file 'src/plugin.cpp' |
549 | --- src/plugin.cpp 2012-05-03 11:52:28 +0000 |
550 | +++ src/plugin.cpp 2012-05-10 13:05:24 +0000 |
551 | @@ -330,8 +330,8 @@ |
552 | WindowManager::iterator it, fail; |
553 | CompWindow *w; |
554 | |
555 | - it = fail = priv->windowManager.begin (); |
556 | - for (;it != priv->windowManager.end (); it++) |
557 | + it = fail = privateScreen.windowManager.begin (); |
558 | + for (;it != privateScreen.windowManager.end (); it++) |
559 | { |
560 | w = *it; |
561 | if (!p->vTable->initWindow (w)) |
562 | @@ -344,7 +344,7 @@ |
563 | } |
564 | } |
565 | |
566 | - it = priv->windowManager.begin (); |
567 | + it = privateScreen.windowManager.begin (); |
568 | for (;it != fail; it++) |
569 | { |
570 | w = *it; |
571 | @@ -366,7 +366,7 @@ |
572 | { |
573 | using compiz::private_screen::WindowManager; |
574 | |
575 | - for (WindowManager::iterator i = priv->windowManager.begin(); i != priv->windowManager.end(); ++i) |
576 | + for (WindowManager::iterator i = privateScreen.windowManager.begin(); i != privateScreen.windowManager.end(); ++i) |
577 | { |
578 | CompWindow* const w(*i); |
579 | p->vTable->finiWindow (w); |
580 | |
581 | === modified file 'src/privateeventsource.h' |
582 | --- src/privateeventsource.h 2012-01-20 17:50:31 +0000 |
583 | +++ src/privateeventsource.h 2012-05-10 13:05:24 +0000 |
584 | @@ -26,6 +26,10 @@ |
585 | #ifndef _COMPIZ_PRIVATEEVENTSOURCE_H |
586 | #define _COMPIZ_PRIVATEEVENTSOURCE_H |
587 | |
588 | +#include <X11/Xlib.h> |
589 | +#include <glibmm/main.h> |
590 | + |
591 | + |
592 | class CompEventSource: |
593 | public Glib::Source |
594 | { |
595 | |
596 | === modified file 'src/privatescreen.h' |
597 | --- src/privatescreen.h 2012-05-10 13:05:24 +0000 |
598 | +++ src/privatescreen.h 2012-05-10 13:05:24 +0000 |
599 | @@ -116,16 +116,6 @@ |
600 | } CompDelayedEdgeSettings; |
601 | |
602 | |
603 | -#define SCREEN_EDGE_LEFT 0 |
604 | -#define SCREEN_EDGE_RIGHT 1 |
605 | -#define SCREEN_EDGE_TOP 2 |
606 | -#define SCREEN_EDGE_BOTTOM 3 |
607 | -#define SCREEN_EDGE_TOPLEFT 4 |
608 | -#define SCREEN_EDGE_TOPRIGHT 5 |
609 | -#define SCREEN_EDGE_BOTTOMLEFT 6 |
610 | -#define SCREEN_EDGE_BOTTOMRIGHT 7 |
611 | -#define SCREEN_EDGE_NUM 8 |
612 | - |
613 | struct CompScreenEdge { |
614 | Window id; |
615 | unsigned int count; |
616 | @@ -157,73 +147,6 @@ |
617 | }; |
618 | } |
619 | } |
620 | - |
621 | -namespace X11 |
622 | -{ |
623 | -class PendingEvent { |
624 | -public: |
625 | - PendingEvent (Display *, Window); |
626 | - virtual ~PendingEvent (); |
627 | - |
628 | - virtual bool match (XEvent *); |
629 | - unsigned int serial () { return mSerial; } // HACK: will be removed |
630 | - virtual void dump (); |
631 | - |
632 | - typedef boost::shared_ptr<PendingEvent> Ptr; |
633 | - |
634 | -protected: |
635 | - |
636 | - virtual Window getEventWindow (XEvent *); |
637 | - |
638 | - unsigned int mSerial; |
639 | - Window mWindow; |
640 | -}; |
641 | - |
642 | -class PendingConfigureEvent : |
643 | - public PendingEvent |
644 | -{ |
645 | -public: |
646 | - PendingConfigureEvent (Display *, Window, unsigned int, XWindowChanges *); |
647 | - virtual ~PendingConfigureEvent (); |
648 | - |
649 | - virtual bool match (XEvent *); |
650 | - bool matchVM (unsigned int valueMask); |
651 | - bool matchRequest (XWindowChanges &xwc, unsigned int); |
652 | - virtual void dump (); |
653 | - |
654 | - typedef boost::shared_ptr<PendingConfigureEvent> Ptr; |
655 | - |
656 | -protected: |
657 | - |
658 | - virtual Window getEventWindow (XEvent *); |
659 | - |
660 | -private: |
661 | - unsigned int mValueMask; |
662 | - XWindowChanges mXwc; |
663 | -}; |
664 | - |
665 | -class PendingEventQueue |
666 | -{ |
667 | -public: |
668 | - |
669 | - PendingEventQueue (Display *); |
670 | - virtual ~PendingEventQueue (); |
671 | - |
672 | - void add (PendingEvent::Ptr p); |
673 | - bool match (XEvent *); |
674 | - bool pending (); |
675 | - bool forEachIf (boost::function <bool (compiz::X11::PendingEvent::Ptr)>); |
676 | - void clear () { mEvents.clear (); } // HACK will be removed |
677 | - void dump (); |
678 | - |
679 | -protected: |
680 | - bool removeIfMatching (const PendingEvent::Ptr &p, XEvent *); |
681 | - |
682 | -private: |
683 | - std::list <PendingEvent::Ptr> mEvents; |
684 | -}; |
685 | - |
686 | -} |
687 | } |
688 | |
689 | namespace compiz |
690 | @@ -683,8 +606,6 @@ |
691 | |
692 | void disableEdge (int edge); |
693 | |
694 | - bool createFailed () const; |
695 | - |
696 | void setDefaultWindowAttributes (XWindowAttributes *); |
697 | |
698 | static void compScreenSnEvent (SnMonitorEvent *event, |
699 | @@ -1045,6 +966,28 @@ |
700 | virtual void updatePassiveButtonGrabs(Window serverFrame); |
701 | virtual unsigned int lastPing () const; |
702 | |
703 | + virtual bool displayInitialised() const; |
704 | + virtual void applyStartupProperties (CompWindow *window); |
705 | + virtual void updateClientList(); |
706 | + virtual Window getTopWindow() const; |
707 | + virtual CoreOptions& getCoreOptions(); |
708 | + virtual Colormap colormap() const; |
709 | + virtual void setCurrentDesktop (unsigned int desktop); |
710 | + virtual Window activeWindow() const; |
711 | + virtual bool grabWindowIsNot(Window w) const; |
712 | + virtual void incrementPendingDestroys(); |
713 | + virtual void setNextActiveWindow(Window id); |
714 | + virtual Window getNextActiveWindow() const; |
715 | + virtual CompWindow * focusTopMostWindow (); |
716 | + virtual int getWmState (Window id); |
717 | + virtual void setWmState (int state, Window id) const; |
718 | + virtual void getMwmHints (Window id, |
719 | + unsigned int *func, |
720 | + unsigned int *decor) const; |
721 | + virtual unsigned int getProtocols (Window id); |
722 | + virtual unsigned int getWindowType (Window id); |
723 | + virtual unsigned int getWindowState (Window id); |
724 | + |
725 | public : |
726 | |
727 | static bool showDesktop (CompAction *action, |
728 | @@ -1103,7 +1046,7 @@ |
729 | CompAction::State state, |
730 | CompOption::Vector &options); |
731 | |
732 | - bool createFailed () const { return priv->createFailed (); } |
733 | + bool createFailed () const; |
734 | |
735 | |
736 | private: |
737 | @@ -1141,6 +1084,7 @@ |
738 | compiz::private_screen::History history; |
739 | ValueHolder valueHolder; |
740 | bool eventHandled; |
741 | + PrivateScreen privateScreen; |
742 | }; |
743 | |
744 | #endif |
745 | |
746 | === modified file 'src/privatescreen/tests/test-privatescreen.cpp' |
747 | --- src/privatescreen/tests/test-privatescreen.cpp 2012-05-10 13:05:24 +0000 |
748 | +++ src/privatescreen/tests/test-privatescreen.cpp 2012-05-10 13:05:24 +0000 |
749 | @@ -29,8 +29,6 @@ |
750 | screen = 0; |
751 | } |
752 | |
753 | - using CompScreen::priv; |
754 | - |
755 | // Interface hoisted from CompScreen |
756 | MOCK_METHOD0(updateDefaultIcon, bool ()); |
757 | MOCK_METHOD0(dpy, Display * ()); |
758 | @@ -179,6 +177,29 @@ |
759 | MOCK_CONST_METHOD0(updatePassiveKeyGrabs, void ()); |
760 | MOCK_METHOD1(updatePassiveButtonGrabs, void (Window serverFrame)); |
761 | MOCK_CONST_METHOD0(lastPing, unsigned int ()); |
762 | + |
763 | + MOCK_CONST_METHOD0(displayInitialised, bool ()); |
764 | + MOCK_METHOD1(applyStartupProperties, void (CompWindow *window)); |
765 | + MOCK_METHOD0(updateClientList, void ()); |
766 | + MOCK_CONST_METHOD0(getTopWindow, Window ()); |
767 | + MOCK_METHOD0(getCoreOptions, CoreOptions& ()); |
768 | + MOCK_CONST_METHOD0(colormap, Colormap ()); |
769 | + MOCK_METHOD1(setCurrentDesktop, void (unsigned int desktop)); |
770 | + MOCK_CONST_METHOD0(activeWindow, Window ()); |
771 | + MOCK_CONST_METHOD1(grabWindowIsNot, bool (Window w)); |
772 | + MOCK_METHOD0(incrementPendingDestroys, void ()); |
773 | + MOCK_METHOD1(setNextActiveWindow, void (Window id)); |
774 | + MOCK_CONST_METHOD0(getNextActiveWindow, Window ()); |
775 | + MOCK_METHOD0(focusTopMostWindow, CompWindow* ()); |
776 | + |
777 | + MOCK_METHOD1(getWmState, int (Window id)); |
778 | + MOCK_CONST_METHOD2(setWmState, void (int state, Window id)); |
779 | + MOCK_CONST_METHOD3(getMwmHints, void (Window id, |
780 | + unsigned int *func, |
781 | + unsigned int *decor)); |
782 | + MOCK_METHOD1(getProtocols, unsigned int (Window id)); |
783 | + MOCK_METHOD1(getWindowType, unsigned int (Window id)); |
784 | + MOCK_METHOD1(getWindowState, unsigned int (Window id)); |
785 | }; |
786 | |
787 | class StubActivePluginsOption : public CoreOptions |
788 | |
789 | === modified file 'src/privatewindow.h' |
790 | --- src/privatewindow.h 2012-04-03 01:10:50 +0000 |
791 | +++ src/privatewindow.h 2012-05-10 13:05:24 +0000 |
792 | @@ -32,7 +32,77 @@ |
793 | #include <core/window.h> |
794 | #include <core/point.h> |
795 | #include <core/timer.h> |
796 | -#include "privatescreen.h" |
797 | + |
798 | +#include <boost/shared_ptr.hpp> |
799 | + |
800 | + |
801 | +namespace compiz {namespace X11 |
802 | +{ |
803 | +class PendingEvent { |
804 | +public: |
805 | + PendingEvent (Display *, Window); |
806 | + virtual ~PendingEvent (); |
807 | + |
808 | + virtual bool match (XEvent *); |
809 | + unsigned int serial () { return mSerial; } // HACK: will be removed |
810 | + virtual void dump (); |
811 | + |
812 | + typedef boost::shared_ptr<PendingEvent> Ptr; |
813 | + |
814 | +protected: |
815 | + |
816 | + virtual Window getEventWindow (XEvent *); |
817 | + |
818 | + unsigned int mSerial; |
819 | + Window mWindow; |
820 | +}; |
821 | + |
822 | +class PendingConfigureEvent : |
823 | + public PendingEvent |
824 | +{ |
825 | +public: |
826 | + PendingConfigureEvent (Display *, Window, unsigned int, XWindowChanges *); |
827 | + virtual ~PendingConfigureEvent (); |
828 | + |
829 | + virtual bool match (XEvent *); |
830 | + bool matchVM (unsigned int valueMask); |
831 | + bool matchRequest (XWindowChanges &xwc, unsigned int); |
832 | + virtual void dump (); |
833 | + |
834 | + typedef boost::shared_ptr<PendingConfigureEvent> Ptr; |
835 | + |
836 | +protected: |
837 | + |
838 | + virtual Window getEventWindow (XEvent *); |
839 | + |
840 | +private: |
841 | + unsigned int mValueMask; |
842 | + XWindowChanges mXwc; |
843 | +}; |
844 | + |
845 | +class PendingEventQueue |
846 | +{ |
847 | +public: |
848 | + |
849 | + PendingEventQueue (Display *); |
850 | + virtual ~PendingEventQueue (); |
851 | + |
852 | + void add (PendingEvent::Ptr p); |
853 | + bool match (XEvent *); |
854 | + bool pending (); |
855 | + bool forEachIf (boost::function <bool (compiz::X11::PendingEvent::Ptr)>); |
856 | + void clear () { mEvents.clear (); } // HACK will be removed |
857 | + void dump (); |
858 | + |
859 | +protected: |
860 | + bool removeIfMatching (const PendingEvent::Ptr &p, XEvent *); |
861 | + |
862 | +private: |
863 | + std::list <PendingEvent::Ptr> mEvents; |
864 | +}; |
865 | + |
866 | +}} |
867 | +struct CompGroup; |
868 | |
869 | typedef CompWindowExtents CompFullscreenMonitorSet; |
870 | |
871 | |
872 | === modified file 'src/screen.cpp' |
873 | --- src/screen.cpp 2012-05-10 13:05:24 +0000 |
874 | +++ src/screen.cpp 2012-05-10 13:05:24 +0000 |
875 | @@ -103,15 +103,15 @@ |
876 | |
877 | void CompScreenImpl::setWindowState (unsigned int state, Window id) |
878 | { |
879 | - priv->setWindowState (state, id); |
880 | + privateScreen.setWindowState (state, id); |
881 | } |
882 | |
883 | void CompScreenImpl::addToDestroyedWindows(CompWindow * cw) |
884 | { |
885 | - priv->windowManager.addToDestroyedWindows(cw); |
886 | + privateScreen.windowManager.addToDestroyedWindows(cw); |
887 | } |
888 | |
889 | -void CompScreenImpl::processEvents () { priv->processEvents (); } |
890 | +void CompScreenImpl::processEvents () { privateScreen.processEvents (); } |
891 | |
892 | unsigned int |
893 | CompScreen::allocPluginClassIndex () |
894 | @@ -154,7 +154,7 @@ |
895 | void |
896 | CompScreenImpl::eventLoop () |
897 | { |
898 | - priv->eventManager.startEventLoop (dpy()); |
899 | + privateScreen.eventManager.startEventLoop (dpy()); |
900 | } |
901 | |
902 | void |
903 | @@ -175,7 +175,7 @@ |
904 | int mask, |
905 | FileWatchCallBack callBack) |
906 | { |
907 | - CompFileWatch *fileWatch = priv->eventManager.addFileWatch (path, mask, callBack); |
908 | + CompFileWatch *fileWatch = privateScreen.eventManager.addFileWatch (path, mask, callBack); |
909 | |
910 | if (!fileWatch) |
911 | return 0; |
912 | @@ -211,7 +211,7 @@ |
913 | void |
914 | CompScreenImpl::removeFileWatch (CompFileWatchHandle handle) |
915 | { |
916 | - if (CompFileWatch* w = priv->eventManager.removeFileWatch (handle)) |
917 | + if (CompFileWatch* w = privateScreen.eventManager.removeFileWatch (handle)) |
918 | { |
919 | fileWatchRemoved (w); |
920 | |
921 | @@ -240,7 +240,7 @@ |
922 | const CompFileWatchList & |
923 | CompScreenImpl::getFileWatches () const |
924 | { |
925 | - return priv->eventManager.getFileWatches (); |
926 | + return privateScreen.eventManager.getFileWatches (); |
927 | } |
928 | |
929 | const CompFileWatchList & |
930 | @@ -279,7 +279,7 @@ |
931 | short int events, |
932 | FdWatchCallBack callBack) |
933 | { |
934 | - return priv->eventManager.addWatchFd (fd, events, callBack); |
935 | + return privateScreen.eventManager.addWatchFd (fd, events, callBack); |
936 | } |
937 | |
938 | CompWatchFdHandle |
939 | @@ -321,7 +321,7 @@ |
940 | void |
941 | CompScreenImpl::removeWatchFd (CompWatchFdHandle handle) |
942 | { |
943 | - priv->eventManager.removeWatchFd (handle); |
944 | + privateScreen.eventManager.removeWatchFd (handle); |
945 | } |
946 | |
947 | void |
948 | @@ -557,50 +557,50 @@ |
949 | Display * |
950 | CompScreenImpl::dpy () |
951 | { |
952 | - return priv->dpy; |
953 | + return privateScreen.dpy; |
954 | } |
955 | |
956 | bool |
957 | CompScreenImpl::XRandr () |
958 | { |
959 | - return priv->xRandr.isEnabled (); |
960 | + return privateScreen.xRandr.isEnabled (); |
961 | } |
962 | |
963 | int |
964 | CompScreenImpl::randrEvent () |
965 | { |
966 | - return priv->xRandr.get (); |
967 | + return privateScreen.xRandr.get (); |
968 | } |
969 | |
970 | bool |
971 | CompScreenImpl::XShape () |
972 | { |
973 | - return priv->xShape.isEnabled (); |
974 | + return privateScreen.xShape.isEnabled (); |
975 | } |
976 | |
977 | int |
978 | CompScreenImpl::shapeEvent () |
979 | { |
980 | - return priv->xShape.get (); |
981 | + return privateScreen.xShape.get (); |
982 | } |
983 | |
984 | int |
985 | CompScreenImpl::syncEvent () |
986 | { |
987 | - return priv->xSync.get (); |
988 | + return privateScreen.xSync.get (); |
989 | } |
990 | |
991 | |
992 | SnDisplay * |
993 | CompScreenImpl::snDisplay () |
994 | { |
995 | - return priv->getSnDisplay (); |
996 | + return privateScreen.getSnDisplay (); |
997 | } |
998 | |
999 | Window |
1000 | CompScreenImpl::activeWindow () |
1001 | { |
1002 | - return priv->orphanData.activeWindow; |
1003 | + return privateScreen.orphanData.activeWindow; |
1004 | } |
1005 | |
1006 | Window |
1007 | @@ -612,7 +612,7 @@ |
1008 | const char * |
1009 | CompScreenImpl::displayString () |
1010 | { |
1011 | - return priv->displayString (); |
1012 | + return privateScreen.displayString (); |
1013 | } |
1014 | |
1015 | void |
1016 | @@ -644,9 +644,9 @@ |
1017 | CompScreenImpl::handlePingTimeout () |
1018 | { |
1019 | return ping.handlePingTimeout( |
1020 | - priv->windowManager.begin(), |
1021 | - priv->windowManager.end(), |
1022 | - priv->dpy); |
1023 | + privateScreen.windowManager.begin(), |
1024 | + privateScreen.windowManager.end(), |
1025 | + privateScreen.dpy); |
1026 | } |
1027 | |
1028 | bool |
1029 | @@ -685,14 +685,14 @@ |
1030 | CompOption::Vector & |
1031 | CompScreenImpl::getOptions () |
1032 | { |
1033 | - return priv->getOptions (); |
1034 | + return privateScreen.getOptions (); |
1035 | } |
1036 | |
1037 | bool |
1038 | CompScreenImpl::setOption (const CompString &name, |
1039 | CompOption::Value &value) |
1040 | { |
1041 | - return priv->setOption (name, value); |
1042 | + return privateScreen.setOption (name, value); |
1043 | } |
1044 | |
1045 | bool |
1046 | @@ -1342,7 +1342,7 @@ |
1047 | } |
1048 | |
1049 | int |
1050 | -CompScreen::getWmState (Window id) |
1051 | +CompScreenImpl::getWmState (Window id) |
1052 | { |
1053 | Atom actual; |
1054 | int result, format; |
1055 | @@ -1350,7 +1350,7 @@ |
1056 | unsigned char *data; |
1057 | unsigned long state = NormalState; |
1058 | |
1059 | - result = XGetWindowProperty (priv->dpy, id, |
1060 | + result = XGetWindowProperty (privateScreen.dpy, id, |
1061 | Atoms::wmState, 0L, 2L, false, |
1062 | Atoms::wmState, &actual, &format, |
1063 | &n, &left, &data); |
1064 | @@ -1366,14 +1366,14 @@ |
1065 | } |
1066 | |
1067 | void |
1068 | -CompScreen::setWmState (int state, Window id) const |
1069 | +CompScreenImpl::setWmState (int state, Window id) const |
1070 | { |
1071 | unsigned long data[2]; |
1072 | |
1073 | data[0] = state; |
1074 | data[1] = None; |
1075 | |
1076 | - XChangeProperty (priv->dpy, id, |
1077 | + XChangeProperty (privateScreen.dpy, id, |
1078 | Atoms::wmState, Atoms::wmState, |
1079 | 32, PropModeReplace, (unsigned char *) data, 2); |
1080 | } |
1081 | @@ -1443,7 +1443,7 @@ |
1082 | } |
1083 | |
1084 | unsigned int |
1085 | -CompScreen::getWindowState (Window id) |
1086 | +CompScreenImpl::getWindowState (Window id) |
1087 | { |
1088 | Atom actual; |
1089 | int result, format; |
1090 | @@ -1451,7 +1451,7 @@ |
1091 | unsigned char *data; |
1092 | unsigned int state = 0; |
1093 | |
1094 | - result = XGetWindowProperty (priv->dpy, id, |
1095 | + result = XGetWindowProperty (privateScreen.dpy, id, |
1096 | Atoms::winState, |
1097 | 0L, 1024L, false, XA_ATOM, &actual, &format, |
1098 | &n, &left, &data); |
1099 | @@ -1519,14 +1519,14 @@ |
1100 | } |
1101 | |
1102 | unsigned int |
1103 | -CompScreen::getWindowType (Window id) |
1104 | +CompScreenImpl::getWindowType (Window id) |
1105 | { |
1106 | Atom actual, a = None; |
1107 | int result, format; |
1108 | unsigned long n, left; |
1109 | unsigned char *data; |
1110 | |
1111 | - result = XGetWindowProperty (priv->dpy , id, |
1112 | + result = XGetWindowProperty (privateScreen.dpy , id, |
1113 | Atoms::winType, |
1114 | 0L, 1L, false, XA_ATOM, &actual, &format, |
1115 | &n, &left, &data); |
1116 | @@ -1574,7 +1574,7 @@ |
1117 | } |
1118 | |
1119 | void |
1120 | -CompScreen::getMwmHints (Window id, |
1121 | +CompScreenImpl::getMwmHints (Window id, |
1122 | unsigned int *func, |
1123 | unsigned int *decor) const |
1124 | { |
1125 | @@ -1586,7 +1586,7 @@ |
1126 | *func = MwmFuncAll; |
1127 | *decor = MwmDecorAll; |
1128 | |
1129 | - result = XGetWindowProperty (priv->dpy, id, |
1130 | + result = XGetWindowProperty (privateScreen.dpy, id, |
1131 | Atoms::mwmHints, |
1132 | 0L, 20L, false, Atoms::mwmHints, |
1133 | &actual, &format, &n, &left, &data); |
1134 | @@ -1609,13 +1609,13 @@ |
1135 | } |
1136 | |
1137 | unsigned int |
1138 | -CompScreen::getProtocols (Window id) |
1139 | +CompScreenImpl::getProtocols (Window id) |
1140 | { |
1141 | Atom *protocol; |
1142 | int count; |
1143 | unsigned int protocols = 0; |
1144 | |
1145 | - if (XGetWMProtocols (priv->dpy, id, &protocol, &count)) |
1146 | + if (XGetWMProtocols (privateScreen.dpy, id, &protocol, &count)) |
1147 | { |
1148 | int i; |
1149 | |
1150 | @@ -1648,7 +1648,7 @@ |
1151 | unsigned char *data; |
1152 | unsigned int retval = defaultValue; |
1153 | |
1154 | - result = XGetWindowProperty (priv->dpy, id, property, |
1155 | + result = XGetWindowProperty (privateScreen.dpy, id, property, |
1156 | 0L, 1L, false, XA_CARDINAL, &actual, &format, |
1157 | &n, &left, &data); |
1158 | |
1159 | @@ -1674,7 +1674,7 @@ |
1160 | { |
1161 | unsigned long data = value; |
1162 | |
1163 | - XChangeProperty (priv->dpy, id, property, |
1164 | + XChangeProperty (privateScreen.dpy, id, property, |
1165 | XA_CARDINAL, 32, PropModeReplace, |
1166 | (unsigned char *) &data, 1); |
1167 | } |
1168 | @@ -1718,7 +1718,7 @@ |
1169 | { |
1170 | unsigned short result; |
1171 | |
1172 | - if (priv->readWindowProp32 (id, property, &result)) |
1173 | + if (privateScreen.readWindowProp32 (id, property, &result)) |
1174 | return result; |
1175 | |
1176 | return defaultValue; |
1177 | @@ -1733,7 +1733,7 @@ |
1178 | |
1179 | value32 = value << 16 | value; |
1180 | |
1181 | - XChangeProperty (priv->dpy, id, property, |
1182 | + XChangeProperty (privateScreen.dpy, id, property, |
1183 | XA_CARDINAL, 32, PropModeReplace, |
1184 | (unsigned char *) &value32, 1); |
1185 | } |
1186 | @@ -2569,12 +2569,12 @@ |
1187 | |
1188 | unsigned int CompScreenImpl::showingDesktopMask() const |
1189 | { |
1190 | - return priv->showingDesktopMask; |
1191 | + return privateScreen.showingDesktopMask; |
1192 | } |
1193 | |
1194 | bool CompScreenImpl::grabsEmpty() const |
1195 | { |
1196 | - return priv->eventManager.grabsEmpty(); |
1197 | + return privateScreen.eventManager.grabsEmpty(); |
1198 | } |
1199 | |
1200 | void |
1201 | @@ -2582,15 +2582,15 @@ |
1202 | { |
1203 | unsigned long data = 1; |
1204 | int count = 0; |
1205 | - bool st = priv->optionGetHideSkipTaskbarWindows (); |
1206 | + bool st = privateScreen.optionGetHideSkipTaskbarWindows (); |
1207 | |
1208 | - priv->showingDesktopMask = ~(CompWindowTypeDesktopMask | |
1209 | + privateScreen.showingDesktopMask = ~(CompWindowTypeDesktopMask | |
1210 | CompWindowTypeDockMask); |
1211 | |
1212 | - for (cps::WindowManager::iterator i = priv->windowManager.begin(); i != priv->windowManager.end(); ++i) |
1213 | + for (cps::WindowManager::iterator i = privateScreen.windowManager.begin(); i != privateScreen.windowManager.end(); ++i) |
1214 | { |
1215 | CompWindow* const w(*i); |
1216 | - if ((priv->showingDesktopMask & w->wmType ()) && |
1217 | + if ((privateScreen.showingDesktopMask & w->wmType ()) && |
1218 | (!(w->state () & CompWindowStateSkipTaskbarMask) || st)) |
1219 | { |
1220 | if (!w->inShowDesktopMode () && !w->grabbed () && |
1221 | @@ -2608,11 +2608,11 @@ |
1222 | |
1223 | if (!count) |
1224 | { |
1225 | - priv->showingDesktopMask = 0; |
1226 | + privateScreen.showingDesktopMask = 0; |
1227 | data = 0; |
1228 | } |
1229 | |
1230 | - XChangeProperty (priv->dpy, priv->rootWindow(), |
1231 | + XChangeProperty (privateScreen.dpy, privateScreen.rootWindow(), |
1232 | Atoms::showingDesktop, |
1233 | XA_CARDINAL, 32, PropModeReplace, |
1234 | (unsigned char *) &data, 1); |
1235 | @@ -2640,19 +2640,19 @@ |
1236 | window->priv->show (); |
1237 | |
1238 | /* return if some other window is still in show desktop mode */ |
1239 | - for (cps::WindowManager::iterator i = priv->windowManager.begin(); i != priv->windowManager.end(); ++i) |
1240 | + for (cps::WindowManager::iterator i = privateScreen.windowManager.begin(); i != privateScreen.windowManager.end(); ++i) |
1241 | { |
1242 | CompWindow* const w(*i); |
1243 | if (w->inShowDesktopMode ()) |
1244 | return; |
1245 | } |
1246 | - priv->showingDesktopMask = 0; |
1247 | + privateScreen.showingDesktopMask = 0; |
1248 | } |
1249 | else |
1250 | { |
1251 | - priv->showingDesktopMask = 0; |
1252 | + privateScreen.showingDesktopMask = 0; |
1253 | |
1254 | - for (cps::WindowManager::iterator i = priv->windowManager.begin(); i != priv->windowManager.end(); ++i) |
1255 | + for (cps::WindowManager::iterator i = privateScreen.windowManager.begin(); i != privateScreen.windowManager.end(); ++i) |
1256 | { |
1257 | CompWindow* const w(*i); |
1258 | if (!w->inShowDesktopMode ()) |
1259 | @@ -2668,7 +2668,7 @@ |
1260 | focusDefaultWindow (); |
1261 | } |
1262 | |
1263 | - XChangeProperty (priv->dpy, priv->rootWindow(), |
1264 | + XChangeProperty (privateScreen.dpy, privateScreen.rootWindow(), |
1265 | Atoms::showingDesktop, |
1266 | XA_CARDINAL, 32, PropModeReplace, |
1267 | (unsigned char *) &data, 1); |
1268 | @@ -2677,7 +2677,7 @@ |
1269 | void |
1270 | CompScreenImpl::forEachWindow (CompWindow::ForEach proc) |
1271 | { |
1272 | - for (cps::WindowManager::iterator i = priv->windowManager.begin(); i != priv->windowManager.end(); ++i) |
1273 | + for (cps::WindowManager::iterator i = privateScreen.windowManager.begin(); i != privateScreen.windowManager.end(); ++i) |
1274 | { |
1275 | CompWindow* const w(*i); |
1276 | proc (w); |
1277 | @@ -2690,7 +2690,7 @@ |
1278 | CompWindow *w; |
1279 | CompWindow *focus = NULL; |
1280 | |
1281 | - if (!priv->optionGetClickToFocus ()) |
1282 | + if (!privateScreen.optionGetClickToFocus ()) |
1283 | { |
1284 | w = findTopLevelWindow (below); |
1285 | |
1286 | @@ -2710,11 +2710,11 @@ |
1287 | /* huh, we didn't find d->below ... perhaps it's out of date; |
1288 | try grabbing it through the server */ |
1289 | |
1290 | - status = XQueryPointer (dpy (), priv->rootWindow(), &rootReturn, |
1291 | + status = XQueryPointer (dpy (), privateScreen.rootWindow(), &rootReturn, |
1292 | &childReturn, &dummyInt, &dummyInt, |
1293 | &dummyInt, &dummyInt, &dummyUInt); |
1294 | |
1295 | - if (status && rootReturn == priv->rootWindow()) |
1296 | + if (status && rootReturn == privateScreen.rootWindow()) |
1297 | { |
1298 | w = findTopLevelWindow (childReturn); |
1299 | |
1300 | @@ -2731,8 +2731,8 @@ |
1301 | if (!focus) |
1302 | { |
1303 | /* Traverse down the stack */ |
1304 | - for (cps::WindowManager::reverse_iterator rit = priv->windowManager.rbegin(); |
1305 | - rit != priv->windowManager.rend(); rit++) |
1306 | + for (cps::WindowManager::reverse_iterator rit = privateScreen.windowManager.rbegin(); |
1307 | + rit != privateScreen.windowManager.rend(); rit++) |
1308 | { |
1309 | w = (*rit); |
1310 | |
1311 | @@ -2747,7 +2747,7 @@ |
1312 | CompWindowTypeDialogMask | |
1313 | CompWindowTypeModalDialogMask)) |
1314 | { |
1315 | - if (!priv->optionGetClickToFocus ()) |
1316 | + if (!privateScreen.optionGetClickToFocus ()) |
1317 | { |
1318 | /* We should favor the more active window in the mouse focus |
1319 | * case since the user does not care if the focused window is on top */ |
1320 | @@ -2765,7 +2765,7 @@ |
1321 | { |
1322 | focus = w; |
1323 | |
1324 | - if (priv->optionGetClickToFocus ()) |
1325 | + if (privateScreen.optionGetClickToFocus ()) |
1326 | break; |
1327 | } |
1328 | } |
1329 | @@ -2774,12 +2774,12 @@ |
1330 | |
1331 | if (focus) |
1332 | { |
1333 | - if (focus->id () != priv->orphanData.activeWindow) |
1334 | + if (focus->id () != privateScreen.orphanData.activeWindow) |
1335 | focus->moveInputFocusTo (); |
1336 | } |
1337 | else |
1338 | { |
1339 | - XSetInputFocus (priv->dpy, priv->rootWindow(), RevertToPointerRoot, |
1340 | + XSetInputFocus (privateScreen.dpy, privateScreen.rootWindow(), RevertToPointerRoot, |
1341 | CurrentTime); |
1342 | } |
1343 | } |
1344 | @@ -2787,7 +2787,7 @@ |
1345 | CompWindow * |
1346 | CompScreenImpl::findWindow (Window id) |
1347 | { |
1348 | - return priv->windowManager.findWindow (id); |
1349 | + return privateScreen.windowManager.findWindow (id); |
1350 | } |
1351 | |
1352 | CompWindow* |
1353 | @@ -2823,7 +2823,7 @@ |
1354 | return w; |
1355 | } |
1356 | |
1357 | - for (cps::WindowManager::iterator i = priv->windowManager.begin(); i != priv->windowManager.end(); ++i) |
1358 | + for (cps::WindowManager::iterator i = privateScreen.windowManager.begin(); i != privateScreen.windowManager.end(); ++i) |
1359 | { |
1360 | CompWindow* const w(*i); |
1361 | if (w->priv->frame == id) |
1362 | @@ -2841,7 +2841,7 @@ |
1363 | void |
1364 | CompScreenImpl::insertWindow (CompWindow *w, Window aboveId) |
1365 | { |
1366 | - priv->windowManager.insertWindow (w, aboveId); |
1367 | + privateScreen.windowManager.insertWindow (w, aboveId); |
1368 | } |
1369 | void |
1370 | cps::WindowManager::insertWindow (CompWindow* w, Window aboveId) |
1371 | @@ -2908,7 +2908,7 @@ |
1372 | void |
1373 | CompScreenImpl::insertServerWindow (CompWindow *w, Window aboveId) |
1374 | { |
1375 | - priv->windowManager.insertServerWindow(w, aboveId); |
1376 | + privateScreen.windowManager.insertServerWindow(w, aboveId); |
1377 | } |
1378 | |
1379 | void |
1380 | @@ -2978,7 +2978,7 @@ |
1381 | void |
1382 | CompScreenImpl::unhookWindow (CompWindow *w) |
1383 | { |
1384 | - priv->windowManager.unhookWindow (w); |
1385 | + privateScreen.windowManager.unhookWindow (w); |
1386 | } |
1387 | |
1388 | void |
1389 | @@ -3016,7 +3016,7 @@ |
1390 | void |
1391 | CompScreenImpl::unhookServerWindow (CompWindow *w) |
1392 | { |
1393 | - priv->windowManager.unhookServerWindow (w); |
1394 | + privateScreen.windowManager.unhookServerWindow (w); |
1395 | } |
1396 | |
1397 | void |
1398 | @@ -3051,13 +3051,13 @@ |
1399 | Cursor |
1400 | CompScreenImpl::normalCursor () |
1401 | { |
1402 | - return priv->normalCursor; |
1403 | + return privateScreen.normalCursor; |
1404 | } |
1405 | |
1406 | Cursor |
1407 | CompScreenImpl::invisibleCursor () |
1408 | { |
1409 | - return priv->invisibleCursor; |
1410 | + return privateScreen.invisibleCursor; |
1411 | } |
1412 | |
1413 | #define POINTER_GRAB_MASK (ButtonReleaseMask | \ |
1414 | @@ -3066,25 +3066,25 @@ |
1415 | CompScreenImpl::GrabHandle |
1416 | CompScreenImpl::pushGrab (Cursor cursor, const char *name) |
1417 | { |
1418 | - if (priv->eventManager.grabsEmpty ()) |
1419 | + if (privateScreen.eventManager.grabsEmpty ()) |
1420 | { |
1421 | int status; |
1422 | |
1423 | - status = XGrabPointer (priv->dpy, priv->eventManager.getGrabWindow(), true, |
1424 | + status = XGrabPointer (privateScreen.dpy, privateScreen.eventManager.getGrabWindow(), true, |
1425 | POINTER_GRAB_MASK, |
1426 | GrabModeAsync, GrabModeAsync, |
1427 | - priv->rootWindow(), cursor, |
1428 | + privateScreen.rootWindow(), cursor, |
1429 | CurrentTime); |
1430 | |
1431 | if (status == GrabSuccess) |
1432 | { |
1433 | - status = XGrabKeyboard (priv->dpy, |
1434 | - priv->eventManager.getGrabWindow(), true, |
1435 | + status = XGrabKeyboard (privateScreen.dpy, |
1436 | + privateScreen.eventManager.getGrabWindow(), true, |
1437 | GrabModeAsync, GrabModeAsync, |
1438 | CurrentTime); |
1439 | if (status != GrabSuccess) |
1440 | { |
1441 | - XUngrabPointer (priv->dpy, CurrentTime); |
1442 | + XUngrabPointer (privateScreen.dpy, CurrentTime); |
1443 | return NULL; |
1444 | } |
1445 | } |
1446 | @@ -3093,12 +3093,12 @@ |
1447 | } |
1448 | else |
1449 | { |
1450 | - XChangeActivePointerGrab (priv->dpy, POINTER_GRAB_MASK, |
1451 | + XChangeActivePointerGrab (privateScreen.dpy, POINTER_GRAB_MASK, |
1452 | cursor, CurrentTime); |
1453 | } |
1454 | |
1455 | cps::Grab *grab = new cps::Grab (cursor, name); |
1456 | - priv->eventManager.grabsPush (grab); |
1457 | + privateScreen.eventManager.grabsPush (grab); |
1458 | |
1459 | return grab; |
1460 | } |
1461 | @@ -3109,7 +3109,7 @@ |
1462 | if (!handle) |
1463 | return; |
1464 | |
1465 | - XChangeActivePointerGrab (priv->dpy, POINTER_GRAB_MASK, |
1466 | + XChangeActivePointerGrab (privateScreen.dpy, POINTER_GRAB_MASK, |
1467 | cursor, CurrentTime); |
1468 | |
1469 | handle->cursor = cursor; |
1470 | @@ -3122,13 +3122,13 @@ |
1471 | if (!handle) |
1472 | return; |
1473 | |
1474 | - priv->eventManager.grabsRemove(handle); |
1475 | + privateScreen.eventManager.grabsRemove(handle); |
1476 | |
1477 | - if (!priv->eventManager.grabsEmpty ()) |
1478 | + if (!privateScreen.eventManager.grabsEmpty ()) |
1479 | { |
1480 | - XChangeActivePointerGrab (priv->dpy, |
1481 | + XChangeActivePointerGrab (privateScreen.dpy, |
1482 | POINTER_GRAB_MASK, |
1483 | - priv->eventManager.grabsBack ()->cursor, |
1484 | + privateScreen.eventManager.grabsBack ()->cursor, |
1485 | CurrentTime); |
1486 | } |
1487 | else |
1488 | @@ -3137,8 +3137,8 @@ |
1489 | warpPointer (restorePointer->x () - pointerX, |
1490 | restorePointer->y () - pointerY); |
1491 | |
1492 | - XUngrabPointer (priv->dpy, CurrentTime); |
1493 | - XUngrabKeyboard (priv->dpy, CurrentTime); |
1494 | + XUngrabPointer (privateScreen.dpy, CurrentTime); |
1495 | + XUngrabKeyboard (privateScreen.dpy, CurrentTime); |
1496 | } |
1497 | } |
1498 | |
1499 | @@ -3166,7 +3166,7 @@ |
1500 | |
1501 | std::list<cps::Grab *>::iterator it; |
1502 | |
1503 | - for (it = priv->eventManager.grabsBegin (); it != priv->eventManager.grabsEnd (); it++) |
1504 | + for (it = privateScreen.eventManager.grabsBegin (); it != privateScreen.eventManager.grabsEnd (); it++) |
1505 | { |
1506 | va_start (ap, first); |
1507 | |
1508 | @@ -3191,7 +3191,7 @@ |
1509 | bool |
1510 | CompScreenImpl::grabExist (const char *grab) |
1511 | { |
1512 | - return priv->eventManager.grabExist (grab); |
1513 | + return privateScreen.eventManager.grabExist (grab); |
1514 | } |
1515 | |
1516 | bool |
1517 | @@ -3208,7 +3208,7 @@ |
1518 | bool |
1519 | CompScreenImpl::grabbed () |
1520 | { |
1521 | - return priv->eventManager.isGrabbed(); |
1522 | + return privateScreen.eventManager.isGrabbed(); |
1523 | } |
1524 | |
1525 | void |
1526 | @@ -3471,8 +3471,8 @@ |
1527 | bool |
1528 | CompScreenImpl::addAction (CompAction *action) |
1529 | { |
1530 | - assert (priv->initialized); |
1531 | - if (!priv->initialized) |
1532 | + assert (privateScreen.initialized); |
1533 | + if (!privateScreen.initialized) |
1534 | return false; |
1535 | |
1536 | if (action->active ()) |
1537 | @@ -3501,7 +3501,7 @@ |
1538 | |
1539 | for (i = 0; i < SCREEN_EDGE_NUM; i++) |
1540 | if (action->edgeMask () & (1 << i)) |
1541 | - priv->enableEdge (i); |
1542 | + privateScreen.enableEdge (i); |
1543 | } |
1544 | |
1545 | action->priv->active = true; |
1546 | @@ -3512,7 +3512,7 @@ |
1547 | void |
1548 | CompScreenImpl::removeAction (CompAction *action) |
1549 | { |
1550 | - if (!priv->initialized) |
1551 | + if (!privateScreen.initialized) |
1552 | return; |
1553 | |
1554 | if (!action->active ()) |
1555 | @@ -3530,7 +3530,7 @@ |
1556 | |
1557 | for (i = 0; i < SCREEN_EDGE_NUM; i++) |
1558 | if (action->edgeMask () & (1 << i)) |
1559 | - priv->disableEdge (i); |
1560 | + privateScreen.disableEdge (i); |
1561 | } |
1562 | |
1563 | action->priv->active = false; |
1564 | @@ -3618,27 +3618,27 @@ |
1565 | CompRect workArea; |
1566 | CompRegion allWorkArea = CompRegion (); |
1567 | bool workAreaChanged = false; |
1568 | - priv->outputDevices.computeWorkAreas( |
1569 | + privateScreen.outputDevices.computeWorkAreas( |
1570 | workArea, |
1571 | workAreaChanged, |
1572 | allWorkArea, |
1573 | - priv->windowManager.getWindows()); |
1574 | + privateScreen.windowManager.getWindows()); |
1575 | |
1576 | workArea = allWorkArea.boundingRect (); |
1577 | |
1578 | - if (priv->workArea != workArea) |
1579 | + if (privateScreen.workArea != workArea) |
1580 | { |
1581 | workAreaChanged = true; |
1582 | - priv->workArea = workArea; |
1583 | + privateScreen.workArea = workArea; |
1584 | |
1585 | - priv->setDesktopHints (); |
1586 | + privateScreen.setDesktopHints (); |
1587 | } |
1588 | |
1589 | if (workAreaChanged) |
1590 | { |
1591 | /* as work area changed, update all maximized windows on this |
1592 | screen to snap to the new work area */ |
1593 | - for (cps::WindowManager::iterator i = priv->windowManager.begin(); i != priv->windowManager.end(); ++i) |
1594 | + for (cps::WindowManager::iterator i = privateScreen.windowManager.begin(); i != privateScreen.windowManager.end(); ++i) |
1595 | { |
1596 | CompWindow* const w(*i); |
1597 | w->priv->updateSize (); |
1598 | @@ -3778,7 +3778,7 @@ |
1599 | const CompWindowVector & |
1600 | CompScreenImpl::clientList (bool stackingOrder) |
1601 | { |
1602 | - return stackingOrder ? priv->windowManager.getClientListStacking() : priv->windowManager.getClientList(); |
1603 | + return stackingOrder ? privateScreen.windowManager.getClientListStacking() : privateScreen.windowManager.getClientList(); |
1604 | } |
1605 | |
1606 | void |
1607 | @@ -3801,10 +3801,10 @@ |
1608 | ev.xclient.data.l[3] = data1; |
1609 | ev.xclient.data.l[4] = data2; |
1610 | |
1611 | - XUngrabPointer (priv->dpy, CurrentTime); |
1612 | - XUngrabKeyboard (priv->dpy, CurrentTime); |
1613 | + XUngrabPointer (privateScreen.dpy, CurrentTime); |
1614 | + XUngrabKeyboard (privateScreen.dpy, CurrentTime); |
1615 | |
1616 | - XSendEvent (priv->dpy, priv->rootWindow(), false, |
1617 | + XSendEvent (privateScreen.dpy, privateScreen.rootWindow(), false, |
1618 | StructureNotifyMask, &ev); |
1619 | } |
1620 | |
1621 | @@ -3817,7 +3817,7 @@ |
1622 | if (fork () == 0) |
1623 | { |
1624 | size_t pos; |
1625 | - CompString env (priv->displayString ()); |
1626 | + CompString env (privateScreen.displayString ()); |
1627 | |
1628 | setsid (); |
1629 | |
1630 | @@ -3838,7 +3838,7 @@ |
1631 | } |
1632 | } |
1633 | |
1634 | - env.append (compPrintf (".%d", priv->screenNum)); |
1635 | + env.append (compPrintf (".%d", privateScreen.screenNum)); |
1636 | |
1637 | putenv (const_cast<char *> (env.c_str ())); |
1638 | |
1639 | @@ -3851,24 +3851,24 @@ |
1640 | { |
1641 | CompPoint pnt; |
1642 | |
1643 | - tx = priv->viewPort.vp.x () - tx; |
1644 | - tx = compiz::core::screen::wraparound_mod (tx, priv->viewPort.vpSize.width ()); |
1645 | - tx -= priv->viewPort.vp.x (); |
1646 | + tx = privateScreen.viewPort.vp.x () - tx; |
1647 | + tx = compiz::core::screen::wraparound_mod (tx, privateScreen.viewPort.vpSize.width ()); |
1648 | + tx -= privateScreen.viewPort.vp.x (); |
1649 | |
1650 | - ty = priv->viewPort.vp.y () - ty; |
1651 | - ty = compiz::core::screen::wraparound_mod (ty, priv->viewPort.vpSize.height ()); |
1652 | - ty -= priv->viewPort.vp.y (); |
1653 | + ty = privateScreen.viewPort.vp.y () - ty; |
1654 | + ty = compiz::core::screen::wraparound_mod (ty, privateScreen.viewPort.vpSize.height ()); |
1655 | + ty -= privateScreen.viewPort.vp.y (); |
1656 | |
1657 | if (!tx && !ty) |
1658 | return; |
1659 | |
1660 | - priv->viewPort.vp.setX (priv->viewPort.vp.x () + tx); |
1661 | - priv->viewPort.vp.setY (priv->viewPort.vp.y () + ty); |
1662 | + privateScreen.viewPort.vp.setX (privateScreen.viewPort.vp.x () + tx); |
1663 | + privateScreen.viewPort.vp.setY (privateScreen.viewPort.vp.y () + ty); |
1664 | |
1665 | tx *= -width (); |
1666 | ty *= -height (); |
1667 | |
1668 | - for (cps::WindowManager::iterator i = priv->windowManager.begin(); i != priv->windowManager.end(); ++i) |
1669 | + for (cps::WindowManager::iterator i = privateScreen.windowManager.begin(); i != privateScreen.windowManager.end(); ++i) |
1670 | { |
1671 | CompWindow* const w(*i); |
1672 | unsigned int valueMask = CWX | CWY; |
1673 | @@ -3895,11 +3895,11 @@ |
1674 | { |
1675 | CompWindow *w; |
1676 | |
1677 | - priv->setDesktopHints (); |
1678 | - |
1679 | - history.setCurrentActiveWindowHistory (priv->viewPort.vp.x (), priv->viewPort.vp.y ()); |
1680 | - |
1681 | - w = findWindow (priv->orphanData.activeWindow); |
1682 | + privateScreen.setDesktopHints (); |
1683 | + |
1684 | + history.setCurrentActiveWindowHistory (privateScreen.viewPort.vp.x (), privateScreen.viewPort.vp.y ()); |
1685 | + |
1686 | + w = findWindow (privateScreen.orphanData.activeWindow); |
1687 | if (w) |
1688 | { |
1689 | CompPoint dvp; |
1690 | @@ -3908,7 +3908,7 @@ |
1691 | |
1692 | /* add window to current history if it's default viewport is |
1693 | still the current one. */ |
1694 | - if (priv->viewPort.vp.x () == dvp.x () && priv->viewPort.vp.y () == dvp.y ()) |
1695 | + if (privateScreen.viewPort.vp.x () == dvp.x () && privateScreen.viewPort.vp.y () == dvp.y ()) |
1696 | history.addToCurrentActiveWindowHistory (w->id ()); |
1697 | } |
1698 | } |
1699 | @@ -3995,7 +3995,7 @@ |
1700 | XEvent xev; |
1701 | |
1702 | xev.xclient.type = ClientMessage; |
1703 | - xev.xclient.display = priv->dpy; |
1704 | + xev.xclient.display = privateScreen.dpy; |
1705 | xev.xclient.format = 32; |
1706 | |
1707 | xev.xclient.message_type = Atoms::winActive; |
1708 | @@ -4007,7 +4007,7 @@ |
1709 | xev.xclient.data.l[3] = 0; |
1710 | xev.xclient.data.l[4] = 0; |
1711 | |
1712 | - XSendEvent (priv->dpy, priv->rootWindow(), false, |
1713 | + XSendEvent (privateScreen.dpy, privateScreen.rootWindow(), false, |
1714 | SubstructureRedirectMask | SubstructureNotifyMask, &xev); |
1715 | } |
1716 | |
1717 | @@ -4054,7 +4054,7 @@ |
1718 | CompRect |
1719 | CompScreenImpl::getCurrentOutputExtents () |
1720 | { |
1721 | - return priv->outputDevices.getCurrentOutputDev (); |
1722 | + return privateScreen.outputDevices.getCurrentOutputDev (); |
1723 | } |
1724 | |
1725 | void |
1726 | @@ -4119,7 +4119,7 @@ |
1727 | const CompRect& |
1728 | CompScreenImpl::getWorkareaForOutput (unsigned int outputNum) const |
1729 | { |
1730 | - return priv->outputDevices.getOutputDev (outputNum).workArea (); |
1731 | + return privateScreen.outputDevices.getOutputDev (outputNum).workArea (); |
1732 | } |
1733 | |
1734 | void |
1735 | @@ -4150,18 +4150,18 @@ |
1736 | rect.setHeight (gm.heightIncBorders ()); |
1737 | |
1738 | offset = rect.centerX () < 0 ? -1 : 0; |
1739 | - viewport.setX (priv->viewPort.vp.x () + ((rect.centerX () / width ()) + offset) % |
1740 | - priv->viewPort.vpSize.width ()); |
1741 | + viewport.setX (privateScreen.viewPort.vp.x () + ((rect.centerX () / width ()) + offset) % |
1742 | + privateScreen.viewPort.vpSize.width ()); |
1743 | |
1744 | offset = rect.centerY () < 0 ? -1 : 0; |
1745 | - viewport.setY (priv->viewPort.vp.y () + ((rect.centerY () / height ()) + offset ) % |
1746 | - priv->viewPort.vpSize.height ()); |
1747 | + viewport.setY (privateScreen.viewPort.vp.y () + ((rect.centerY () / height ()) + offset ) % |
1748 | + privateScreen.viewPort.vpSize.height ()); |
1749 | } |
1750 | |
1751 | int |
1752 | CompScreenImpl::outputDeviceForGeometry (const CompWindow::Geometry& gm) |
1753 | { |
1754 | - return priv->outputDevices.outputDeviceForGeometry (gm, priv->optionGetOverlappingOutputs (), this); |
1755 | + return privateScreen.outputDevices.outputDeviceForGeometry (gm, privateScreen.optionGetOverlappingOutputs (), this); |
1756 | } |
1757 | |
1758 | int |
1759 | @@ -4289,7 +4289,7 @@ |
1760 | bool |
1761 | CompScreenImpl::updateDefaultIcon () |
1762 | { |
1763 | - CompString file = priv->optionGetDefaultIcon (); |
1764 | + CompString file = privateScreen.optionGetDefaultIcon (); |
1765 | CompString pname = "core/"; |
1766 | void *data; |
1767 | CompSize size; |
1768 | @@ -4382,13 +4382,13 @@ |
1769 | Window |
1770 | CompScreenImpl::root () |
1771 | { |
1772 | - return priv->rootWindow(); |
1773 | + return privateScreen.rootWindow(); |
1774 | } |
1775 | |
1776 | int |
1777 | CompScreenImpl::xkbEvent () |
1778 | { |
1779 | - return priv->getXkbEvent (); |
1780 | + return privateScreen.getXkbEvent (); |
1781 | } |
1782 | |
1783 | void |
1784 | @@ -4424,12 +4424,12 @@ |
1785 | else if (pointerY < 0) |
1786 | pointerY = 0; |
1787 | |
1788 | - XWarpPointer (priv->dpy, |
1789 | - None, priv->rootWindow(), |
1790 | + XWarpPointer (privateScreen.dpy, |
1791 | + None, privateScreen.rootWindow(), |
1792 | 0, 0, 0, 0, |
1793 | pointerX, pointerY); |
1794 | |
1795 | - XSync (priv->dpy, false); |
1796 | + XSync (privateScreen.dpy, false); |
1797 | |
1798 | /* XWarpPointer will generate Leave, Enter and PointerMotion |
1799 | * events as if the user had instantaneously moved the cursor |
1800 | @@ -4444,7 +4444,7 @@ |
1801 | * FIXME: Probably don't need to process *all* the crossing |
1802 | * events here ... maybe there is a way to check only the last |
1803 | * event in the output buffer without roundtripping a lot */ |
1804 | - while (XCheckMaskEvent (priv->dpy, |
1805 | + while (XCheckMaskEvent (privateScreen.dpy, |
1806 | LeaveWindowMask | |
1807 | EnterWindowMask | |
1808 | PointerMotionMask, |
1809 | @@ -4456,7 +4456,7 @@ |
1810 | event.xcrossing.mode != NotifyUngrab || |
1811 | event.xcrossing.mode != NotifyInferior) |
1812 | { |
1813 | - priv->identifyEdgeWindow(event.xcrossing.window); |
1814 | + privateScreen.identifyEdgeWindow(event.xcrossing.window); |
1815 | } |
1816 | } |
1817 | } |
1818 | @@ -4471,26 +4471,26 @@ |
1819 | CompWindowList & |
1820 | CompScreenImpl::windows () |
1821 | { |
1822 | - return priv->windowManager.getWindows(); |
1823 | + return privateScreen.windowManager.getWindows(); |
1824 | } |
1825 | |
1826 | CompWindowList & |
1827 | CompScreenImpl::serverWindows () |
1828 | { |
1829 | - return priv->windowManager.getServerWindows(); |
1830 | + return privateScreen.windowManager.getServerWindows(); |
1831 | } |
1832 | |
1833 | CompWindowList & |
1834 | CompScreenImpl::destroyedWindows () |
1835 | { |
1836 | - return priv->windowManager.getDestroyedWindows(); |
1837 | + return privateScreen.windowManager.getDestroyedWindows(); |
1838 | } |
1839 | |
1840 | |
1841 | Time |
1842 | CompScreenImpl::getCurrentTime () |
1843 | { |
1844 | - return priv->eventManager.getCurrentTime (priv->dpy); |
1845 | + return privateScreen.eventManager.getCurrentTime (privateScreen.dpy); |
1846 | } |
1847 | |
1848 | Time |
1849 | @@ -4511,25 +4511,25 @@ |
1850 | Window |
1851 | CompScreenImpl::selectionWindow () |
1852 | { |
1853 | - return priv->wmSnSelectionWindow; |
1854 | + return privateScreen.wmSnSelectionWindow; |
1855 | } |
1856 | |
1857 | int |
1858 | CompScreenImpl::screenNum () |
1859 | { |
1860 | - return priv->screenNum; |
1861 | + return privateScreen.screenNum; |
1862 | } |
1863 | |
1864 | const CompPoint & |
1865 | CompScreenImpl::vp () const |
1866 | { |
1867 | - return priv->viewPort.vp; |
1868 | + return privateScreen.viewPort.vp; |
1869 | } |
1870 | |
1871 | const CompSize & |
1872 | CompScreenImpl::vpSize () const |
1873 | { |
1874 | - return priv->viewPort.vpSize; |
1875 | + return privateScreen.viewPort.vpSize; |
1876 | } |
1877 | |
1878 | int |
1879 | @@ -4547,31 +4547,31 @@ |
1880 | CompOutput::vector & |
1881 | CompScreenImpl::outputDevs () |
1882 | { |
1883 | - return priv->outputDevices.getOutputDevs (); |
1884 | + return privateScreen.outputDevices.getOutputDevs (); |
1885 | } |
1886 | |
1887 | CompOutput & |
1888 | CompScreenImpl::currentOutputDev () const |
1889 | { |
1890 | - return priv->outputDevices.getCurrentOutputDev (); |
1891 | + return const_cast<PrivateScreen&>(privateScreen).outputDevices.getCurrentOutputDev (); |
1892 | } |
1893 | |
1894 | const CompRect & |
1895 | CompScreenImpl::workArea () const |
1896 | { |
1897 | - return priv->workArea; |
1898 | + return privateScreen.workArea; |
1899 | } |
1900 | |
1901 | unsigned int |
1902 | CompScreenImpl::currentDesktop () |
1903 | { |
1904 | - return priv->currentDesktop; |
1905 | + return privateScreen.currentDesktop; |
1906 | } |
1907 | |
1908 | unsigned int |
1909 | CompScreenImpl::nDesktop () |
1910 | { |
1911 | - return priv->nDesktop; |
1912 | + return privateScreen.nDesktop; |
1913 | } |
1914 | |
1915 | CompActiveWindowHistory * |
1916 | @@ -4583,7 +4583,7 @@ |
1917 | bool |
1918 | CompScreenImpl::shouldSerializePlugins () |
1919 | { |
1920 | - return priv->optionGetDoSerialize (); |
1921 | + return privateScreen.optionGetDoSerialize (); |
1922 | } |
1923 | |
1924 | void |
1925 | @@ -4607,43 +4607,42 @@ |
1926 | const CompRegion & |
1927 | CompScreenImpl::region () const |
1928 | { |
1929 | - return priv->getRegion (); |
1930 | + return privateScreen.getRegion (); |
1931 | } |
1932 | |
1933 | bool |
1934 | CompScreenImpl::hasOverlappingOutputs () |
1935 | { |
1936 | - return priv->outputDevices.hasOverlappingOutputs (); |
1937 | + return privateScreen.outputDevices.hasOverlappingOutputs (); |
1938 | } |
1939 | |
1940 | CompOutput & |
1941 | CompScreenImpl::fullscreenOutput () |
1942 | { |
1943 | - return priv->fullscreenOutput; |
1944 | + return privateScreen.fullscreenOutput; |
1945 | } |
1946 | |
1947 | |
1948 | XWindowAttributes |
1949 | CompScreenImpl::attrib () |
1950 | { |
1951 | - return priv->getAttrib (); |
1952 | + return privateScreen.getAttrib (); |
1953 | } |
1954 | |
1955 | std::vector<XineramaScreenInfo> & |
1956 | CompScreenImpl::screenInfo () |
1957 | { |
1958 | - return priv->getScreenInfo (); |
1959 | + return privateScreen.getScreenInfo (); |
1960 | } |
1961 | |
1962 | bool |
1963 | -PrivateScreen::createFailed () const |
1964 | +CompScreenImpl::createFailed () const |
1965 | { |
1966 | return !screenInitalized; |
1967 | } |
1968 | |
1969 | CompScreen::CompScreen (): |
1970 | - PluginClassStorage (screenPluginClassIndices), |
1971 | - priv () |
1972 | + PluginClassStorage (screenPluginClassIndices) |
1973 | { |
1974 | } |
1975 | |
1976 | @@ -4655,21 +4654,20 @@ |
1977 | mapNum (1), |
1978 | defaultIcon_(0), |
1979 | grabManager (this), |
1980 | - eventHandled (false) |
1981 | + eventHandled (false), |
1982 | + privateScreen(this) |
1983 | { |
1984 | ValueHolder::SetDefault (&valueHolder); |
1985 | |
1986 | CompPrivate p; |
1987 | CompOption::Value::Vector vList; |
1988 | - CompPlugin *corePlugin; |
1989 | |
1990 | - priv.reset (new PrivateScreen (this)); |
1991 | - priv->setPingTimerCallback( |
1992 | + privateScreen.setPingTimerCallback( |
1993 | boost::bind (&CompScreenImpl::handlePingTimeout, this)); |
1994 | |
1995 | screenInitalized = true; |
1996 | |
1997 | - corePlugin = CompPlugin::load ("core"); |
1998 | + CompPlugin* corePlugin = CompPlugin::load ("core"); |
1999 | if (!corePlugin) |
2000 | { |
2001 | compLogMessage ("core", CompLogLevelFatal, |
2002 | @@ -4689,7 +4687,7 @@ |
2003 | |
2004 | vList.push_back ("core"); |
2005 | |
2006 | - priv->setPlugins (vList); |
2007 | + privateScreen.setPlugins (vList); |
2008 | } |
2009 | |
2010 | void |
2011 | @@ -4708,44 +4706,44 @@ |
2012 | bool |
2013 | CompScreenImpl::init (const char *name) |
2014 | { |
2015 | - priv->eventManager.init(); |
2016 | + privateScreen.eventManager.init(); |
2017 | |
2018 | - if (priv->initDisplay(name, history)) |
2019 | + if (privateScreen.initDisplay(name, history)) |
2020 | { |
2021 | - priv->optionSetCloseWindowKeyInitiate (CompScreenImpl::closeWin); |
2022 | - priv->optionSetCloseWindowButtonInitiate (CompScreenImpl::closeWin); |
2023 | - priv->optionSetRaiseWindowKeyInitiate (CompScreenImpl::raiseWin); |
2024 | - priv->optionSetRaiseWindowButtonInitiate (CompScreenImpl::raiseWin); |
2025 | - priv->optionSetLowerWindowKeyInitiate (CompScreenImpl::lowerWin); |
2026 | - priv->optionSetLowerWindowButtonInitiate (CompScreenImpl::lowerWin); |
2027 | - |
2028 | - priv->optionSetUnmaximizeWindowKeyInitiate (CompScreenImpl::unmaximizeWin); |
2029 | - |
2030 | - priv->optionSetMinimizeWindowKeyInitiate (CompScreenImpl::minimizeWin); |
2031 | - priv->optionSetMinimizeWindowButtonInitiate (CompScreenImpl::minimizeWin); |
2032 | - priv->optionSetMaximizeWindowKeyInitiate (CompScreenImpl::maximizeWin); |
2033 | - priv->optionSetMaximizeWindowHorizontallyKeyInitiate ( |
2034 | + privateScreen.optionSetCloseWindowKeyInitiate (CompScreenImpl::closeWin); |
2035 | + privateScreen.optionSetCloseWindowButtonInitiate (CompScreenImpl::closeWin); |
2036 | + privateScreen.optionSetRaiseWindowKeyInitiate (CompScreenImpl::raiseWin); |
2037 | + privateScreen.optionSetRaiseWindowButtonInitiate (CompScreenImpl::raiseWin); |
2038 | + privateScreen.optionSetLowerWindowKeyInitiate (CompScreenImpl::lowerWin); |
2039 | + privateScreen.optionSetLowerWindowButtonInitiate (CompScreenImpl::lowerWin); |
2040 | + |
2041 | + privateScreen.optionSetUnmaximizeWindowKeyInitiate (CompScreenImpl::unmaximizeWin); |
2042 | + |
2043 | + privateScreen.optionSetMinimizeWindowKeyInitiate (CompScreenImpl::minimizeWin); |
2044 | + privateScreen.optionSetMinimizeWindowButtonInitiate (CompScreenImpl::minimizeWin); |
2045 | + privateScreen.optionSetMaximizeWindowKeyInitiate (CompScreenImpl::maximizeWin); |
2046 | + privateScreen.optionSetMaximizeWindowHorizontallyKeyInitiate ( |
2047 | CompScreenImpl::maximizeWinHorizontally); |
2048 | - priv->optionSetMaximizeWindowVerticallyKeyInitiate ( |
2049 | + privateScreen.optionSetMaximizeWindowVerticallyKeyInitiate ( |
2050 | CompScreenImpl::maximizeWinVertically); |
2051 | |
2052 | - priv->optionSetWindowMenuKeyInitiate (CompScreenImpl::windowMenu); |
2053 | - priv->optionSetWindowMenuButtonInitiate (CompScreenImpl::windowMenu); |
2054 | - |
2055 | - priv->optionSetShowDesktopKeyInitiate (CompScreenImpl::showDesktop); |
2056 | - priv->optionSetShowDesktopEdgeInitiate (CompScreenImpl::showDesktop); |
2057 | - |
2058 | - priv->optionSetToggleWindowMaximizedKeyInitiate (CompScreenImpl::toggleWinMaximized); |
2059 | - priv->optionSetToggleWindowMaximizedButtonInitiate (CompScreenImpl::toggleWinMaximized); |
2060 | - |
2061 | - priv->optionSetToggleWindowMaximizedHorizontallyKeyInitiate ( |
2062 | + privateScreen.optionSetWindowMenuKeyInitiate (CompScreenImpl::windowMenu); |
2063 | + privateScreen.optionSetWindowMenuButtonInitiate (CompScreenImpl::windowMenu); |
2064 | + |
2065 | + privateScreen.optionSetShowDesktopKeyInitiate (CompScreenImpl::showDesktop); |
2066 | + privateScreen.optionSetShowDesktopEdgeInitiate (CompScreenImpl::showDesktop); |
2067 | + |
2068 | + privateScreen.optionSetToggleWindowMaximizedKeyInitiate (CompScreenImpl::toggleWinMaximized); |
2069 | + privateScreen.optionSetToggleWindowMaximizedButtonInitiate (CompScreenImpl::toggleWinMaximized); |
2070 | + |
2071 | + privateScreen.optionSetToggleWindowMaximizedHorizontallyKeyInitiate ( |
2072 | CompScreenImpl::toggleWinMaximizedHorizontally); |
2073 | - priv->optionSetToggleWindowMaximizedVerticallyKeyInitiate ( |
2074 | + privateScreen.optionSetToggleWindowMaximizedVerticallyKeyInitiate ( |
2075 | CompScreenImpl::toggleWinMaximizedVertically); |
2076 | |
2077 | - priv->optionSetToggleWindowShadedKeyInitiate (CompScreenImpl::shadeWin); |
2078 | + privateScreen.optionSetToggleWindowShadedKeyInitiate (CompScreenImpl::shadeWin); |
2079 | |
2080 | - priv->initPlugins(); |
2081 | + privateScreen.initPlugins(); |
2082 | |
2083 | if (debugOutput) |
2084 | { |
2085 | @@ -4753,7 +4751,7 @@ |
2086 | new StackDebugger ( |
2087 | dpy (), |
2088 | root (), |
2089 | - boost::bind (&PrivateScreen::queueEvents, priv.get()))); |
2090 | + boost::bind (&PrivateScreen::queueEvents, &privateScreen))); |
2091 | } |
2092 | |
2093 | return true; |
2094 | @@ -4772,9 +4770,9 @@ |
2095 | } |
2096 | |
2097 | bool |
2098 | -CompScreen::displayInitialised() const |
2099 | +CompScreenImpl::displayInitialised() const |
2100 | { |
2101 | - return priv && priv->initialized; |
2102 | + return privateScreen.initialized; |
2103 | } |
2104 | |
2105 | void |
2106 | @@ -4784,45 +4782,45 @@ |
2107 | } |
2108 | |
2109 | void |
2110 | -CompScreen::applyStartupProperties (CompWindow *window) |
2111 | +CompScreenImpl::applyStartupProperties (CompWindow *window) |
2112 | { |
2113 | - priv->startupSequence.applyStartupProperties (this, window); |
2114 | + privateScreen.startupSequence.applyStartupProperties (this, window); |
2115 | } |
2116 | |
2117 | void |
2118 | -CompScreen::updateClientList() |
2119 | +CompScreenImpl::updateClientList() |
2120 | { |
2121 | - priv->updateClientList (); |
2122 | + privateScreen.updateClientList (); |
2123 | } |
2124 | |
2125 | Window |
2126 | -CompScreen::getTopWindow() const |
2127 | +CompScreenImpl::getTopWindow() const |
2128 | { |
2129 | - return priv->windowManager.getTopWindow(); |
2130 | + return privateScreen.windowManager.getTopWindow(); |
2131 | } |
2132 | |
2133 | CoreOptions& |
2134 | -CompScreen::getCoreOptions() |
2135 | +CompScreenImpl::getCoreOptions() |
2136 | { |
2137 | - return *priv; |
2138 | + return privateScreen; |
2139 | } |
2140 | |
2141 | Colormap |
2142 | -CompScreen::colormap() const |
2143 | +CompScreenImpl::colormap() const |
2144 | { |
2145 | - return priv->colormap; |
2146 | + return privateScreen.colormap; |
2147 | } |
2148 | |
2149 | void |
2150 | -CompScreen::setCurrentDesktop (unsigned int desktop) |
2151 | +CompScreenImpl::setCurrentDesktop (unsigned int desktop) |
2152 | { |
2153 | - priv->setCurrentDesktop(desktop); |
2154 | + privateScreen.setCurrentDesktop(desktop); |
2155 | } |
2156 | |
2157 | Window |
2158 | -CompScreen::activeWindow() const |
2159 | +CompScreenImpl::activeWindow() const |
2160 | { |
2161 | - return priv->orphanData.activeWindow; |
2162 | + return privateScreen.orphanData.activeWindow; |
2163 | } |
2164 | |
2165 | void |
2166 | @@ -4832,15 +4830,15 @@ |
2167 | } |
2168 | |
2169 | bool |
2170 | -CompScreen::grabWindowIsNot(Window w) const |
2171 | +CompScreenImpl::grabWindowIsNot(Window w) const |
2172 | { |
2173 | - return priv->eventManager.notGrabWindow(w); |
2174 | + return privateScreen.eventManager.notGrabWindow(w); |
2175 | } |
2176 | |
2177 | void |
2178 | -CompScreen::incrementPendingDestroys() |
2179 | +CompScreenImpl::incrementPendingDestroys() |
2180 | { |
2181 | - priv->windowManager.incrementPendingDestroys(); |
2182 | + privateScreen.windowManager.incrementPendingDestroys(); |
2183 | } |
2184 | |
2185 | void |
2186 | @@ -4867,14 +4865,14 @@ |
2187 | } |
2188 | |
2189 | void |
2190 | -CompScreen::setNextActiveWindow(Window id) |
2191 | +CompScreenImpl::setNextActiveWindow(Window id) |
2192 | { |
2193 | - priv->orphanData.nextActiveWindow = id; |
2194 | + privateScreen.orphanData.nextActiveWindow = id; |
2195 | } |
2196 | Window |
2197 | -CompScreen::getNextActiveWindow() const |
2198 | +CompScreenImpl::getNextActiveWindow() const |
2199 | { |
2200 | - return priv->orphanData.nextActiveWindow; |
2201 | + return privateScreen.orphanData.nextActiveWindow; |
2202 | } |
2203 | |
2204 | |
2205 | @@ -5303,10 +5301,10 @@ |
2206 | |
2207 | CompScreenImpl::~CompScreenImpl () |
2208 | { |
2209 | - priv->startupSequence.removeAllSequences (); |
2210 | + privateScreen.startupSequence.removeAllSequences (); |
2211 | |
2212 | - while (!priv->windowManager.getWindows().empty ()) |
2213 | - delete priv->windowManager.getWindows().front (); |
2214 | + while (!privateScreen.windowManager.getWindows().empty ()) |
2215 | + delete privateScreen.windowManager.getWindows().front (); |
2216 | |
2217 | while (CompPlugin* p = CompPlugin::pop ()) |
2218 | CompPlugin::unload (p); |
2219 | |
2220 | === modified file 'src/window.cpp' |
2221 | --- src/window.cpp 2012-05-10 13:05:24 +0000 |
2222 | +++ src/window.cpp 2012-05-10 13:05:24 +0000 |
2223 | @@ -4112,14 +4112,14 @@ |
2224 | } |
2225 | |
2226 | CompWindow * |
2227 | -CompScreen::focusTopMostWindow () |
2228 | +CompScreenImpl::focusTopMostWindow () |
2229 | { |
2230 | using ::compiz::private_screen::WindowManager; |
2231 | |
2232 | CompWindow *focus = NULL; |
2233 | - WindowManager::reverse_iterator it = priv->windowManager.rbegin (); |
2234 | + WindowManager::reverse_iterator it = privateScreen.windowManager.rbegin (); |
2235 | |
2236 | - for (; it != priv->windowManager.rend (); it++) |
2237 | + for (; it != privateScreen.windowManager.rend (); it++) |
2238 | { |
2239 | CompWindow *w = *it; |
2240 | |
2241 | @@ -4135,11 +4135,11 @@ |
2242 | |
2243 | if (focus) |
2244 | { |
2245 | - if (focus->id () != priv->orphanData.activeWindow) |
2246 | + if (focus->id () != privateScreen.orphanData.activeWindow) |
2247 | focus->moveInputFocusTo (); |
2248 | } |
2249 | else |
2250 | - XSetInputFocus (priv->dpy, priv->rootWindow(), RevertToPointerRoot, |
2251 | + XSetInputFocus (privateScreen.dpy, privateScreen.rootWindow(), RevertToPointerRoot, |
2252 | CurrentTime); |
2253 | return focus; |
2254 | } |