Merge lp:unity/5.0 into lp:~ubuntu-desktop/unity/precise

Proposed by Chris J Arges
Status: Work in progress
Proposed branch: lp:unity/5.0
Merge into: lp:~ubuntu-desktop/unity/precise
Diff against target: 888 lines (+278/-96)
20 files modified
plugins/unityshell/src/DashController.cpp (+17/-3)
plugins/unityshell/src/DashController.h (+3/-0)
plugins/unityshell/src/DashStyle.cpp (+0/-3)
plugins/unityshell/src/DashView.cpp (+14/-9)
plugins/unityshell/src/HudController.cpp (+12/-3)
plugins/unityshell/src/HudController.h (+2/-0)
plugins/unityshell/src/HudView.cpp (+13/-0)
plugins/unityshell/src/IconRenderer.cpp (+36/-10)
plugins/unityshell/src/PluginAdapter.cpp (+1/-1)
plugins/unityshell/src/SwitcherController.cpp (+7/-5)
plugins/unityshell/src/SwitcherController.h (+0/-1)
plugins/unityshell/src/SwitcherModel.h (+2/-2)
plugins/unityshell/src/WindowManager.h (+4/-0)
plugins/unityshell/src/unity-util-accessible.cpp (+2/-2)
plugins/unityshell/src/unityshell.cpp (+96/-51)
plugins/unityshell/src/unityshell.h (+5/-5)
services/panel-indicator-entry-accessible.c (+26/-1)
services/panel-service.c (+20/-0)
tests/autopilot/autopilot/tests/test_dash.py (+9/-0)
tests/autopilot/autopilot/tests/test_hud.py (+9/-0)
To merge this branch: bzr merge lp:unity/5.0
Reviewer Review Type Date Requested Status
Timo Jyrinki Disapprove
Didier Roche-Tolomelli Pending
Review via email: mp+142509@code.launchpad.net

Description of the change

[ Brandon Schaefer ]
  * Change TimeUtil to use int64, so the buffer wont overflow within
    our lifetimes. (LP: #806248)

To post a comment you must log in.
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Looks correct and already released to Ubuntu 12.10 users.

review: Approve
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :
review: Disapprove
lp:unity/5.0 updated
2413. By Marco Trevisan (Treviño)

ResultRendererTile: fix a crash if row.renderer<TextureContainer*>() is null

2414. By Andrea Azzarone

Backport fix for 991637.

Merged branch lp:~andyrock/unity/fix-991637-5.0

2415. By Łukasz Zemczak

Partial backport of Unity trunk revno. 2901 to fix where window decorations are being drawn when they should not be (LP: #1122478) (LP: #1083186).

2416. By Marco Trevisan (Treviño)

UnityWindow: properly draw the panel shadow when a Nux window is focused or during WS switch

If a nux window is the active one, compiz won't draw it, so the code that is doing the
panelShadow drawing is excluded. We need to make sure that this will be executed
also in this case.

2417. By Timo Jyrinki

Release\ 5.20.0

2418. By Łukasz Zemczak

Add a manual test checking the fix for LP: #1122478. We need a manual-test because there is no infrastructure for real testing.. Fixes: . Approved by Christopher Townsend.

2419. By Marco Trevisan (Treviño)

SwitcherController: use again the SwitcherView as non-input window

Otherwise it could only lead to focusing troubles.
Added utilities to manage the WindowManager default close-window keybinding and using
it in our views.

2420. By Christopher Townsend

Fixes issue where minimizing a full screen window would not draw the Launcher and Panel after minimization. This is a backport of lp:unity revno. 3320.

2421. By Brandon Schaefer

We needs to set the focus of the base windows to the Dash/Hud (which ever one is focused), so XIM will accept events to those windows. Allowing XIM to work when this branch lands: lp:~brandontschaefer/nux/xim-support-12-04-SRU

2422. By Christopher Townsend

Check to see if the window is supposed to have decorations instead of the window actually being decorated when Undecorate() is called. This fixes a race condition where windows opened maximized upon login would sometimes have extra decorations. (LP: #1195730)

2423. By Stephen M. Webb

DashStyle: removed debug output thatcould cause a potential security problem (lp: #1051921)

2424. By Andrew Gaul <email address hidden>

PanelService: Disconnect signals connected in on_entry_added

This addresses a memory leak observed in lp:1203607

2425. By Christopher Townsend

Reference the menu in the accessible object. Backport of revno. 2775 of lp:unity. (LP: #913324)

Unmerged revisions

2425. By Christopher Townsend

Reference the menu in the accessible object. Backport of revno. 2775 of lp:unity. (LP: #913324)

2424. By Andrew Gaul <email address hidden>

PanelService: Disconnect signals connected in on_entry_added

This addresses a memory leak observed in lp:1203607

2423. By Stephen M. Webb

DashStyle: removed debug output thatcould cause a potential security problem (lp: #1051921)

2422. By Christopher Townsend

Check to see if the window is supposed to have decorations instead of the window actually being decorated when Undecorate() is called. This fixes a race condition where windows opened maximized upon login would sometimes have extra decorations. (LP: #1195730)

2421. By Brandon Schaefer

We needs to set the focus of the base windows to the Dash/Hud (which ever one is focused), so XIM will accept events to those windows. Allowing XIM to work when this branch lands: lp:~brandontschaefer/nux/xim-support-12-04-SRU

2420. By Christopher Townsend

Fixes issue where minimizing a full screen window would not draw the Launcher and Panel after minimization. This is a backport of lp:unity revno. 3320.

2419. By Marco Trevisan (Treviño)

SwitcherController: use again the SwitcherView as non-input window

Otherwise it could only lead to focusing troubles.
Added utilities to manage the WindowManager default close-window keybinding and using
it in our views.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'plugins/unityshell/resources/launcher_pip_large_ltr.png'
0Binary files plugins/unityshell/resources/launcher_pip_large_ltr.png 1970-01-01 00:00:00 +0000 and plugins/unityshell/resources/launcher_pip_large_ltr.png 2013-10-17 21:01:26 +0000 differ0Binary files plugins/unityshell/resources/launcher_pip_large_ltr.png 1970-01-01 00:00:00 +0000 and plugins/unityshell/resources/launcher_pip_large_ltr.png 2013-10-17 21:01:26 +0000 differ
=== added file 'plugins/unityshell/resources/launcher_pip_large_rtl.png'
1Binary files plugins/unityshell/resources/launcher_pip_large_rtl.png 1970-01-01 00:00:00 +0000 and plugins/unityshell/resources/launcher_pip_large_rtl.png 2013-10-17 21:01:26 +0000 differ1Binary files plugins/unityshell/resources/launcher_pip_large_rtl.png 1970-01-01 00:00:00 +0000 and plugins/unityshell/resources/launcher_pip_large_rtl.png 2013-10-17 21:01:26 +0000 differ
=== modified file 'plugins/unityshell/src/DashController.cpp'
--- plugins/unityshell/src/DashController.cpp 2012-07-18 15:25:17 +0000
+++ plugins/unityshell/src/DashController.cpp 2013-10-17 21:01:26 +0000
@@ -272,18 +272,18 @@
272 }272 }
273273
274 view_->AboutToShow();274 view_->AboutToShow();
275 visible_ = true;
275276
276 window_->ShowWindow(true);277 window_->ShowWindow(true);
277 window_->PushToFront();
278 window_->EnableInputWindow(true, "Dash", true, false);278 window_->EnableInputWindow(true, "Dash", true, false);
279 window_->SetInputFocus();279 FocusInput();
280
280 window_->CaptureMouseDownAnyWhereElse(true);281 window_->CaptureMouseDownAnyWhereElse(true);
281 window_->QueueDraw();282 window_->QueueDraw();
282283
283 nux::GetWindowCompositor().SetKeyFocusArea(view_->default_focus());284 nux::GetWindowCompositor().SetKeyFocusArea(view_->default_focus());
284285
285 need_show_ = false;286 need_show_ = false;
286 visible_ = true;
287287
288 StartShowHideTimeline();288 StartShowHideTimeline();
289289
@@ -292,6 +292,15 @@
292 ubus_manager_.SendMessage(UBUS_OVERLAY_SHOWN, info);292 ubus_manager_.SendMessage(UBUS_OVERLAY_SHOWN, info);
293}293}
294294
295void Controller::FocusInput()
296{
297 if (visible_)
298 {
299 window_->PushToFront();
300 window_->SetInputFocus();
301 }
302}
303
295void Controller::HideDash(bool restore)304void Controller::HideDash(bool restore)
296{305{
297 if (!visible_)306 if (!visible_)
@@ -364,6 +373,11 @@
364 return TRUE;373 return TRUE;
365}374}
366375
376bool Controller::IsVisible() const
377{
378 return visible_;
379}
380
367void Controller::OnActivateRequest(GVariant* variant)381void Controller::OnActivateRequest(GVariant* variant)
368{382{
369 EnsureDash();383 EnsureDash();
370384
=== modified file 'plugins/unityshell/src/DashController.h'
--- plugins/unityshell/src/DashController.h 2012-04-12 13:23:29 +0000
+++ plugins/unityshell/src/DashController.h 2013-10-17 21:01:26 +0000
@@ -58,6 +58,9 @@
5858
59 void HideDash(bool restore_focus = true);59 void HideDash(bool restore_focus = true);
6060
61 void FocusInput();
62 bool IsVisible() const;
63
61protected:64protected:
62 std::string GetName() const;65 std::string GetName() const;
63 void AddProperties(GVariantBuilder* builder);66 void AddProperties(GVariantBuilder* builder);
6467
=== modified file 'plugins/unityshell/src/DashStyle.cpp'
--- plugins/unityshell/src/DashStyle.cpp 2012-06-06 13:18:59 +0000
+++ plugins/unityshell/src/DashStyle.cpp 2013-10-17 21:01:26 +0000
@@ -1504,7 +1504,6 @@
15041504
1505 // blur and blend overlay onto initial image-surface1505 // blur and blend overlay onto initial image-surface
1506 Blur(blurred_cr, blurSize);1506 Blur(blurred_cr, blurSize);
1507 //cairo_surface_write_to_png(surface, "/tmp/overlay-surface.png");
1508 cairo_set_source_surface(cr, surface, 0.0, 0.0);1507 cairo_set_source_surface(cr, surface, 0.0, 0.0);
1509 old = SetBlendMode(cr, mode);1508 old = SetBlendMode(cr, mode);
1510 cairo_paint_with_alpha(cr, opacity);1509 cairo_paint_with_alpha(cr, opacity);
@@ -1724,8 +1723,6 @@
1724 42.0 + 10.0,1723 42.0 + 10.0,
1725 alignment);1724 alignment);
17261725
1727 cairo_surface_write_to_png(cairo_get_target(cr), "/tmp/wut.png");
1728
1729 return true;1726 return true;
1730}1727}
17311728
17321729
=== modified file 'plugins/unityshell/src/DashView.cpp'
--- plugins/unityshell/src/DashView.cpp 2012-06-28 08:49:20 +0000
+++ plugins/unityshell/src/DashView.cpp 2013-10-17 21:01:26 +0000
@@ -33,6 +33,7 @@
33#include "DashSettings.h"33#include "DashSettings.h"
34#include "UBusMessages.h"34#include "UBusMessages.h"
35#include "KeyboardUtil.h"35#include "KeyboardUtil.h"
36#include "WindowManager.h"
3637
37namespace unity38namespace unity
38{39{
@@ -494,7 +495,7 @@
494 });495 });
495496
496 // global search done is handled by the home lens, no need to connect to it497 // global search done is handled by the home lens, no need to connect to it
497 // BUT, we will special case global search finished coming from 498 // BUT, we will special case global search finished coming from
498 // the applications lens, because we want to be able to launch applications499 // the applications lens, because we want to be able to launch applications
499 // immediately without waiting for the search finished signal which will500 // immediately without waiting for the search finished signal which will
500 // be delayed by all the lenses we're searching501 // be delayed by all the lenses we're searching
@@ -808,6 +809,10 @@
808 unsigned long x11_key_code,809 unsigned long x11_key_code,
809 unsigned long special_keys_state)810 unsigned long special_keys_state)
810{811{
812 // Only care about states of Alt, Ctrl, Super, Shift, not the lock keys
813 special_keys_state &= (nux::NUX_STATE_ALT | nux::NUX_STATE_CTRL |
814 nux::NUX_STATE_SUPER | nux::NUX_STATE_SHIFT);
815
811 // Do what nux::View does, but if the event isn't a key navigation,816 // Do what nux::View does, but if the event isn't a key navigation,
812 // designate the text entry to process it.817 // designate the text entry to process it.
813818
@@ -841,15 +846,15 @@
841 // Not sure if Enter should be a navigation key846 // Not sure if Enter should be a navigation key
842 direction = KEY_NAV_ENTER;847 direction = KEY_NAV_ENTER;
843 break;848 break;
844 case NUX_VK_F4:
845 // Maybe we should not do it here, but it needs to be checked where
846 // we are able to know if alt is pressed.
847 if (special_keys_state & NUX_STATE_ALT)
848 {
849 ubus_manager_.SendMessage(UBUS_PLACE_VIEW_CLOSE_REQUEST);
850 }
851 break;
852 default:849 default:
850 auto const& close_key = WindowManager::Default()->close_window_key();
851
852 if (close_key.first == special_keys_state && close_key.second == x11_key_code)
853 {
854 ubus_manager_.SendMessage(UBUS_PLACE_VIEW_CLOSE_REQUEST);
855 return nullptr;
856 }
857
853 direction = KEY_NAV_NONE;858 direction = KEY_NAV_NONE;
854 }859 }
855860
856861
=== modified file 'plugins/unityshell/src/HudController.cpp'
--- plugins/unityshell/src/HudController.cpp 2012-06-19 16:58:14 +0000
+++ plugins/unityshell/src/HudController.cpp 2013-10-17 21:01:26 +0000
@@ -359,17 +359,17 @@
359 LOG_DEBUG(logger) << "Taking application icon: " << focused_app_icon_;359 LOG_DEBUG(logger) << "Taking application icon: " << focused_app_icon_;
360 SetIcon(focused_app_icon_);360 SetIcon(focused_app_icon_);
361361
362 visible_ = true;
363
362 window_->ShowWindow(true);364 window_->ShowWindow(true);
363 window_->PushToFront();
364 window_->EnableInputWindow(true, "Hud", true, false);365 window_->EnableInputWindow(true, "Hud", true, false);
365 window_->SetInputFocus();366 FocusInput();
366 window_->CaptureMouseDownAnyWhereElse(true);367 window_->CaptureMouseDownAnyWhereElse(true);
367 view_->CaptureMouseDownAnyWhereElse(true);368 view_->CaptureMouseDownAnyWhereElse(true);
368 window_->QueueDraw();369 window_->QueueDraw();
369370
370 view_->ResetToDefault();371 view_->ResetToDefault();
371 need_show_ = true;372 need_show_ = true;
372 visible_ = true;
373373
374 StartShowHideTimeline();374 StartShowHideTimeline();
375 view_->SetWindowGeometry(window_->GetAbsoluteGeometry(), window_->GetGeometry());375 view_->SetWindowGeometry(window_->GetAbsoluteGeometry(), window_->GetGeometry());
@@ -384,6 +384,15 @@
384 window_->SetEnterFocusInputArea(view_->default_focus());384 window_->SetEnterFocusInputArea(view_->default_focus());
385}385}
386386
387void Controller::FocusInput()
388{
389 if (visible_)
390 {
391 window_->PushToFront();
392 window_->SetInputFocus();
393 }
394}
395
387void Controller::HideHud(bool restore)396void Controller::HideHud(bool restore)
388{397{
389 LOG_DEBUG (logger) << "hiding the hud";398 LOG_DEBUG (logger) << "hiding the hud";
390399
=== modified file 'plugins/unityshell/src/HudController.h'
--- plugins/unityshell/src/HudController.h 2012-06-15 18:09:57 +0000
+++ plugins/unityshell/src/HudController.h 2013-10-17 21:01:26 +0000
@@ -59,6 +59,8 @@
59 void HideHud(bool restore_focus = true);59 void HideHud(bool restore_focus = true);
60 bool IsVisible();60 bool IsVisible();
6161
62 void FocusInput();
63
62protected:64protected:
63 // Introspectable65 // Introspectable
64 std::string GetName() const;66 std::string GetName() const;
6567
=== modified file 'plugins/unityshell/src/HudView.cpp'
--- plugins/unityshell/src/HudView.cpp 2012-08-20 14:52:48 +0000
+++ plugins/unityshell/src/HudView.cpp 2013-10-17 21:01:26 +0000
@@ -29,6 +29,7 @@
2929
30#include "UBusMessages.h"30#include "UBusMessages.h"
31#include "DashStyle.h"31#include "DashStyle.h"
32#include "WindowManager.h"
3233
33namespace unity34namespace unity
34{35{
@@ -563,6 +564,10 @@
563 unsigned long x11_key_code,564 unsigned long x11_key_code,
564 unsigned long special_keys_state)565 unsigned long special_keys_state)
565{566{
567 // Only care about states of Alt, Ctrl, Super, Shift, not the lock keys
568 special_keys_state &= (nux::NUX_STATE_ALT | nux::NUX_STATE_CTRL |
569 nux::NUX_STATE_SUPER | nux::NUX_STATE_SHIFT);
570
566 nux::KeyNavDirection direction = nux::KEY_NAV_NONE;571 nux::KeyNavDirection direction = nux::KEY_NAV_NONE;
567 switch (x11_key_code)572 switch (x11_key_code)
568 {573 {
@@ -590,6 +595,14 @@
590 direction = nux::KEY_NAV_ENTER;595 direction = nux::KEY_NAV_ENTER;
591 break;596 break;
592 default:597 default:
598 auto const& close_key = WindowManager::Default()->close_window_key();
599
600 if (close_key.first == special_keys_state && close_key.second == x11_key_code)
601 {
602 ubus.SendMessage(UBUS_HUD_CLOSE_REQUEST);
603 return nullptr;
604 }
605
593 direction = nux::KEY_NAV_NONE;606 direction = nux::KEY_NAV_NONE;
594 break;607 break;
595 }608 }
596609
=== modified file 'plugins/unityshell/src/IconRenderer.cpp'
--- plugins/unityshell/src/IconRenderer.cpp 2012-10-17 17:46:12 +0000
+++ plugins/unityshell/src/IconRenderer.cpp 2013-10-17 21:01:26 +0000
@@ -188,6 +188,8 @@
188nux::BaseTexture* progress_bar_fill = 0;188nux::BaseTexture* progress_bar_fill = 0;
189nux::BaseTexture* pip_ltr = 0;189nux::BaseTexture* pip_ltr = 0;
190nux::BaseTexture* pip_rtl = 0;190nux::BaseTexture* pip_rtl = 0;
191nux::BaseTexture* large_pip_ltr = 0;
192nux::BaseTexture* large_pip_rtl = 0;
191nux::BaseTexture* arrow_ltr = 0;193nux::BaseTexture* arrow_ltr = 0;
192nux::BaseTexture* arrow_rtl = 0;194nux::BaseTexture* arrow_rtl = 0;
193nux::BaseTexture* arrow_empty_ltr = 0;195nux::BaseTexture* arrow_empty_ltr = 0;
@@ -871,8 +873,8 @@
871 if (running > 0)873 if (running > 0)
872 {874 {
873 int scale = 1;875 int scale = 1;
874
875 int markerX;876 int markerX;
877
876 if (pip_style == OUTSIDE_TILE)878 if (pip_style == OUTSIDE_TILE)
877 {879 {
878 markerX = geo.x;880 markerX = geo.x;
@@ -880,8 +882,7 @@
880 else882 else
881 {883 {
882 auto bounds = arg.icon->GetTransform(ui::IconTextureSource::TRANSFORM_TILE, monitor);884 auto bounds = arg.icon->GetTransform(ui::IconTextureSource::TRANSFORM_TILE, monitor);
883 markerX = bounds[0].x + 2;885 markerX = bounds[0].x + 1;
884 scale = 2;
885 }886 }
886887
887 nux::TexCoordXForm texxform;888 nux::TexCoordXForm texxform;
@@ -902,26 +903,47 @@
902903
903 if (!arg.running_on_viewport)904 if (!arg.running_on_viewport)
904 {905 {
906 scale = (pip_style == OUTSIDE_TILE) ? 1 : 2;
905 markers[0] = markerCenter;907 markers[0] = markerCenter;
906 texture = local::arrow_empty_ltr;908 texture = local::arrow_empty_ltr;
907 }909 }
908 else if (running == 1)910 else if (running == 1)
909 {911 {
912 scale = (pip_style == OUTSIDE_TILE) ? 1 : 2;
910 markers[0] = markerCenter;913 markers[0] = markerCenter;
911 texture = local::arrow_ltr;914 texture = local::arrow_ltr;
912 }915 }
913 else if (running == 2)916 else if (running == 2)
914 {917 {
915 markers[0] = markerCenter - 2 * scale;918 if (pip_style == OUTSIDE_TILE)
916 markers[1] = markerCenter + 2 * scale;919 {
917 texture = local::pip_ltr;920 texture = local::pip_ltr;
921 markers[0] = markerCenter - 2;
922 markers[1] = markerCenter + 2;
923 }
924 else
925 {
926 texture = local::large_pip_ltr;
927 markers[0] = markerCenter - 4;
928 markers[1] = markerCenter + 4;
929 }
918 }930 }
919 else931 else
920 {932 {
921 markers[0] = markerCenter - 4 * scale;933 if (pip_style == OUTSIDE_TILE)
922 markers[1] = markerCenter;934 {
923 markers[2] = markerCenter + 4 * scale;935 texture = local::pip_ltr;
924 texture = local::pip_ltr;936 markers[0] = markerCenter - 4;
937 markers[1] = markerCenter;
938 markers[2] = markerCenter + 4;
939 }
940 else
941 {
942 texture = local::large_pip_ltr;
943 markers[0] = markerCenter - 8;
944 markers[1] = markerCenter;
945 markers[2] = markerCenter + 8;
946 }
925 }947 }
926948
927949
@@ -1218,10 +1240,12 @@
1218 squircle_shine = load_texture(PKGDATADIR"/squircle_shine_54.png");1240 squircle_shine = load_texture(PKGDATADIR"/squircle_shine_54.png");
12191241
1220 pip_ltr = load_texture(PKGDATADIR"/launcher_pip_ltr.png");1242 pip_ltr = load_texture(PKGDATADIR"/launcher_pip_ltr.png");
1243 large_pip_ltr = load_texture(PKGDATADIR"/launcher_pip_large_ltr.png");
1221 arrow_ltr = load_texture(PKGDATADIR"/launcher_arrow_ltr.png");1244 arrow_ltr = load_texture(PKGDATADIR"/launcher_arrow_ltr.png");
1222 arrow_empty_ltr = load_texture(PKGDATADIR"/launcher_arrow_outline_ltr.png");1245 arrow_empty_ltr = load_texture(PKGDATADIR"/launcher_arrow_outline_ltr.png");
12231246
1224 pip_rtl = load_texture(PKGDATADIR"/launcher_pip_rtl.png");1247 pip_rtl = load_texture(PKGDATADIR"/launcher_pip_rtl.png");
1248 large_pip_rtl = load_texture(PKGDATADIR"/launcher_pip_large_rt.png");
1225 arrow_rtl = load_texture(PKGDATADIR"/launcher_arrow_rtl.png");1249 arrow_rtl = load_texture(PKGDATADIR"/launcher_arrow_rtl.png");
1226 arrow_empty_rtl = load_texture(PKGDATADIR"/launcher_arrow_outline_rtl.png");1250 arrow_empty_rtl = load_texture(PKGDATADIR"/launcher_arrow_outline_rtl.png");
12271251
@@ -1248,6 +1272,8 @@
1248 progress_bar_fill->UnReference();1272 progress_bar_fill->UnReference();
1249 pip_ltr->UnReference();1273 pip_ltr->UnReference();
1250 pip_rtl->UnReference();1274 pip_rtl->UnReference();
1275 large_pip_ltr->UnReference();
1276 large_pip_rtl->UnReference();
1251 arrow_ltr->UnReference();1277 arrow_ltr->UnReference();
1252 arrow_rtl->UnReference();1278 arrow_rtl->UnReference();
1253 arrow_empty_ltr->UnReference();1279 arrow_empty_ltr->UnReference();
12541280
=== modified file 'plugins/unityshell/src/PluginAdapter.cpp'
--- plugins/unityshell/src/PluginAdapter.cpp 2013-04-12 08:54:24 +0000
+++ plugins/unityshell/src/PluginAdapter.cpp 2013-10-17 21:01:26 +0000
@@ -1118,7 +1118,7 @@
1118void1118void
1119PluginAdapter::Undecorate(guint32 xid)1119PluginAdapter::Undecorate(guint32 xid)
1120{1120{
1121 if (!IsWindowDecorated(xid))1121 if (!HasWindowDecorations(xid))
1122 return;1122 return;
11231123
1124 MotifWmHints hints = { 0 };1124 MotifWmHints hints = { 0 };
11251125
=== modified file 'plugins/unityshell/src/SwitcherController.cpp'
--- plugins/unityshell/src/SwitcherController.cpp 2012-07-18 15:25:17 +0000
+++ plugins/unityshell/src/SwitcherController.cpp 2013-10-17 21:01:26 +0000
@@ -40,7 +40,7 @@
40}40}
4141
42Controller::Controller(unsigned int load_timeout)42Controller::Controller(unsigned int load_timeout)
43 : timeout_length(75)43 : timeout_length(50)
44 , detail_on_timeout(true)44 , detail_on_timeout(true)
45 , detail_timeout_length(500)45 , detail_timeout_length(500)
46 , initial_detail_timeout_length(1500)46 , initial_detail_timeout_length(1500)
@@ -91,12 +91,15 @@
91void Controller::Show(ShowMode show, SortMode sort, bool reverse,91void Controller::Show(ShowMode show, SortMode sort, bool reverse,
92 std::vector<AbstractLauncherIcon::Ptr> results)92 std::vector<AbstractLauncherIcon::Ptr> results)
93{93{
94 if (results.empty() || visible_)
95 return;
96
94 if (sort == SortMode::FOCUS_ORDER)97 if (sort == SortMode::FOCUS_ORDER)
95 {98 {
96 std::sort(results.begin(), results.end(), CompareSwitcherItemsPriority);99 std::sort(results.begin(), results.end(), CompareSwitcherItemsPriority);
97 }100 }
98101
99 model_.reset(new SwitcherModel(results));102 model_ = std::make_shared<SwitcherModel>(results);
100 AddChild(model_.get());103 AddChild(model_.get());
101 model_->selection_changed.connect(sigc::mem_fun(this, &Controller::OnModelSelectionChanged));104 model_->selection_changed.connect(sigc::mem_fun(this, &Controller::OnModelSelectionChanged));
102 model_->only_detail_on_viewport = (show == ShowMode::CURRENT_VIEWPORT);105 model_->only_detail_on_viewport = (show == ShowMode::CURRENT_VIEWPORT);
@@ -192,7 +195,8 @@
192195
193 ubus_manager_.SendMessage(UBUS_SWITCHER_START);196 ubus_manager_.SendMessage(UBUS_SWITCHER_START);
194197
195 if (view_window_) {198 if (view_window_)
199 {
196 view_window_->ShowWindow(true);200 view_window_->ShowWindow(true);
197 view_window_->PushToFront();201 view_window_->PushToFront();
198 view_window_->SetOpacity(1.0f);202 view_window_->SetOpacity(1.0f);
@@ -218,7 +222,6 @@
218 view_window_->SetLayout(main_layout_);222 view_window_->SetLayout(main_layout_);
219 view_window_->SetBackgroundColor(nux::Color(0x00000000));223 view_window_->SetBackgroundColor(nux::Color(0x00000000));
220 view_window_->SetGeometry(workarea_);224 view_window_->SetGeometry(workarea_);
221 view_window_->EnableInputWindow(true, "Switcher", false, false);
222 }225 }
223}226}
224227
@@ -303,7 +306,6 @@
303 view_window_->SetOpacity(0.0f);306 view_window_->SetOpacity(0.0f);
304 view_window_->ShowWindow(false);307 view_window_->ShowWindow(false);
305 view_window_->PushToBack();308 view_window_->PushToBack();
306 view_window_->EnableInputWindow(false);
307 }309 }
308310
309 if (show_timer_)311 if (show_timer_)
310312
=== modified file 'plugins/unityshell/src/SwitcherController.h'
--- plugins/unityshell/src/SwitcherController.h 2012-06-25 23:18:15 +0000
+++ plugins/unityshell/src/SwitcherController.h 2013-10-17 21:01:26 +0000
@@ -29,7 +29,6 @@
29#include "SwitcherView.h"29#include "SwitcherView.h"
30#include "UBusWrapper.h"30#include "UBusWrapper.h"
3131
32#include <boost/shared_ptr.hpp>
33#include <sigc++/sigc++.h>32#include <sigc++/sigc++.h>
3433
35#include <Nux/Nux.h>34#include <Nux/Nux.h>
3635
=== modified file 'plugins/unityshell/src/SwitcherModel.h'
--- plugins/unityshell/src/SwitcherModel.h 2012-08-15 18:26:01 +0000
+++ plugins/unityshell/src/SwitcherModel.h 2013-10-17 21:01:26 +0000
@@ -27,7 +27,7 @@
2727
28#include "Introspectable.h"28#include "Introspectable.h"
2929
30#include <boost/shared_ptr.hpp>30#include <memory>
31#include <sigc++/sigc++.h>31#include <sigc++/sigc++.h>
3232
33namespace unity33namespace unity
@@ -39,7 +39,7 @@
39{39{
4040
41public:41public:
42 typedef boost::shared_ptr<SwitcherModel> Ptr;42 typedef std::shared_ptr<SwitcherModel> Ptr;
4343
44 typedef std::vector<launcher::AbstractLauncherIcon::Ptr> Base;44 typedef std::vector<launcher::AbstractLauncherIcon::Ptr> Base;
45 typedef Base::iterator iterator;45 typedef Base::iterator iterator;
4646
=== modified file 'plugins/unityshell/src/WindowManager.h'
--- plugins/unityshell/src/WindowManager.h 2013-04-12 08:54:24 +0000
+++ plugins/unityshell/src/WindowManager.h 2013-10-17 21:01:26 +0000
@@ -20,6 +20,7 @@
20#define WINDOW_MANAGER_H20#define WINDOW_MANAGER_H
2121
22#include <Nux/Nux.h>22#include <Nux/Nux.h>
23#include <NuxCore/Property.h>
23#include <gdk/gdkx.h>24#include <gdk/gdkx.h>
24#include <core/core.h>25#include <core/core.h>
2526
@@ -110,6 +111,9 @@
110 virtual bool saveInputFocus() = 0;111 virtual bool saveInputFocus() = 0;
111 virtual bool restoreInputFocus() = 0;112 virtual bool restoreInputFocus() = 0;
112113
114 // Nux Modifiers, Nux Keycode (= X11 KeySym)
115 nux::Property<std::pair<unsigned, unsigned>> close_window_key;
116
113 // Signals117 // Signals
114 sigc::signal<void, guint32> window_mapped;118 sigc::signal<void, guint32> window_mapped;
115 sigc::signal<void, guint32> window_unmapped;119 sigc::signal<void, guint32> window_unmapped;
116120
=== modified file 'plugins/unityshell/src/unity-util-accessible.cpp'
--- plugins/unityshell/src/unity-util-accessible.cpp 2012-01-04 01:54:41 +0000
+++ plugins/unityshell/src/unity-util-accessible.cpp 2013-10-17 21:01:26 +0000
@@ -324,9 +324,9 @@
324 }324 }
325325
326 atk_event->string = NULL;326 atk_event->string = NULL;
327 if (event->text && event->text[0])327 if (event->dtext && event->dtext[0])
328 {328 {
329 key_unichar = g_utf8_get_char(event->text);329 key_unichar = g_utf8_get_char(event->dtext);
330330
331 if (g_unichar_validate(key_unichar) && g_unichar_isgraph(key_unichar))331 if (g_unichar_validate(key_unichar) && g_unichar_isgraph(key_unichar))
332 {332 {
333333
=== modified file 'plugins/unityshell/src/unityshell.cpp'
--- plugins/unityshell/src/unityshell.cpp 2013-04-12 08:54:24 +0000
+++ plugins/unityshell/src/unityshell.cpp 2013-10-17 21:01:26 +0000
@@ -351,12 +351,6 @@
351 ubus_manager_.RegisterInterest(UBUS_LAUNCHER_END_KEY_SWTICHER,351 ubus_manager_.RegisterInterest(UBUS_LAUNCHER_END_KEY_SWTICHER,
352 sigc::mem_fun(this, &UnityScreen::OnLauncherEndKeyNav));352 sigc::mem_fun(this, &UnityScreen::OnLauncherEndKeyNav));
353353
354 ubus_manager_.RegisterInterest(UBUS_SWITCHER_START,
355 sigc::mem_fun(this, &UnityScreen::OnSwitcherStart));
356
357 ubus_manager_.RegisterInterest(UBUS_SWITCHER_END,
358 sigc::mem_fun(this, &UnityScreen::OnSwitcherEnd));
359
360 g_idle_add_full (G_PRIORITY_DEFAULT, &UnityScreen::initPluginActions, this, NULL);354 g_idle_add_full (G_PRIORITY_DEFAULT, &UnityScreen::initPluginActions, this, NULL);
361 super_keypressed_ = false;355 super_keypressed_ = false;
362356
@@ -944,7 +938,7 @@
944 {938 {
945 /* Create a new keybinding for the Escape key and the current modifiers,939 /* Create a new keybinding for the Escape key and the current modifiers,
946 * compiz will take of the ref-counting of the repeated actions */940 * compiz will take of the ref-counting of the repeated actions */
947 KeyCode escape = XKeysymToKeycode(screen->dpy(), XStringToKeysym("Escape"));941 KeyCode escape = XKeysymToKeycode(screen->dpy(), XK_Escape);
948 CompAction::KeyBinding binding(escape, modifiers);942 CompAction::KeyBinding binding(escape, modifiers);
949943
950 CompActionPtr &escape_action = _escape_actions[target];944 CompActionPtr &escape_action = _escape_actions[target];
@@ -1604,6 +1598,16 @@
1604 break;1598 break;
1605 }1599 }
1606 }1600 }
1601 else if (switcher_controller_->Visible())
1602 {
1603 auto const& close_key = PluginAdapter::Default()->close_window_key();
1604
1605 if (key_sym == close_key.second && XModifiersToNux(event->xkey.state) == close_key.first)
1606 {
1607 switcher_controller_->Hide(false);
1608 skip_other_plugins = true;
1609 }
1610 }
16071611
1608 if (result > 0)1612 if (result > 0)
1609 {1613 {
@@ -1673,10 +1677,9 @@
1673 }1677 }
16741678
1675 if (!skip_other_plugins &&1679 if (!skip_other_plugins &&
1676 screen->otherGrabExist("deco", "move", "switcher", "resize", NULL) &&1680 screen->otherGrabExist("deco", "move", "switcher", "resize", "unity-switcher", nullptr))
1677 !switcher_controller_->Visible())
1678 {1681 {
1679 wt->ProcessForeignEvent(event, NULL);1682 wt->ProcessForeignEvent(event, nullptr);
1680 }1683 }
1681}1684}
16821685
@@ -2105,41 +2108,10 @@
21052108
2106void UnityScreen::OnLauncherEndKeyNav(GVariant* data)2109void UnityScreen::OnLauncherEndKeyNav(GVariant* data)
2107{2110{
2108 RestoreWindow(data);
2109}
2110
2111void UnityScreen::OnSwitcherStart(GVariant* data)
2112{
2113 if (switcher_controller_->Visible())
2114 {
2115 newFocusedWindow = screen->findWindow(switcher_controller_->GetSwitcherInputWindowId());
2116
2117 if (switcher_controller_->GetSwitcherInputWindowId() != screen->activeWindow())
2118 PluginAdapter::Default()->saveInputFocus();
2119
2120 if (newFocusedWindow)
2121 newFocusedWindow->moveInputFocusTo();
2122 }
2123}
2124
2125void UnityScreen::OnSwitcherEnd(GVariant* data)
2126{
2127 RestoreWindow(data);
2128}
2129
2130void UnityScreen::RestoreWindow(GVariant* data)
2131{
2132 bool preserve_focus = false;
2133
2134 if (data)
2135 {
2136 preserve_focus = g_variant_get_boolean(data);
2137 }
2138
2139 // Return input-focus to previously focused window (before key-nav-mode was2111 // Return input-focus to previously focused window (before key-nav-mode was
2140 // entered)2112 // entered)
2141 if (preserve_focus)2113 if (data && g_variant_get_boolean(data))
2142 PluginAdapter::Default ()->restoreInputFocus ();2114 PluginAdapter::Default()->restoreInputFocus();
2143}2115}
21442116
2145bool UnityScreen::ShowHud()2117bool UnityScreen::ShowHud()
@@ -2226,9 +2198,70 @@
2226 return ShowHud();2198 return ShowHud();
2227}2199}
22282200
2201unsigned UnityScreen::CompizModifiersToNux(unsigned input) const
2202{
2203 unsigned modifiers = 0;
2204
2205 if (input & CompAltMask)
2206 {
2207 input &= ~CompAltMask;
2208 input |= Mod1Mask;
2209 }
2210
2211 if (modifiers & CompSuperMask)
2212 {
2213 input &= ~CompSuperMask;
2214 input |= Mod4Mask;
2215 }
2216
2217 return XModifiersToNux(input);
2218}
2219
2220unsigned UnityScreen::XModifiersToNux(unsigned input) const
2221{
2222 unsigned modifiers = 0;
2223
2224 if (input & Mod1Mask)
2225 modifiers |= nux::KEY_MODIFIER_ALT;
2226
2227 if (input & ShiftMask)
2228 modifiers |= nux::KEY_MODIFIER_SHIFT;
2229
2230 if (input & ControlMask)
2231 modifiers |= nux::KEY_MODIFIER_CTRL;
2232
2233 if (input & Mod4Mask)
2234 modifiers |= nux::KEY_MODIFIER_SUPER;
2235
2236 return modifiers;
2237}
2238
2239void UnityScreen::UpdateCloseWindowKey(CompAction::KeyBinding const& keybind)
2240{
2241 KeySym keysym = XkbKeycodeToKeysym(screen->dpy(), keybind.keycode(), 0, 0);
2242 unsigned modifiers = CompizModifiersToNux(keybind.modifiers());
2243
2244 WindowManager::Default()->close_window_key = std::make_pair(modifiers, keysym);
2245}
2246
2229gboolean UnityScreen::initPluginActions(gpointer data)2247gboolean UnityScreen::initPluginActions(gpointer data)
2230{2248{
2231 CompPlugin* p = CompPlugin::find("expo");2249 CompPlugin* p = CompPlugin::find("core");
2250 auto self = static_cast<UnityScreen*>(data);
2251
2252 if (p)
2253 {
2254 for (CompOption& option : p->vTable->getOptions())
2255 {
2256 if (option.name() == "close_window_key")
2257 {
2258 self->UpdateCloseWindowKey(option.value().action().key());
2259 break;
2260 }
2261 }
2262 }
2263
2264 p = CompPlugin::find("expo");
22322265
2233 if (p)2266 if (p)
2234 {2267 {
@@ -2398,7 +2431,7 @@
2398 PAINT_WINDOW_TRANSFORMED_MASK |2431 PAINT_WINDOW_TRANSFORMED_MASK |
2399 PAINT_WINDOW_NO_CORE_INSTANCE_MASK;2432 PAINT_WINDOW_NO_CORE_INSTANCE_MASK;
2400 if (!(mask & nonOcclusionBits) &&2433 if (!(mask & nonOcclusionBits) &&
2401 (window->state() & CompWindowStateFullscreenMask))2434 (window->state() & CompWindowStateFullscreenMask && !window->minimized()))
2402 // And I've been advised to test other things, but they don't work:2435 // And I've been advised to test other things, but they don't work:
2403 // && (attrib.opacity == OPAQUE)) <-- Doesn't work; Only set in glDraw2436 // && (attrib.opacity == OPAQUE)) <-- Doesn't work; Only set in glDraw
2404 // && !window->alpha() <-- Doesn't work; Opaque windows often have alpha2437 // && !window->alpha() <-- Doesn't work; Opaque windows often have alpha
@@ -2639,12 +2672,17 @@
2639 if (n == CompWindowNotifyFocusChange)2672 if (n == CompWindowNotifyFocusChange)
2640 {2673 {
2641 UnityScreen* us = UnityScreen::get(screen);2674 UnityScreen* us = UnityScreen::get(screen);
2642 CompWindow *lw;
26432675
2644 if (us->launcher_controller_->IsOverlayOpen())2676 if (us)
2645 {2677 {
2646 lw = screen->findWindow(us->launcher_controller_->LauncherWindowId(0));2678 if (us->dash_controller_->IsVisible())
2647 lw->moveInputFocusTo();2679 {
2680 us->dash_controller_->FocusInput();
2681 }
2682 else if(us->hud_controller_->IsVisible())
2683 {
2684 us->hud_controller_->FocusInput();
2685 }
2648 }2686 }
2649 }2687 }
2650}2688}
@@ -2995,9 +3033,16 @@
2995 bool status = screen->setOptionForPlugin(plugin, name, v);3033 bool status = screen->setOptionForPlugin(plugin, name, v);
2996 if (status)3034 if (status)
2997 {3035 {
2998 if (strcmp(plugin, "core") == 0 && strcmp(name, "hsize") == 0)3036 if (strcmp(plugin, "core") == 0)
2999 {3037 {
3000 launcher_controller_->UpdateNumWorkspaces(screen->vpSize().width() * screen->vpSize().height());3038 if (strcmp(name, "hsize") == 0 || strcmp(name, "vsize") == 0)
3039 {
3040 launcher_controller_->UpdateNumWorkspaces(screen->vpSize().width() * screen->vpSize().height());
3041 }
3042 else if (strcmp(name, "close_window_key") == 0)
3043 {
3044 UpdateCloseWindowKey(v.action().key());
3045 }
3001 }3046 }
3002 }3047 }
3003 return status;3048 return status;
30043049
=== modified file 'plugins/unityshell/src/unityshell.h'
--- plugins/unityshell/src/unityshell.h 2013-04-12 08:54:24 +0000
+++ plugins/unityshell/src/unityshell.h 2013-10-17 21:01:26 +0000
@@ -232,15 +232,15 @@
232 void OnLauncherStartKeyNav(GVariant* data);232 void OnLauncherStartKeyNav(GVariant* data);
233 void OnLauncherEndKeyNav(GVariant* data);233 void OnLauncherEndKeyNav(GVariant* data);
234234
235 void OnSwitcherStart(GVariant* data);
236 void OnSwitcherEnd(GVariant* data);
237
238 void RestoreWindow(GVariant* data);
239
240 void InitHints();235 void InitHints();
241236
242 void OnPanelStyleChanged();237 void OnPanelStyleChanged();
243238
239 unsigned CompizModifiersToNux(unsigned input) const;
240 unsigned XModifiersToNux(unsigned input) const;
241
242 void UpdateCloseWindowKey(CompAction::KeyBinding const&);
243
244 dash::Settings dash_settings_;244 dash::Settings dash_settings_;
245 dash::Style dash_style_;245 dash::Style dash_style_;
246 panel::Style panel_style_;246 panel::Style panel_style_;
247247
=== modified file 'services/panel-indicator-entry-accessible.c'
--- services/panel-indicator-entry-accessible.c 2012-03-23 12:26:38 +0000
+++ services/panel-indicator-entry-accessible.c 2013-10-17 21:01:26 +0000
@@ -30,6 +30,7 @@
30struct _PanelIndicatorEntryAccessiblePrivate30struct _PanelIndicatorEntryAccessiblePrivate
31{31{
32 IndicatorObjectEntry *entry;32 IndicatorObjectEntry *entry;
33 GtkMenu *menu;
33 PanelService *service;34 PanelService *service;
34 gint x;35 gint x;
35 gint y;36 gint y;
@@ -111,6 +112,25 @@
111}112}
112113
113static void114static void
115panel_indicator_entry_accessible_dispose (GObject *object)
116{
117 PanelIndicatorEntryAccessible *piea;
118
119 g_return_if_fail (PANEL_IS_INDICATOR_ENTRY_ACCESSIBLE (object));
120
121 piea = PANEL_INDICATOR_ENTRY_ACCESSIBLE (object);
122
123 if (piea->priv != NULL)
124 {
125 piea->priv->entry = NULL;
126 g_clear_object(&piea->priv->menu);
127 }
128
129 G_OBJECT_CLASS (panel_indicator_entry_accessible_parent_class)->dispose (object);
130 return;
131}
132
133static void
114panel_indicator_entry_accessible_finalize (GObject *object)134panel_indicator_entry_accessible_finalize (GObject *object)
115{135{
116 PanelIndicatorEntryAccessible *piea;136 PanelIndicatorEntryAccessible *piea;
@@ -136,6 +156,7 @@
136156
137 /* GObject */157 /* GObject */
138 object_class = G_OBJECT_CLASS (klass);158 object_class = G_OBJECT_CLASS (klass);
159 object_class->dispose = panel_indicator_entry_accessible_dispose;
139 object_class->finalize = panel_indicator_entry_accessible_finalize;160 object_class->finalize = panel_indicator_entry_accessible_finalize;
140161
141 /* AtkObject */162 /* AtkObject */
@@ -225,6 +246,10 @@
225246
226 piea = PANEL_INDICATOR_ENTRY_ACCESSIBLE (accessible);247 piea = PANEL_INDICATOR_ENTRY_ACCESSIBLE (accessible);
227 piea->priv->entry = (IndicatorObjectEntry *) data;248 piea->priv->entry = (IndicatorObjectEntry *) data;
249 if (piea->priv->entry->menu != NULL)
250 {
251 piea->priv->menu = g_object_ref(piea->priv->entry->menu);
252 }
228253
229 if (GTK_IS_LABEL (piea->priv->entry->label))254 if (GTK_IS_LABEL (piea->priv->entry->label))
230 {255 {
@@ -253,7 +278,7 @@
253278
254 piea = PANEL_INDICATOR_ENTRY_ACCESSIBLE (accessible);279 piea = PANEL_INDICATOR_ENTRY_ACCESSIBLE (accessible);
255280
256 if (piea->priv->entry->parent_object && GTK_IS_MENU (piea->priv->entry->menu))281 if (piea->priv->entry != NULL && piea->priv->entry->parent_object && piea->priv->menu != NULL && GTK_IS_MENU (piea->priv->menu))
257 n_children = 1;282 n_children = 1;
258283
259 return n_children;284 return n_children;
260285
=== modified file 'services/panel-service.c'
--- services/panel-service.c 2012-04-27 11:42:56 +0000
+++ services/panel-service.c 2013-10-17 21:01:26 +0000
@@ -609,6 +609,16 @@
609 gpointer key, value;609 gpointer key, value;
610610
611 entry = l->data;611 entry = l->data;
612
613 if (GTK_IS_LABEL (entry->label))
614 {
615 g_signal_handlers_disconnect_by_data (entry->label, indicator);
616 }
617 if (GTK_IS_IMAGE (entry->image))
618 {
619 g_signal_handlers_disconnect_by_data (entry->image, indicator);
620 }
621
612 entry_id = get_indicator_entry_id_by_entry (entry);622 entry_id = get_indicator_entry_id_by_entry (entry);
613 g_hash_table_remove (self->priv->id2entry_hash, entry_id);623 g_hash_table_remove (self->priv->id2entry_hash, entry_id);
614 g_free (entry_id);624 g_free (entry_id);
@@ -635,6 +645,7 @@
635 g_object_ref_sink (G_OBJECT (indicator));645 g_object_ref_sink (G_OBJECT (indicator));
636 }646 }
637647
648 g_signal_handlers_disconnect_by_data (indicator, self);
638 g_object_unref (G_OBJECT (indicator));649 g_object_unref (G_OBJECT (indicator));
639}650}
640651
@@ -882,6 +893,15 @@
882 * FIXME this in libappmenu.so to avoid to send an "entry-removed" signal893 * FIXME this in libappmenu.so to avoid to send an "entry-removed" signal
883 * when switching the focus from a window to one of its dialog children */894 * when switching the focus from a window to one of its dialog children */
884895
896 if (GTK_IS_LABEL (entry->label))
897 {
898 g_signal_handlers_disconnect_by_data (entry->label, object);
899 }
900 if (GTK_IS_IMAGE (entry->image))
901 {
902 g_signal_handlers_disconnect_by_data (entry->image, object);
903 }
904
885 gchar *entry_id = get_indicator_entry_id_by_entry (entry);905 gchar *entry_id = get_indicator_entry_id_by_entry (entry);
886 g_hash_table_remove (self->priv->id2entry_hash, entry_id);906 g_hash_table_remove (self->priv->id2entry_hash, entry_id);
887 g_free (entry_id);907 g_free (entry_id);
888908
=== modified file 'tests/autopilot/autopilot/tests/test_dash.py'
--- tests/autopilot/autopilot/tests/test_dash.py 2012-06-27 01:19:32 +0000
+++ tests/autopilot/autopilot/tests/test_dash.py 2013-10-17 21:01:26 +0000
@@ -60,6 +60,15 @@
60 self.keyboard.press_and_release("Alt+F4")60 self.keyboard.press_and_release("Alt+F4")
61 self.assertThat(self.dash.visible, Eventually(Equals(False)))61 self.assertThat(self.dash.visible, Eventually(Equals(False)))
6262
63 def test_alt_f4_close_dash_with_capslock_on(self):
64 """Dash must close on Alt+F4 even when the capslock is turned on."""
65 self.keyboard.press_and_release("Caps_Lock")
66 self.addCleanup(self.keyboard.press_and_release, "Caps_Lock")
67
68 self.dash.ensure_visible()
69 self.keyboard.press_and_release("Alt+F4")
70 self.assertThat(self.dash.visible, Eventually(Equals(False)))
71
63 def test_dash_closes_on_spread(self):72 def test_dash_closes_on_spread(self):
64 """This test shows that when the spread is initiated, the dash closes."""73 """This test shows that when the spread is initiated, the dash closes."""
65 self.dash.ensure_visible()74 self.dash.ensure_visible()
6675
=== modified file 'tests/autopilot/autopilot/tests/test_hud.py'
--- tests/autopilot/autopilot/tests/test_hud.py 2012-06-25 22:02:54 +0000
+++ tests/autopilot/autopilot/tests/test_hud.py 2013-10-17 21:01:26 +0000
@@ -266,6 +266,15 @@
266266
267 self.assertThat(self.hud.visible, Eventually(Equals(False)))267 self.assertThat(self.hud.visible, Eventually(Equals(False)))
268268
269 def test_alt_f4_close_hud_with_capslock_on(self):
270 """Hud must close on Alt+F4 even when the capslock is turned on."""
271 self.keyboard.press_and_release("Caps_Lock")
272 self.addCleanup(self.keyboard.press_and_release, "Caps_Lock")
273
274 self.hud.ensure_visible()
275 self.keyboard.press_and_release("Alt+F4")
276 self.assertThat(self.hud.visible, Eventually(Equals(False)))
277
269278
270class HudLauncherInteractionsTests(HudTestsBase):279class HudLauncherInteractionsTests(HudTestsBase):
271280

Subscribers

People subscribed via source and target branches

to all changes: