Merge lp:~brandontschaefer/unity/disable-switcher-when-wall-active into lp:unity
- disable-switcher-when-wall-active
- Merge into trunk
Proposed by
Brandon Schaefer
Status: | Merged |
---|---|
Approved by: | Brandon Schaefer |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2551 |
Proposed branch: | lp:~brandontschaefer/unity/disable-switcher-when-wall-active |
Merge into: | lp:unity |
Diff against target: |
792 lines (+225/-176) 9 files modified
launcher/SwitcherController.cpp (+7/-0) launcher/SwitcherController.h (+2/-0) plugins/unityshell/src/unityshell.cpp (+4/-2) tests/autopilot/unity/tests/test_switcher.py (+16/-0) unity-shared/PluginAdapter.h (+23/-21) unity-shared/PluginAdapterCompiz.cpp (+25/-19) unity-shared/PluginAdapterStandalone.cpp (+70/-64) unity-shared/WindowManager.cpp (+59/-53) unity-shared/WindowManager.h (+19/-17) |
To merge this branch: | bzr merge lp:~brandontschaefer/unity/disable-switcher-when-wall-active |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Marco Trevisan (Treviño) | Approve | ||
Thomi Richards (community) | quality | Approve | |
Review via email: mp+117997@code.launchpad.net |
Commit message
Switcher is now disabled when the Wall plugin is Active.
Description of the change
=== Problem ===
When the wall plugin is active (while switching workspaces) Alt+Tab would pick up the wrong workspace.
=== Fix ===
When the wall plugin is active the switcher must be disabled. It is now.
=== Test ===
AP test
To post a comment you must log in.
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote : | # |
review:
Needs Fixing
(quality)
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) : | # |
review:
Approve
(quality)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Fine for me.
review:
Approve
Revision history for this message
Unity Merger (unity-merger) wrote : | # |
Attempt to merge into lp:unity failed due to conflicts:
text conflict in plugins/
text conflict in tests/autopilot
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'launcher/SwitcherController.cpp' |
2 | --- launcher/SwitcherController.cpp 2012-08-10 09:58:49 +0000 |
3 | +++ launcher/SwitcherController.cpp 2012-08-10 23:01:11 +0000 |
4 | @@ -70,6 +70,13 @@ |
5 | view_->background_color = bg_color_; |
6 | } |
7 | |
8 | +bool Controller::CanShowSwitcher(const std::vector<AbstractLauncherIcon::Ptr>& results) const |
9 | +{ |
10 | + bool empty = (show_desktop_disabled_ ? results.empty() : results.size() == 1); |
11 | + |
12 | + return (!empty && !WindowManager::Default()->IsWallActive()); |
13 | +} |
14 | + |
15 | void Controller::Show(ShowMode show, SortMode sort, bool reverse, |
16 | std::vector<AbstractLauncherIcon::Ptr> results) |
17 | { |
18 | |
19 | === modified file 'launcher/SwitcherController.h' |
20 | --- launcher/SwitcherController.h 2012-07-27 01:06:27 +0000 |
21 | +++ launcher/SwitcherController.h 2012-08-10 23:01:11 +0000 |
22 | @@ -70,6 +70,8 @@ |
23 | void Show(ShowMode show, SortMode sort, bool reverse, std::vector<launcher::AbstractLauncherIcon::Ptr> results); |
24 | void Hide(bool accept_state=true); |
25 | |
26 | + bool CanShowSwitcher(const std::vector<launcher::AbstractLauncherIcon::Ptr>& resutls) const; |
27 | + |
28 | bool Visible(); |
29 | |
30 | void Next(); |
31 | |
32 | === modified file 'plugins/unityshell/src/unityshell.cpp' |
33 | --- plugins/unityshell/src/unityshell.cpp 2012-08-10 09:58:49 +0000 |
34 | +++ plugins/unityshell/src/unityshell.cpp 2012-08-10 23:01:11 +0000 |
35 | @@ -1895,7 +1895,7 @@ |
36 | auto results = launcher_controller_->GetAltTabIcons(show_mode == switcher::ShowMode::CURRENT_VIEWPORT, |
37 | switcher_controller_->IsShowDesktopDisabled()); |
38 | |
39 | - if (!(results.size() == 1 && results[0]->GetIconType() == AbstractLauncherIcon::IconType::DESKTOP) && !results.empty()) |
40 | + if (switcher_controller_->CanShowSwitcher(results)) |
41 | switcher_controller_->Show(show_mode, switcher::SortMode::FOCUS_ORDER, false, results); |
42 | |
43 | return true; |
44 | @@ -1949,7 +1949,9 @@ |
45 | CompAction::State state, |
46 | CompOption::Vector& options) |
47 | { |
48 | - if (switcher_controller_->Visible()) |
49 | + if (WindowManager::Default()->IsWallActive()) |
50 | + return false; |
51 | + else if (switcher_controller_->Visible()) |
52 | switcher_controller_->Next(); |
53 | else |
54 | altTabInitiateCommon(action, switcher::ShowMode::ALL); |
55 | |
56 | === modified file 'tests/autopilot/unity/tests/test_switcher.py' |
57 | --- tests/autopilot/unity/tests/test_switcher.py 2012-08-09 01:37:02 +0000 |
58 | +++ tests/autopilot/unity/tests/test_switcher.py 2012-08-10 23:01:11 +0000 |
59 | @@ -417,3 +417,19 @@ |
60 | self.switcher.select() |
61 | |
62 | self.assertProperty(char_win2, is_hidden=False) |
63 | + |
64 | + def test_switcher_is_disabled_when_wall_plugin_active(self): |
65 | + """The switcher must not open when the wall plugin is active using ctrl+alt+<direction>.""" |
66 | + |
67 | + initial_workspace = self.workspace.current_workspace |
68 | + self.addCleanup(self.workspace.switch_to, initial_workspace) |
69 | + |
70 | + self.workspace.switch_to(0) |
71 | + sleep(1) |
72 | + self.keyboard.press("Ctrl+Alt+Right") |
73 | + self.addCleanup(self.keyboard.release, "Ctrl+Alt+Right") |
74 | + sleep(1) |
75 | + self.keybinding_hold_part_then_tap("switcher/reveal_normal") |
76 | + self.addCleanup(self.switcher.terminate) |
77 | + |
78 | + self.assertThat(self.switcher.visible, Eventually(Equals(False))) |
79 | |
80 | === modified file 'unity-shared/PluginAdapter.h' |
81 | --- unity-shared/PluginAdapter.h 2012-05-07 00:49:31 +0000 |
82 | +++ unity-shared/PluginAdapter.h 2012-08-10 23:01:11 +0000 |
83 | @@ -92,11 +92,13 @@ |
84 | void OnLeaveDesktop (); |
85 | |
86 | void TerminateScale(); |
87 | - bool IsScaleActive(); |
88 | - bool IsScaleActiveForGroup(); |
89 | + bool IsScaleActive() const; |
90 | + bool IsScaleActiveForGroup() const; |
91 | |
92 | void InitiateExpo(); |
93 | - bool IsExpoActive(); |
94 | + bool IsExpoActive() const; |
95 | + |
96 | + bool IsWallActive() const; |
97 | |
98 | void ShowGrabHandles(CompWindow* window, bool use_timer); |
99 | void HideGrabHandles(CompWindow* window); |
100 | @@ -109,22 +111,22 @@ |
101 | void NotifyCompizEvent(const char* plugin, const char* event, CompOption::Vector& option); |
102 | void NotifyNewDecorationState(guint32 xid); |
103 | |
104 | - guint32 GetActiveWindow(); |
105 | + guint32 GetActiveWindow() const; |
106 | |
107 | void Decorate(guint32 xid); |
108 | void Undecorate(guint32 xid); |
109 | |
110 | // WindowManager implementation |
111 | - bool IsWindowMaximized(guint xid); |
112 | + bool IsWindowMaximized(guint xid) const; |
113 | bool IsWindowDecorated(guint xid); |
114 | - bool IsWindowOnCurrentDesktop(guint xid); |
115 | - bool IsWindowObscured(guint xid); |
116 | - bool IsWindowMapped(guint xid); |
117 | - bool IsWindowVisible(guint32 xid); |
118 | - bool IsWindowOnTop(guint32 xid); |
119 | - bool IsWindowClosable(guint32 xid); |
120 | - bool IsWindowMinimizable(guint32 xid); |
121 | - bool IsWindowMaximizable(guint32 xid); |
122 | + bool IsWindowOnCurrentDesktop(guint xid) const; |
123 | + bool IsWindowObscured(guint xid) const; |
124 | + bool IsWindowMapped(guint xid) const; |
125 | + bool IsWindowVisible(guint32 xid) const; |
126 | + bool IsWindowOnTop(guint32 xid) const; |
127 | + bool IsWindowClosable(guint32 xid) const; |
128 | + bool IsWindowMinimizable(guint32 xid) const; |
129 | + bool IsWindowMaximizable(guint32 xid) const; |
130 | |
131 | void Restore(guint32 xid); |
132 | void RestoreAt(guint32 xid, int x, int y); |
133 | @@ -140,12 +142,12 @@ |
134 | void FocusWindowGroup(std::vector<Window> windows, FocusVisibility, int monitor = -1, bool only_top_win = true); |
135 | bool ScaleWindowGroup(std::vector<Window> windows, int state, bool force); |
136 | |
137 | - bool IsScreenGrabbed(); |
138 | - bool IsViewPortSwitchStarted(); |
139 | - |
140 | - unsigned long long GetWindowActiveNumber (guint32 xid); |
141 | - |
142 | - bool MaximizeIfBigEnough(CompWindow* window); |
143 | + bool IsScreenGrabbed() const; |
144 | + bool IsViewPortSwitchStarted() const; |
145 | + |
146 | + unsigned long long GetWindowActiveNumber (guint32 xid) const; |
147 | + |
148 | + bool MaximizeIfBigEnough(CompWindow* window) const; |
149 | |
150 | int GetWindowMonitor(guint32 xid) const; |
151 | nux::Geometry GetWindowGeometry(guint32 xid) const; |
152 | @@ -155,7 +157,7 @@ |
153 | |
154 | void CheckWindowIntersections(nux::Geometry const& region, bool &active, bool &any); |
155 | |
156 | - int WorkspaceCount(); |
157 | + int WorkspaceCount() const; |
158 | |
159 | void SetCoverageAreaBeforeAutomaximize(float area); |
160 | |
161 | @@ -172,7 +174,7 @@ |
162 | std::string MatchStringForXids(std::vector<Window> *windows); |
163 | void InitiateScale(std::string const& match, int state = 0); |
164 | |
165 | - bool CheckWindowIntersection(nux::Geometry const& region, CompWindow* window); |
166 | + bool CheckWindowIntersection(nux::Geometry const& region, CompWindow* window) const; |
167 | void SetMwmWindowHints(Window xid, MotifWmHints* new_hints); |
168 | |
169 | CompScreen* m_Screen; |
170 | |
171 | === modified file 'unity-shared/PluginAdapterCompiz.cpp' |
172 | --- unity-shared/PluginAdapterCompiz.cpp 2012-07-30 16:47:33 +0000 |
173 | +++ unity-shared/PluginAdapterCompiz.cpp 2012-08-10 23:01:11 +0000 |
174 | @@ -298,7 +298,7 @@ |
175 | } |
176 | |
177 | unsigned long long |
178 | -PluginAdapter::GetWindowActiveNumber (guint32 xid) |
179 | +PluginAdapter::GetWindowActiveNumber (guint32 xid) const |
180 | { |
181 | Window win = xid; |
182 | CompWindow* window; |
183 | @@ -368,23 +368,29 @@ |
184 | } |
185 | |
186 | bool |
187 | -PluginAdapter::IsScaleActive() |
188 | +PluginAdapter::IsScaleActive() const |
189 | { |
190 | return m_Screen->grabExist("scale"); |
191 | } |
192 | |
193 | bool |
194 | -PluginAdapter::IsScaleActiveForGroup() |
195 | +PluginAdapter::IsScaleActiveForGroup() const |
196 | { |
197 | return _spread_windows_state && m_Screen->grabExist("scale"); |
198 | } |
199 | |
200 | bool |
201 | -PluginAdapter::IsExpoActive() |
202 | +PluginAdapter::IsExpoActive() const |
203 | { |
204 | return m_Screen->grabExist("expo"); |
205 | } |
206 | |
207 | +bool |
208 | +PluginAdapter::IsWallActive() const |
209 | +{ |
210 | + return m_Screen->grabExist("wall"); |
211 | +} |
212 | + |
213 | void |
214 | PluginAdapter::InitiateExpo() |
215 | { |
216 | @@ -395,13 +401,13 @@ |
217 | |
218 | // WindowManager implementation |
219 | guint32 |
220 | -PluginAdapter::GetActiveWindow() |
221 | +PluginAdapter::GetActiveWindow() const |
222 | { |
223 | return m_Screen->activeWindow(); |
224 | } |
225 | |
226 | bool |
227 | -PluginAdapter::IsWindowMaximized(guint xid) |
228 | +PluginAdapter::IsWindowMaximized(guint xid) const |
229 | { |
230 | Window win = xid; |
231 | CompWindow* window; |
232 | @@ -456,7 +462,7 @@ |
233 | } |
234 | |
235 | bool |
236 | -PluginAdapter::IsWindowOnCurrentDesktop(guint32 xid) |
237 | +PluginAdapter::IsWindowOnCurrentDesktop(guint32 xid) const |
238 | { |
239 | Window win = xid; |
240 | CompWindow* window; |
241 | @@ -472,7 +478,7 @@ |
242 | } |
243 | |
244 | bool |
245 | -PluginAdapter::IsWindowObscured(guint32 xid) |
246 | +PluginAdapter::IsWindowObscured(guint32 xid) const |
247 | { |
248 | Window win = xid; |
249 | CompWindow* window; |
250 | @@ -505,7 +511,7 @@ |
251 | } |
252 | |
253 | bool |
254 | -PluginAdapter::IsWindowMapped(guint32 xid) |
255 | +PluginAdapter::IsWindowMapped(guint32 xid) const |
256 | { |
257 | Window win = xid; |
258 | CompWindow* window; |
259 | @@ -517,7 +523,7 @@ |
260 | } |
261 | |
262 | bool |
263 | -PluginAdapter::IsWindowVisible(guint32 xid) |
264 | +PluginAdapter::IsWindowVisible(guint32 xid) const |
265 | { |
266 | Window win = xid; |
267 | CompWindow* window; |
268 | @@ -530,7 +536,7 @@ |
269 | } |
270 | |
271 | bool |
272 | -PluginAdapter::IsWindowOnTop(guint32 xid) |
273 | +PluginAdapter::IsWindowOnTop(guint32 xid) const |
274 | { |
275 | Window win = xid; |
276 | CompWindow* window = m_Screen->findWindow(win); |
277 | @@ -569,7 +575,7 @@ |
278 | } |
279 | |
280 | bool |
281 | -PluginAdapter::IsWindowClosable(guint32 xid) |
282 | +PluginAdapter::IsWindowClosable(guint32 xid) const |
283 | { |
284 | Window win = xid; |
285 | CompWindow* window; |
286 | @@ -582,7 +588,7 @@ |
287 | } |
288 | |
289 | bool |
290 | -PluginAdapter::IsWindowMinimizable(guint32 xid) |
291 | +PluginAdapter::IsWindowMinimizable(guint32 xid) const |
292 | { |
293 | Window win = xid; |
294 | CompWindow* window; |
295 | @@ -595,7 +601,7 @@ |
296 | } |
297 | |
298 | bool |
299 | -PluginAdapter::IsWindowMaximizable(guint32 xid) |
300 | +PluginAdapter::IsWindowMaximizable(guint32 xid) const |
301 | { |
302 | Window win = xid; |
303 | CompWindow* window; |
304 | @@ -965,7 +971,7 @@ |
305 | } |
306 | |
307 | bool |
308 | -PluginAdapter::CheckWindowIntersection(nux::Geometry const& region, CompWindow* window) |
309 | +PluginAdapter::CheckWindowIntersection(nux::Geometry const& region, CompWindow* window) const |
310 | { |
311 | int intersect_types = CompWindowTypeNormalMask | CompWindowTypeDialogMask | |
312 | CompWindowTypeModalDialogMask | CompWindowTypeUtilMask; |
313 | @@ -1022,7 +1028,7 @@ |
314 | } |
315 | |
316 | int |
317 | -PluginAdapter::WorkspaceCount() |
318 | +PluginAdapter::WorkspaceCount() const |
319 | { |
320 | return m_Screen->vpSize().width() * m_Screen->vpSize().height(); |
321 | } |
322 | @@ -1105,19 +1111,19 @@ |
323 | } |
324 | |
325 | bool |
326 | -PluginAdapter::IsScreenGrabbed() |
327 | +PluginAdapter::IsScreenGrabbed() const |
328 | { |
329 | return m_Screen->grabbed(); |
330 | } |
331 | |
332 | bool |
333 | -PluginAdapter::IsViewPortSwitchStarted() |
334 | +PluginAdapter::IsViewPortSwitchStarted() const |
335 | { |
336 | return _vp_switch_started; |
337 | } |
338 | |
339 | /* Returns true if the window was maximized */ |
340 | -bool PluginAdapter::MaximizeIfBigEnough(CompWindow* window) |
341 | +bool PluginAdapter::MaximizeIfBigEnough(CompWindow* window) const |
342 | { |
343 | XClassHint classHint; |
344 | Status status; |
345 | |
346 | === modified file 'unity-shared/PluginAdapterStandalone.cpp' |
347 | --- unity-shared/PluginAdapterStandalone.cpp 2012-07-16 18:43:20 +0000 |
348 | +++ unity-shared/PluginAdapterStandalone.cpp 2012-08-10 23:01:11 +0000 |
349 | @@ -125,7 +125,7 @@ |
350 | } |
351 | |
352 | unsigned long long |
353 | -PluginAdapter::GetWindowActiveNumber (guint32 xid) |
354 | +PluginAdapter::GetWindowActiveNumber (guint32 xid) const |
355 | { |
356 | return 0; |
357 | } |
358 | @@ -157,19 +157,19 @@ |
359 | } |
360 | |
361 | bool |
362 | -PluginAdapter::IsScaleActive() |
363 | -{ |
364 | - return false; |
365 | -} |
366 | - |
367 | -bool |
368 | -PluginAdapter::IsScaleActiveForGroup() |
369 | -{ |
370 | - return false; |
371 | -} |
372 | - |
373 | -bool |
374 | -PluginAdapter::IsExpoActive() |
375 | +PluginAdapter::IsScaleActive() const |
376 | +{ |
377 | + return false; |
378 | +} |
379 | + |
380 | +bool |
381 | +PluginAdapter::IsScaleActiveForGroup() const |
382 | +{ |
383 | + return false; |
384 | +} |
385 | + |
386 | +bool |
387 | +PluginAdapter::IsExpoActive() const |
388 | { |
389 | return false; |
390 | } |
391 | @@ -179,15 +179,21 @@ |
392 | { |
393 | } |
394 | |
395 | +bool |
396 | +PluginAdapter::IsWallActive() const |
397 | +{ |
398 | + return false; |
399 | +} |
400 | + |
401 | // WindowManager implementation |
402 | guint32 |
403 | -PluginAdapter::GetActiveWindow() |
404 | +PluginAdapter::GetActiveWindow() const |
405 | { |
406 | return 0; |
407 | } |
408 | |
409 | bool |
410 | -PluginAdapter::IsWindowMaximized(guint xid) |
411 | +PluginAdapter::IsWindowMaximized(guint xid) const |
412 | { |
413 | return false; |
414 | } |
415 | @@ -199,49 +205,49 @@ |
416 | } |
417 | |
418 | bool |
419 | -PluginAdapter::IsWindowOnCurrentDesktop(guint32 xid) |
420 | -{ |
421 | - return false; |
422 | -} |
423 | - |
424 | -bool |
425 | -PluginAdapter::IsWindowObscured(guint32 xid) |
426 | -{ |
427 | - return false; |
428 | -} |
429 | - |
430 | -bool |
431 | -PluginAdapter::IsWindowMapped(guint32 xid) |
432 | -{ |
433 | - return false; |
434 | -} |
435 | - |
436 | -bool |
437 | -PluginAdapter::IsWindowVisible(guint32 xid) |
438 | -{ |
439 | - return false; |
440 | -} |
441 | - |
442 | -bool |
443 | -PluginAdapter::IsWindowOnTop(guint32 xid) |
444 | -{ |
445 | - return false; |
446 | -} |
447 | - |
448 | -bool |
449 | -PluginAdapter::IsWindowClosable(guint32 xid) |
450 | -{ |
451 | - return false; |
452 | -} |
453 | - |
454 | -bool |
455 | -PluginAdapter::IsWindowMinimizable(guint32 xid) |
456 | -{ |
457 | - return false; |
458 | -} |
459 | - |
460 | -bool |
461 | -PluginAdapter::IsWindowMaximizable(guint32 xid) |
462 | +PluginAdapter::IsWindowOnCurrentDesktop(guint32 xid) const |
463 | +{ |
464 | + return false; |
465 | +} |
466 | + |
467 | +bool |
468 | +PluginAdapter::IsWindowObscured(guint32 xid) const |
469 | +{ |
470 | + return false; |
471 | +} |
472 | + |
473 | +bool |
474 | +PluginAdapter::IsWindowMapped(guint32 xid) const |
475 | +{ |
476 | + return false; |
477 | +} |
478 | + |
479 | +bool |
480 | +PluginAdapter::IsWindowVisible(guint32 xid) const |
481 | +{ |
482 | + return false; |
483 | +} |
484 | + |
485 | +bool |
486 | +PluginAdapter::IsWindowOnTop(guint32 xid) const |
487 | +{ |
488 | + return false; |
489 | +} |
490 | + |
491 | +bool |
492 | +PluginAdapter::IsWindowClosable(guint32 xid) const |
493 | +{ |
494 | + return false; |
495 | +} |
496 | + |
497 | +bool |
498 | +PluginAdapter::IsWindowMinimizable(guint32 xid) const |
499 | +{ |
500 | + return false; |
501 | +} |
502 | + |
503 | +bool |
504 | +PluginAdapter::IsWindowMaximizable(guint32 xid) const |
505 | { |
506 | return false; |
507 | } |
508 | @@ -347,7 +353,7 @@ |
509 | } |
510 | |
511 | bool |
512 | -PluginAdapter::CheckWindowIntersection(nux::Geometry const& region, CompWindow* window) |
513 | +PluginAdapter::CheckWindowIntersection(nux::Geometry const& region, CompWindow* window) const |
514 | { |
515 | return false; |
516 | } |
517 | @@ -358,7 +364,7 @@ |
518 | } |
519 | |
520 | int |
521 | -PluginAdapter::WorkspaceCount() |
522 | +PluginAdapter::WorkspaceCount() const |
523 | { |
524 | return 4; |
525 | } |
526 | @@ -379,19 +385,19 @@ |
527 | } |
528 | |
529 | bool |
530 | -PluginAdapter::IsScreenGrabbed() |
531 | +PluginAdapter::IsScreenGrabbed() const |
532 | { |
533 | return false; |
534 | } |
535 | |
536 | bool |
537 | -PluginAdapter::IsViewPortSwitchStarted() |
538 | +PluginAdapter::IsViewPortSwitchStarted() const |
539 | { |
540 | return false; |
541 | } |
542 | |
543 | /* Returns true if the window was maximized */ |
544 | -bool PluginAdapter::MaximizeIfBigEnough(CompWindow* window) |
545 | +bool PluginAdapter::MaximizeIfBigEnough(CompWindow* window) const |
546 | { |
547 | return true; |
548 | } |
549 | |
550 | === modified file 'unity-shared/WindowManager.cpp' |
551 | --- unity-shared/WindowManager.cpp 2012-06-18 02:57:23 +0000 |
552 | +++ unity-shared/WindowManager.cpp 2012-08-10 23:01:11 +0000 |
553 | @@ -23,22 +23,22 @@ |
554 | |
555 | class WindowManagerDummy : public WindowManager |
556 | { |
557 | - guint32 GetActiveWindow() |
558 | - { |
559 | - return 0; |
560 | - } |
561 | - |
562 | - unsigned long long GetWindowActiveNumber (guint32 xid) |
563 | - { |
564 | - return 0; |
565 | - } |
566 | - |
567 | - bool IsScreenGrabbed() |
568 | + guint32 GetActiveWindow() const |
569 | + { |
570 | + return 0; |
571 | + } |
572 | + |
573 | + unsigned long long GetWindowActiveNumber (guint32 xid) const |
574 | + { |
575 | + return 0; |
576 | + } |
577 | + |
578 | + bool IsScreenGrabbed() const |
579 | { |
580 | return false; |
581 | } |
582 | |
583 | - bool IsViewPortSwitchStarted() |
584 | + bool IsViewPortSwitchStarted() const |
585 | { |
586 | return false; |
587 | } |
588 | @@ -48,7 +48,7 @@ |
589 | g_debug("%s", G_STRFUNC); |
590 | } |
591 | |
592 | - bool IsWindowMaximized(guint32 xid) |
593 | + bool IsWindowMaximized(guint32 xid) const |
594 | { |
595 | return false; |
596 | } |
597 | @@ -58,42 +58,42 @@ |
598 | return true; |
599 | } |
600 | |
601 | - bool IsWindowOnCurrentDesktop(guint32 xid) |
602 | - { |
603 | - return true; |
604 | - } |
605 | - |
606 | - bool IsWindowObscured(guint32 xid) |
607 | - { |
608 | - return false; |
609 | - } |
610 | - |
611 | - bool IsWindowMapped(guint32 xid) |
612 | - { |
613 | - return true; |
614 | - } |
615 | - |
616 | - bool IsWindowVisible(guint32 xid) |
617 | - { |
618 | - return true; |
619 | - } |
620 | - |
621 | - bool IsWindowOnTop(guint32 xid) |
622 | - { |
623 | - return false; |
624 | - } |
625 | - |
626 | - bool IsWindowClosable(guint32 xid) |
627 | - { |
628 | - return true; |
629 | - } |
630 | - |
631 | - bool IsWindowMinimizable(guint32 xid) |
632 | - { |
633 | - return true; |
634 | - } |
635 | - |
636 | - bool IsWindowMaximizable(guint32 xid) |
637 | + bool IsWindowOnCurrentDesktop(guint32 xid) const |
638 | + { |
639 | + return true; |
640 | + } |
641 | + |
642 | + bool IsWindowObscured(guint32 xid) const |
643 | + { |
644 | + return false; |
645 | + } |
646 | + |
647 | + bool IsWindowMapped(guint32 xid) const |
648 | + { |
649 | + return true; |
650 | + } |
651 | + |
652 | + bool IsWindowVisible(guint32 xid) const |
653 | + { |
654 | + return true; |
655 | + } |
656 | + |
657 | + bool IsWindowOnTop(guint32 xid) const |
658 | + { |
659 | + return false; |
660 | + } |
661 | + |
662 | + bool IsWindowClosable(guint32 xid) const |
663 | + { |
664 | + return true; |
665 | + } |
666 | + |
667 | + bool IsWindowMinimizable(guint32 xid) const |
668 | + { |
669 | + return true; |
670 | + } |
671 | + |
672 | + bool IsWindowMaximizable(guint32 xid) const |
673 | { |
674 | return true; |
675 | } |
676 | @@ -182,7 +182,7 @@ |
677 | any = false; |
678 | } |
679 | |
680 | - int WorkspaceCount () |
681 | + int WorkspaceCount () const |
682 | { |
683 | return 1; |
684 | } |
685 | @@ -192,13 +192,13 @@ |
686 | g_debug("%s", G_STRFUNC); |
687 | } |
688 | |
689 | - bool IsScaleActive() |
690 | + bool IsScaleActive() const |
691 | { |
692 | g_debug("%s", G_STRFUNC); |
693 | return false; |
694 | } |
695 | |
696 | - bool IsScaleActiveForGroup() |
697 | + bool IsScaleActiveForGroup() const |
698 | { |
699 | g_debug("%s", G_STRFUNC); |
700 | return false; |
701 | @@ -209,7 +209,13 @@ |
702 | g_debug("%s", G_STRFUNC); |
703 | } |
704 | |
705 | - bool IsExpoActive() |
706 | + bool IsExpoActive() const |
707 | + { |
708 | + g_debug("%s", G_STRFUNC); |
709 | + return false; |
710 | + } |
711 | + |
712 | + bool IsWallActive() const |
713 | { |
714 | g_debug("%s", G_STRFUNC); |
715 | return false; |
716 | |
717 | === modified file 'unity-shared/WindowManager.h' |
718 | --- unity-shared/WindowManager.h 2012-06-18 02:57:23 +0000 |
719 | +++ unity-shared/WindowManager.h 2012-08-10 23:01:11 +0000 |
720 | @@ -49,18 +49,18 @@ |
721 | static WindowManager* Default(); |
722 | static void SetDefault(WindowManager* manager); |
723 | |
724 | - virtual guint32 GetActiveWindow() = 0; |
725 | + virtual guint32 GetActiveWindow() const = 0; |
726 | |
727 | - virtual bool IsWindowMaximized(guint32 xid) = 0; |
728 | + virtual bool IsWindowMaximized(guint32 xid) const = 0; |
729 | virtual bool IsWindowDecorated(guint32 xid) = 0; |
730 | - virtual bool IsWindowOnCurrentDesktop(guint32 xid) = 0; |
731 | - virtual bool IsWindowObscured(guint32 xid) = 0; |
732 | - virtual bool IsWindowMapped(guint32 xid) = 0; |
733 | - virtual bool IsWindowVisible(guint32 xid) = 0; |
734 | - virtual bool IsWindowOnTop(guint32 xid) = 0; |
735 | - virtual bool IsWindowClosable(guint32 xid) = 0; |
736 | - virtual bool IsWindowMinimizable(guint32 xid) = 0; |
737 | - virtual bool IsWindowMaximizable(guint32 xid) = 0; |
738 | + virtual bool IsWindowOnCurrentDesktop(guint32 xid) const = 0; |
739 | + virtual bool IsWindowObscured(guint32 xid) const = 0; |
740 | + virtual bool IsWindowMapped(guint32 xid) const = 0; |
741 | + virtual bool IsWindowVisible(guint32 xid) const = 0; |
742 | + virtual bool IsWindowOnTop(guint32 xid) const = 0; |
743 | + virtual bool IsWindowClosable(guint32 xid) const = 0; |
744 | + virtual bool IsWindowMinimizable(guint32 xid) const = 0; |
745 | + virtual bool IsWindowMaximizable(guint32 xid) const = 0; |
746 | |
747 | virtual void ShowDesktop() = 0; |
748 | |
749 | @@ -74,11 +74,13 @@ |
750 | virtual void Lower(guint32 xid) = 0; |
751 | |
752 | virtual void TerminateScale() = 0; |
753 | - virtual bool IsScaleActive() = 0; |
754 | - virtual bool IsScaleActiveForGroup() = 0; |
755 | + virtual bool IsScaleActive() const = 0; |
756 | + virtual bool IsScaleActiveForGroup() const = 0; |
757 | |
758 | virtual void InitiateExpo() = 0; |
759 | - virtual bool IsExpoActive() = 0; |
760 | + virtual bool IsExpoActive() const = 0; |
761 | + |
762 | + virtual bool IsWallActive() const = 0; |
763 | |
764 | virtual void FocusWindowGroup(std::vector<Window> windows, FocusVisibility, int monitor = -1, bool only_top_win = true) = 0; |
765 | virtual bool ScaleWindowGroup(std::vector<Window> windows, int state, bool force) = 0; |
766 | @@ -86,8 +88,8 @@ |
767 | virtual void Decorate(guint32 xid) {}; |
768 | virtual void Undecorate(guint32 xid) {}; |
769 | |
770 | - virtual bool IsScreenGrabbed() = 0; |
771 | - virtual bool IsViewPortSwitchStarted() = 0; |
772 | + virtual bool IsScreenGrabbed() const = 0; |
773 | + virtual bool IsViewPortSwitchStarted() const = 0; |
774 | |
775 | virtual void MoveResizeWindow(guint32 xid, nux::Geometry geometry) = 0; |
776 | void StartMove(guint32 xid, int, int); |
777 | @@ -98,13 +100,13 @@ |
778 | virtual nux::Geometry GetScreenGeometry() const = 0; |
779 | virtual nux::Geometry GetWorkAreaGeometry(guint32 xid = 0) const = 0; |
780 | |
781 | - virtual unsigned long long GetWindowActiveNumber(guint32 xid) = 0; |
782 | + virtual unsigned long long GetWindowActiveNumber(guint32 xid) const = 0; |
783 | |
784 | virtual void SetWindowIconGeometry(Window window, nux::Geometry const& geo) = 0; |
785 | |
786 | virtual void CheckWindowIntersections (nux::Geometry const& region, bool &active, bool &any) = 0; |
787 | |
788 | - virtual int WorkspaceCount() = 0; |
789 | + virtual int WorkspaceCount() const = 0; |
790 | |
791 | virtual bool saveInputFocus() = 0; |
792 | virtual bool restoreInputFocus() = 0; |
Hi,
10 + return (!(results.size() == 1 && 0]->GetIconType () == AbstractLaunche rIcon:: IconType: :TYPE_DESKTOP) && :Default( )->IsWallActive () &&
11 + results[
12 + !WindowManager:
13 + !results.empty());
Can we please change this to be a bit more sane? First of all, you're checking both "results.size() == 1" and then later checking "!results.empty()". If the first is true, the second will always be true. I'm also not a fn of multi-line code that requires you to write "(!(".
71 + self.workspace. switch_ to(0) press(" Ctrl+Alt+ Right") _hold_part_ then_tap( "switcher/ reveal_ normal" ) (self.switcher. terminate) release( "Ctrl+Alt" )
72 + sleep(1)
73 + self.keyboard.
74 + sleep(1)
75 + self.keybinding
76 + self.addCleanup
77 + self.keyboard.
This will leave keys in a pressed state. Please add cleanup actions to release the Ctrl+Alt+Right keys.
Other than that, looks good!