Show Desktop state does not toggle when there are no windows
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ayatana Design |
Fix Committed
|
High
|
John Lea | ||
Unity |
Fix Released
|
High
|
Brandon Schaefer | ||
unity (Ubuntu) |
Fix Released
|
High
|
Brandon Schaefer |
Bug Description
Super+Ctrl+d (or whatever show desktop is bound to) does not toggle the state of PluginAdapter.
[Test Case]
0. Copy test_queryshowd
1. Open some windows.
2. from a ssh or other remote login:
2.a. export DISPLAY=:0.0
2.b. cd $unity_
2.c. autopilot run -v unity.tests.
Observe - "showdesktop state" should follow with what is stated in the test log output.
3. Close all windows on the unity display.
4. repeat 2.c.
Observe - the test will fail because it cannot leave showdesktop mode once it's entered. Note, the showdesktop state is initially 0 meaning disabled, meaning that closing all the windows does not enable showdesktop mode.
Expected - showdesktop state should continue to toggle with the show desktop key.
If this is expected behavior, some autopilot tests need some work.
Related branches
- PS Jenkins bot (community): Approve (continuous-integration)
- Christopher Townsend (community): Approve
- Marco Trevisan (Treviño): Approve
-
Diff: 170 lines (+67/-5)3 files modifiedplugins/unityshell/src/unityshell.cpp (+24/-3)
unity-shared/PluginAdapter.cpp (+41/-2)
unity-shared/PluginAdapter.h (+2/-0)
description: | updated |
Changed in unity: | |
importance: | Undecided → Low |
Changed in unity: | |
milestone: | none → 7.0.0 |
Changed in ayatana-design: | |
status: | New → Fix Committed |
Changed in unity: | |
status: | New → Triaged |
Changed in ayatana-design: | |
importance: | Undecided → High |
assignee: | nobody → John Lea (johnlea) |
Changed in unity (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in unity: | |
milestone: | 7.0.0 → 7.0.1 |
I believe this is the root cause of a large number of autopilot failures when run via the ssh method (when there are no windows open on the unity desktop). The failures have stack traces similar to this: fginther/ work/unity/ unity/tests/ autopilot/ unity/tests/ __init_ _.py", line 109, in check_test_behavior window_ manager. leave_show_ desktop( ) fginther/ work/unity/ unity/tests/ autopilot/ unity/emulators /window_ manager. py", line 46, in leave_show_desktop showdesktop_ active. wait_for( False) python2. 7/dist- packages/ autopilot/ introspection/ dbus.py" , line 172, in wait_for __class_ _.__name_ _, self.name, failure_msg)) showdesktop_ active failed: False != dbus.Boolean(True, variant_level=1)
Traceback (most recent call last):
File "/home/
self.
File "/home/
self.
File "/usr/lib/
% (self.parent.
AssertionError: After 10 seconds test on WindowManager.
The log will also show:
13:07:42.891 INFO __init__:83 - Checking system state for badly behaving test...
13:07:53.501 WARNING __init__:108 - Test left the system in show desktop mode, e
xiting it...
13:07:53.580 INFO window_manager:41 - Leaving show desktop mode.
13:07:53.581 DEBUG X11:125 - Pressing keys 'Ctrl+Super+d' with delay 0.200000
13:07:53.581 DEBUG X11:212 - Sending press event for key: Control_L
13:07:53.783 DEBUG X11:212 - Sending press event for key: Super_L
13:07:53.985 DEBUG X11:212 - Sending press event for key: d
13:07:54.187 DEBUG X11:144 - Releasing keys 'Ctrl+Super+d' with delay 0.200000
13:07:54.188 DEBUG X11:215 - Sending release event for key: d
13:07:54.390 DEBUG X11:215 - Sending release event for key: Super_L
13:07:54.593 DEBUG X11:215 - Sending release event for key: Control_L
The general problem is that autopilot checks the state of showdesktop at the end of each test and attempts to leave it if it is set. As this can't be done when there are no windows open, there is a chance of this failure at the end of each test.