From 0c45e41df28ea17be81d2092ace9315c425eccb6 Mon Sep 17 00:00:00 2001 From: Michi Henning Date: Wed, 3 Apr 2013 15:48:20 +1000 Subject: [PATCH 01/62] Fixes bug #1163705 by removing useless const qualifiers for return values, which cause gcc to emit a warning with -Wextra -Wall. (bzr r3267.2.1) --- UnityCore/ResultIterator.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/UnityCore/ResultIterator.h b/UnityCore/ResultIterator.h index 8e7f4636b..d285dc270 100644 --- a/UnityCore/ResultIterator.h +++ b/UnityCore/ResultIterator.h @@ -53,27 +53,27 @@ class ResultIterator : public std::iterator(const ResultIterator& lhs, const ResultIterator& rhs) + friend inline bool operator>(const ResultIterator& lhs, const ResultIterator& rhs) { return (dee_model_get_position(lhs.model_, lhs.iter_) > dee_model_get_position(rhs.model_, rhs.iter_)); } - friend inline bool const operator<=(const ResultIterator& lhs, const ResultIterator& rhs) + friend inline bool operator<=(const ResultIterator& lhs, const ResultIterator& rhs) { return (dee_model_get_position(lhs.model_, lhs.iter_) <= dee_model_get_position(rhs.model_, rhs.iter_)); } - friend inline bool const operator>=(const ResultIterator& lhs, const ResultIterator& rhs) + friend inline bool operator>=(const ResultIterator& lhs, const ResultIterator& rhs) { return (dee_model_get_position(lhs.model_, lhs.iter_) >= dee_model_get_position(rhs.model_, rhs.iter_)); } - friend inline bool const operator==(const ResultIterator& lhs, const ResultIterator& rhs) + friend inline bool operator==(const ResultIterator& lhs, const ResultIterator& rhs) { return (lhs.iter_ == rhs.iter_); } @@ -85,8 +85,8 @@ class ResultIterator : public std::iterator model_; From 5b18e02489b5e7a2ae9c3f2d84151fec83a4131c Mon Sep 17 00:00:00 2001 From: Michi Henning Date: Fri, 5 Apr 2013 08:45:50 +1000 Subject: [PATCH 02/62] Oops, forgot to make corresponding change in .cpp file. (bzr r3267.2.2) --- UnityCore/ResultIterator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UnityCore/ResultIterator.cpp b/UnityCore/ResultIterator.cpp index 24df34135..642e54799 100644 --- a/UnityCore/ResultIterator.cpp +++ b/UnityCore/ResultIterator.cpp @@ -124,13 +124,13 @@ Result& ResultIterator::operator*() return iter_result_; } -bool const ResultIterator::IsLast() +bool ResultIterator::IsLast() { if (!model_) return true; return (dee_model_is_last(model_, iter_)); } -bool const ResultIterator::IsFirst() +bool ResultIterator::IsFirst() { if (!model_) return true; return (dee_model_is_first(model_, iter_)); From 27607cec13e810e07a8bd2ee2fdd674ab8a3e1da Mon Sep 17 00:00:00 2001 From: Andrea Azzarone Date: Fri, 5 Apr 2013 21:09:21 +0200 Subject: [PATCH 03/62] Fix lp 1165097. (bzr r3265.2.4) --- launcher/ApplicationLauncherIcon.cpp | 90 +++++++++++++------- launcher/ApplicationLauncherIcon.h | 14 ++- launcher/SoftwareCenterLauncherIcon.cpp | 2 +- tests/test_application_launcher_icon.cpp | 13 ++- tests/test_software_center_launcher_icon.cpp | 21 +++-- 5 files changed, 97 insertions(+), 43 deletions(-) diff --git a/launcher/ApplicationLauncherIcon.cpp b/launcher/ApplicationLauncherIcon.cpp index c70780f88..5cc254c0b 100644 --- a/launcher/ApplicationLauncherIcon.cpp +++ b/launcher/ApplicationLauncherIcon.cpp @@ -59,7 +59,6 @@ NUX_IMPLEMENT_OBJECT_TYPE(ApplicationLauncherIcon); ApplicationLauncherIcon::ApplicationLauncherIcon(ApplicationPtr const& app) : SimpleLauncherIcon(IconType::APPLICATION) - , app_(app) , _startup_notification_timestamp(0) , _last_scroll_timestamp(0) , _last_scroll_direction(ScrollDirection::DOWN) @@ -88,25 +87,68 @@ ApplicationLauncherIcon::ApplicationLauncherIcon(ApplicationPtr const& app) << ", active: " << (app->active() ? "yes" : "no") << ", running: " << (app->running() ? "yes" : "no"); + SetApplication(app); + + WindowManager& wm = WindowManager::Default(); + wm.window_minimized.connect(sigc::mem_fun(this, &ApplicationLauncherIcon::OnWindowMinimized)); + wm.window_moved.connect(sigc::mem_fun(this, &ApplicationLauncherIcon::OnWindowMoved)); + wm.screen_viewport_switch_ended.connect(sigc::mem_fun(this, &ApplicationLauncherIcon::EnsureWindowState)); + wm.terminate_expo.connect(sigc::mem_fun(this, &ApplicationLauncherIcon::EnsureWindowState)); + + EnsureWindowState(); + UpdateMenus(); + UpdateDesktopFile(); + UpdateBackgroundColor(); + + // hack + SetProgress(0.0f); +} + +ApplicationLauncherIcon::~ApplicationLauncherIcon() +{ + if (app_) + { + app_->sticky = false; + app_->seen = false; + } + + DisconnectApplicationSignalsConnections(); +} + +void ApplicationLauncherIcon::SetApplication(ApplicationPtr const& app) +{ + if (app_ == app) + return; + + app_ = app; + DisconnectApplicationSignalsConnections(); + SetupApplicationSignalsConnections(); +} + +void ApplicationLauncherIcon::SetupApplicationSignalsConnections() +{ // Lambda functions should be fine here because when the application the icon // is only ever removed when the application is closed. - app->window_opened.connect([this](ApplicationWindow const&) { + window_opened_connection_ = app_->window_opened.connect([this](ApplicationWindow const&) { EnsureWindowState(); UpdateMenus(); UpdateIconGeometries(GetCenters()); }); - app->window_closed.connect(sigc::mem_fun(this, &ApplicationLauncherIcon::EnsureWindowState)); - app->window_moved.connect(sigc::hide(sigc::mem_fun(this, &ApplicationLauncherIcon::EnsureWindowState))); - app->urgent.changed.connect([this](bool const& urgent) { + window_closed_connection_ = app_->window_closed.connect(sigc::mem_fun(this, &ApplicationLauncherIcon::EnsureWindowState)); + window_moved_connection_ = app_->window_moved.connect(sigc::hide(sigc::mem_fun(this, &ApplicationLauncherIcon::EnsureWindowState))); + + urgent_changed_connection_ = app_->urgent.changed.connect([this](bool const& urgent) { LOG_DEBUG(logger) << tooltip_text() << " urgent now " << (urgent ? "true" : "false"); SetQuirk(Quirk::URGENT, urgent); }); - app->active.changed.connect([this](bool const& active) { + + active_changed_connection_ = app_->active.changed.connect([this](bool const& active) { LOG_DEBUG(logger) << tooltip_text() << " active now " << (active ? "true" : "false"); SetQuirk(Quirk::ACTIVE, active); }); - app->running.changed.connect([this](bool const& running) { + + running_changed_connection_ = app_->running.changed.connect([this](bool const& running) { LOG_DEBUG(logger) << tooltip_text() << " running now " << (running ? "true" : "false"); SetQuirk(Quirk::RUNNING, running); @@ -131,12 +173,13 @@ ApplicationLauncherIcon::ApplicationLauncherIcon(ApplicationPtr const& app) UpdateIconGeometries(GetCenters()); } }); - app->visible.changed.connect([this](bool const& visible) { + + visible_changed_connection_ = app_->visible.changed.connect([this](bool const& visible) { if (!IsSticky()) SetQuirk(Quirk::VISIBLE, visible); }); - app->closed.connect([this]() { + closed_changed_connection_ = app_->closed.connect([this]() { if (!IsSticky()) { SetQuirk(Quirk::VISIBLE, false); @@ -153,29 +196,18 @@ ApplicationLauncherIcon::ApplicationLauncherIcon(ApplicationPtr const& app) }, ICON_REMOVE_TIMEOUT); } }); - - WindowManager& wm = WindowManager::Default(); - wm.window_minimized.connect(sigc::mem_fun(this, &ApplicationLauncherIcon::OnWindowMinimized)); - wm.window_moved.connect(sigc::mem_fun(this, &ApplicationLauncherIcon::OnWindowMoved)); - wm.screen_viewport_switch_ended.connect(sigc::mem_fun(this, &ApplicationLauncherIcon::EnsureWindowState)); - wm.terminate_expo.connect(sigc::mem_fun(this, &ApplicationLauncherIcon::EnsureWindowState)); - - EnsureWindowState(); - UpdateMenus(); - UpdateDesktopFile(); - UpdateBackgroundColor(); - - // hack - SetProgress(0.0f); } -ApplicationLauncherIcon::~ApplicationLauncherIcon() +void ApplicationLauncherIcon::DisconnectApplicationSignalsConnections() { - if (app_) - { - app_->sticky = false; - app_->seen = false; - } + window_opened_connection_.disconnect(); + window_closed_connection_.disconnect(); + window_moved_connection_.disconnect(); + urgent_changed_connection_.disconnect(); + active_changed_connection_.disconnect(); + running_changed_connection_.disconnect(); + visible_changed_connection_.disconnect(); + closed_changed_connection_.disconnect(); } bool ApplicationLauncherIcon::GetQuirk(AbstractLauncherIcon::Quirk quirk) const diff --git a/launcher/ApplicationLauncherIcon.h b/launcher/ApplicationLauncherIcon.h index 589fb3e95..83978114f 100644 --- a/launcher/ApplicationLauncherIcon.h +++ b/launcher/ApplicationLauncherIcon.h @@ -71,6 +71,7 @@ class ApplicationLauncherIcon : public SimpleLauncherIcon void PerformScroll(ScrollDirection direction, Time timestamp) override; protected: + void SetApplication(ApplicationPtr const& app); void Remove(); void UpdateIconGeometries(std::vector center); void OnCenterStabilized(std::vector center); @@ -97,7 +98,6 @@ class ApplicationLauncherIcon : public SimpleLauncherIcon void UpdateDesktopFile(); void UpdateRemoteUri(); std::string _desktop_file; - ApplicationPtr app_; private: typedef unsigned long int WindowFilterMask; @@ -109,6 +109,8 @@ class ApplicationLauncherIcon : public SimpleLauncherIcon ON_ALL_MONITORS = (1 << 3), }; + void SetupApplicationSignalsConnections(); + void DisconnectApplicationSignalsConnections(); void EnsureWindowState(); void EnsureMenuItemsWindowsReady(); void EnsureMenuItemsReady(); @@ -128,6 +130,7 @@ class ApplicationLauncherIcon : public SimpleLauncherIcon std::string GetDesktopID(); WindowList GetWindowsOnCurrentDesktopInStackingOrder(); + ApplicationPtr app_; std::string _remote_uri; Time _startup_notification_timestamp; Time _last_scroll_timestamp; @@ -145,6 +148,15 @@ class ApplicationLauncherIcon : public SimpleLauncherIcon bool use_custom_bg_color_; nux::Color bg_color_; + + sigc::connection window_opened_connection_; + sigc::connection window_closed_connection_; + sigc::connection window_moved_connection_; + sigc::connection urgent_changed_connection_; + sigc::connection active_changed_connection_; + sigc::connection running_changed_connection_; + sigc::connection visible_changed_connection_; + sigc::connection closed_changed_connection_; }; } diff --git a/launcher/SoftwareCenterLauncherIcon.cpp b/launcher/SoftwareCenterLauncherIcon.cpp index fd7c377a8..417af8659 100644 --- a/launcher/SoftwareCenterLauncherIcon.cpp +++ b/launcher/SoftwareCenterLauncherIcon.cpp @@ -205,7 +205,7 @@ void SoftwareCenterLauncherIcon::OnFinished(GVariant *params) std::string new_desktop_path = GetActualDesktopFileAfterInstall(); // exchange the temp Application with the real one - app_ = ApplicationManager::Default().GetApplicationForDesktopFile(new_desktop_path); + SetApplication(ApplicationManager::Default().GetApplicationForDesktopFile(new_desktop_path)); UpdateDesktopFile(); UpdateRemoteUri(); diff --git a/tests/test_application_launcher_icon.cpp b/tests/test_application_launcher_icon.cpp index fb42ec6b0..1515a0aa8 100644 --- a/tests/test_application_launcher_icon.cpp +++ b/tests/test_application_launcher_icon.cpp @@ -14,7 +14,7 @@ * version 3 along with this program. If not, see * * - * Authored by: Andrea Azzarone + * Authored by: Andrea Azzarone * Brandon Schaefer * Marco Trevisan */ @@ -102,6 +102,17 @@ struct TestApplicationLauncherIcon : Test nux::ObjectPtr mock_icon; }; +TEST_F(TestApplicationLauncherIcon, ApplicationSignalDisconnection) +{ + std::shared_ptr app = std::make_shared(USC_DESKTOP); + { + nux::ObjectPtr icon(new NiceMock(app)); + EXPECT_FALSE(app->closed.empty()); + } + + EXPECT_TRUE(app->closed.empty()); +} + TEST_F(TestApplicationLauncherIcon, Position) { EXPECT_EQ(usc_icon->position(), AbstractLauncherIcon::Position::FLOATING); diff --git a/tests/test_software_center_launcher_icon.cpp b/tests/test_software_center_launcher_icon.cpp index 5ace17902..f866b2185 100644 --- a/tests/test_software_center_launcher_icon.cpp +++ b/tests/test_software_center_launcher_icon.cpp @@ -24,13 +24,14 @@ #include #include -#include "ApplicationManager.h" +#include "mock-application.h" #include "SoftwareCenterLauncherIcon.h" #include "Launcher.h" #include "PanelStyle.h" #include "UnitySettings.h" #include "test_utils.h" +using namespace testmocks; using namespace unity; using namespace unity::launcher; @@ -40,6 +41,7 @@ namespace launcher { const std::string LOCAL_DATA_DIR = BUILDDIR"/tests/data"; const std::string USC_DESKTOP = LOCAL_DATA_DIR+"/applications/ubuntu-software-center.desktop"; +const std::string USC_APP_INSTALL_DESKTOP = "/usr/share/app-install/desktop/software-center:ubuntu-software-center.desktop"; class MockSoftwareCenterLauncherIcon : public SoftwareCenterLauncherIcon { @@ -54,14 +56,13 @@ class MockSoftwareCenterLauncherIcon : public SoftwareCenterLauncherIcon using SoftwareCenterLauncherIcon::_desktop_file; using SoftwareCenterLauncherIcon::GetRemoteUri; using SoftwareCenterLauncherIcon::OnFinished; - }; struct TestSoftwareCenterLauncherIcon : testing::Test { public: TestSoftwareCenterLauncherIcon() - : usc(ApplicationManager::Default().GetApplicationForDesktopFile(USC_DESKTOP)) + : usc(std::make_shared(USC_APP_INSTALL_DESKTOP, "softwarecenter")) , icon(usc, "/com/canonical/unity/test/object/path", "") {} @@ -79,7 +80,8 @@ TEST_F(TestSoftwareCenterLauncherIcon, Construction) TEST_F(TestSoftwareCenterLauncherIcon, DesktopFileTransformTrivial) { // no transformation needed - EXPECT_EQ(icon.GetActualDesktopFileAfterInstall(), USC_DESKTOP); + icon._desktop_file = USC_DESKTOP; + EXPECT_EQ(icon.GetActualDesktopFileAfterInstall(), USC_DESKTOP); } TEST_F(TestSoftwareCenterLauncherIcon, DesktopFileTransformAppInstall) @@ -101,19 +103,16 @@ TEST_F(TestSoftwareCenterLauncherIcon, DesktopFileTransformSCAgent) // and ensure that the remote uri is updated from temp location to // the real location TEST_F(TestSoftwareCenterLauncherIcon, OnFinished) -{ - - // simulate desktop file from app-install-data - icon._desktop_file = "/usr/share/app-install/desktop/software-center:ubuntu-software-center.desktop"; - +{ // now simulate that the install was successful GVariant *params = g_variant_new("(s)", "exit-success"); icon.OnFinished(params); // and verify that both the desktop file and the remote uri gets updated + EXPECT_EQ(icon._desktop_file, USC_DESKTOP); - EXPECT_EQ(icon.GetRemoteUri(), - "application://ubuntu-software-center.desktop"); + EXPECT_EQ(icon.GetRemoteUri(), "application://ubuntu-software-center.desktop"); + EXPECT_TRUE(usc->closed.empty()); g_variant_unref(params); } From 0fc3cb79bad057ddb581d040221e870a21495a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 8 Apr 2013 04:51:52 +0200 Subject: [PATCH 04/62] TextureCache: add default textures loader for unity path And some usual cleanup... (bzr r3279.3.1) --- unity-shared/TextureCache.cpp | 35 +++++++++++++++++------------------ unity-shared/TextureCache.h | 10 ++++++---- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/unity-shared/TextureCache.cpp b/unity-shared/TextureCache.cpp index e5e9ebc28..83a945b5e 100644 --- a/unity-shared/TextureCache.cpp +++ b/unity-shared/TextureCache.cpp @@ -22,25 +22,23 @@ #include #include +#include "config.h" namespace unity { DECLARE_LOGGER(logger, "unity.internal.texturecache"); -TextureCache::TextureCache() -{ -} - -TextureCache::~TextureCache() -{ -} - TextureCache& TextureCache::GetDefault() { static TextureCache instance; return instance; } +nux::BaseTexture* TextureCache::DefaultTexturesLoader(std::string const& name, int w, int h) +{ + return nux::CreateTexture2DFromFile((PKGDATADIR"/" + name).c_str(), -1, true); +} + std::string TextureCache::Hash(std::string const& id, int width, int height) { std::ostringstream sout; @@ -50,17 +48,22 @@ std::string TextureCache::Hash(std::string const& id, int width, int height) TextureCache::BaseTexturePtr TextureCache::FindTexture(std::string const& texture_id, int width, int height, - CreateTextureCallback slot) + CreateTextureCallback factory) { - if (!slot) + if (!factory) return BaseTexturePtr(); - std::string key = Hash(texture_id, width, height); - BaseTexturePtr texture(cache_[key]); + std::string const& key = Hash(texture_id, width, height); + auto texture_it = cache_.find(key); + + BaseTexturePtr texture(texture_it != cache_.end() ? texture_it->second : nullptr); if (!texture) { - texture = slot(texture_id, width, height); + texture.Adopt(factory(texture_id, width, height)); + + if (!texture) + return texture; // Now here is the magic. // @@ -79,10 +82,6 @@ TextureCache::BaseTexturePtr TextureCache::FindTexture(std::string const& textur // are destroyed first, then the sigc::trackable disconnects all methods // created using mem_fun. - // Reduce the internal reference count of the texture, so the smart - // pointer is the sole owner of the object. - texture->UnReference(); - cache_[key] = texture.GetPointer(); auto on_destroy = sigc::mem_fun(this, &TextureCache::OnDestroyNotify); @@ -92,7 +91,7 @@ TextureCache::BaseTexturePtr TextureCache::FindTexture(std::string const& textur return texture; } -void TextureCache::OnDestroyNotify(nux::Trackable* Object, std::string key) +void TextureCache::OnDestroyNotify(nux::Trackable* Object, std::string const& key) { cache_.erase(key); } diff --git a/unity-shared/TextureCache.h b/unity-shared/TextureCache.h index 5cc569abb..e3d05b058 100644 --- a/unity-shared/TextureCache.h +++ b/unity-shared/TextureCache.h @@ -40,24 +40,26 @@ class TextureCache : public sigc::trackable public: typedef nux::ObjectPtr BaseTexturePtr; + ~TextureCache() = default; + // id, width, height -> texture typedef std::function CreateTextureCallback; static TextureCache& GetDefault(); + static nux::BaseTexture* DefaultTexturesLoader(std::string const&, int, int); - BaseTexturePtr FindTexture(std::string const& texture_id, int width, int height, CreateTextureCallback callback); + BaseTexturePtr FindTexture(std::string const& texture_id, int width = 0, int height = 0, CreateTextureCallback callback = DefaultTexturesLoader); // Return the current size of the cache. std::size_t Size() const; private: - TextureCache(); - ~TextureCache(); + TextureCache() = default; std::string Hash(std::string const& , int width, int height); // Have the key passed by value not referece, as the key will be a bound // parameter in the slot passed to the texture on_destroy signal. - void OnDestroyNotify(nux::Trackable* Object, std::string key); + void OnDestroyNotify(nux::Trackable* Object, std::string const& key); std::map cache_; }; From 8494916df3f9e032a09b0aa70dd01e637fbe1f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 8 Apr 2013 04:53:18 +0200 Subject: [PATCH 05/62] PanelView: use TextureCache (bzr r3279.3.2) --- panel/PanelView.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/panel/PanelView.cpp b/panel/PanelView.cpp index 25c053807..c7dc9dbd6 100644 --- a/panel/PanelView.cpp +++ b/panel/PanelView.cpp @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -35,6 +34,7 @@ #include #include "unity-shared/PanelStyle.h" +#include "unity-shared/TextureCache.h" #include "unity-shared/WindowManager.h" #include "unity-shared/UBusMessages.h" #include @@ -128,9 +128,10 @@ PanelView::PanelView(NUX_FILE_LINE_DECL) bg_effect_helper_.owner = this; //FIXME (gord)- replace with async loading - panel_sheen_.Adopt(nux::CreateTexture2DFromFile(PKGDATADIR"/dash_sheen.png", -1, true)); - bg_refine_tex_.Adopt(nux::CreateTexture2DFromFile(PKGDATADIR"/refine_gradient_panel.png", -1, true)); - bg_refine_single_column_tex_.Adopt(nux::CreateTexture2DFromFile(PKGDATADIR"/refine_gradient_panel_single_column.png", -1, true)); + TextureCache& cache = TextureCache::GetDefault(); + panel_sheen_ = cache.FindTexture("dash_sheen.png"); + bg_refine_tex_ = cache.FindTexture("refine_gradient_panel.png"); + bg_refine_single_column_tex_ = cache.FindTexture("refine_gradient_panel_single_column.png"); rop.Blend = true; rop.SrcBlend = GL_ONE; From d55a97d0c269d86287e32260ed2803bf206a6bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 8 Apr 2013 04:54:30 +0200 Subject: [PATCH 06/62] DashStyle: use TextureCache (bzr r3279.3.3) --- unity-shared/DashStyle.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/unity-shared/DashStyle.cpp b/unity-shared/DashStyle.cpp index fd3dffd43..97ab73411 100755 --- a/unity-shared/DashStyle.cpp +++ b/unity-shared/DashStyle.cpp @@ -42,6 +42,7 @@ #include "CairoTexture.h" #include "JSONParser.h" +#include "TextureCache.h" #include "UnitySettings.h" #include "config.h" @@ -2547,19 +2548,8 @@ nux::BaseTexture* LazyLoadTexture::texture() void LazyLoadTexture::LoadTexture() { - std::string full_path = PKGDATADIR + filename_; - glib::Object pixbuf; - glib::Error error; - - pixbuf = ::gdk_pixbuf_new_from_file_at_size(full_path.c_str(), size_, size_, &error); - if (error) - { - LOG_WARN(logger) << "Unable to texture " << full_path << ": " << error; - } - else - { - texture_.Adopt(nux::CreateTexture2DFromPixbuf(pixbuf, true)); - } + TextureCache& cache = TextureCache::GetDefault(); + texture_ = cache.FindTexture(filename_, size_, size_); } } // anon namespace From a6442e3f617eb4810988c4d0dfeaa53b7d0a84ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 8 Apr 2013 04:55:39 +0200 Subject: [PATCH 07/62] Launcher: update to use TextureCache API (bzr r3279.3.4) --- launcher/Launcher.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/launcher/Launcher.cpp b/launcher/Launcher.cpp index dd13a8815..77b537246 100644 --- a/launcher/Launcher.cpp +++ b/launcher/Launcher.cpp @@ -198,12 +198,8 @@ Launcher::Launcher(MockableBaseWindow* parent, icon_renderer->SetTargetSize(_icon_size, _icon_image_size, _space_between_icons); TextureCache& cache = TextureCache::GetDefault(); - TextureCache::CreateTextureCallback cb = [&](std::string const& name, int width, int height) { - return nux::CreateTexture2DFromFile((PKGDATADIR"/" + name + ".png").c_str(), -1, true); - }; - - launcher_sheen_ = cache.FindTexture("dash_sheen", 0, 0, cb); - launcher_pressure_effect_ = cache.FindTexture("launcher_pressure_effect", 0, 0, cb); + launcher_sheen_ = cache.FindTexture("dash_sheen.png"); + launcher_pressure_effect_ = cache.FindTexture("launcher_pressure_effect.png"); options.changed.connect(sigc::mem_fun(this, &Launcher::OnOptionsChanged)); monitor.changed.connect(sigc::mem_fun(this, &Launcher::OnMonitorChanged)); From a8ba5354d86534032e8c209c0b38b668c118835c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 8 Apr 2013 04:57:18 +0200 Subject: [PATCH 08/62] WindowButtons: Use TextureCache (bzr r3279.3.5) --- unity-shared/WindowButtons.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unity-shared/WindowButtons.cpp b/unity-shared/WindowButtons.cpp index 02644d669..f9c634a11 100644 --- a/unity-shared/WindowButtons.cpp +++ b/unity-shared/WindowButtons.cpp @@ -29,6 +29,7 @@ #include "WindowButtons.h" #include "WindowButtonPriv.h" +#include "unity-shared/TextureCache.h" #include "unity-shared/UBusMessages.h" #include "unity-shared/WindowManager.h" @@ -176,8 +177,8 @@ nux::ObjectPtr WindowButton::GetDashWindowButton(panel::Window std::string subpath = names[static_cast(type)] + states[static_cast(state)] + ".png"; - glib::String filename(g_build_filename(PKGDATADIR, subpath.c_str(), NULL)); - texture.Adopt(nux::CreateTexture2DFromFile(filename, -1, true)); + auto& cache = TextureCache::GetDefault(); + texture = cache.FindTexture(subpath); if (!texture) texture = panel::Style::Instance().GetFallbackWindowButton(type, state); From 53c5539ba550fde8c15b92474b6f66b4e0b8cc5c Mon Sep 17 00:00:00 2001 From: Automatic PS uploader Date: Mon, 8 Apr 2013 04:02:51 +0000 Subject: [PATCH 09/62] Releasing 7.0.0daily13.04.08-0ubuntu1, based on r3283 (bzr r3283.1.1) --- debian/changelog | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/debian/changelog b/debian/changelog index bc409d4a4..f4a48816a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +unity (7.0.0daily13.04.08-0ubuntu1) raring; urgency=low + + [ Tigran Gabrielyan ] + * [UIFe] Window list in right click context menu should indicate the + focused window (LP: #1152477) + + [ Andrea Azzarone ] + * Launcher - When a app is automatically placed in the Launcher after + being installed from the Software Center, it should be in the 'non- + running' state (LP: #987727) + + [ Ubuntu daily release ] + * Automatic snapshot from revision 3283 + + -- Ubuntu daily release Mon, 08 Apr 2013 04:02:51 +0000 + unity (7.0.0daily13.04.05.2-0ubuntu1) raring; urgency=low * Revert r3266 "Don't close the dash when switching from the command lens From b78de25f8fb3e5c8c5030bb712b5d9a578fa6983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 8 Apr 2013 15:06:01 +0200 Subject: [PATCH 10/62] PanelStyle: Use TextureCache for WindowButtons (bzr r3279.3.6) --- unity-shared/PanelStyle.cpp | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/unity-shared/PanelStyle.cpp b/unity-shared/PanelStyle.cpp index 95c53d17f..a2e9aa691 100644 --- a/unity-shared/PanelStyle.cpp +++ b/unity-shared/PanelStyle.cpp @@ -34,6 +34,7 @@ #include "PanelStyle.h" #include +#include "unity-shared/TextureCache.h" #include "unity-shared/UnitySettings.h" namespace unity @@ -222,20 +223,30 @@ std::vector Style::GetWindowButtonFileNames(WindowButtonType type, BaseTexturePtr Style::GetWindowButton(WindowButtonType type, WindowState state) { - BaseTexturePtr texture; + auto texture_factory = [this, type, state] (std::string const&, int, int) { + nux::BaseTexture* texture = nullptr; - for (auto const& file : GetWindowButtonFileNames(type, state)) - { - texture.Adopt(nux::CreateTexture2DFromFile(file.c_str(), -1, true)); + for (auto const& file : GetWindowButtonFileNames(type, state)) + { + texture = nux::CreateTexture2DFromFile(file.c_str(), -1, true); - if (texture) - break; - } + if (texture) + return texture; + } + + auto const& fallback = GetFallbackWindowButton(type, state); + texture = fallback.GetPointer(); + texture->Reference(); + + return texture; + }; - if (!texture) - texture = GetFallbackWindowButton(type, state); + auto& cache = TextureCache::GetDefault(); + std::string texture_id = "window-button-"; + texture_id += std::to_string(static_cast(type)); + texture_id += std::to_string(static_cast(state)); - return texture; + return cache.FindTexture(texture_id, 0, 0, texture_factory); } BaseTexturePtr Style::GetFallbackWindowButton(WindowButtonType type, From aea6f24da4665cf098c6a90c2a52b5c7e7ed6dda Mon Sep 17 00:00:00 2001 From: Chris Townsend Date: Mon, 8 Apr 2013 10:35:06 -0400 Subject: [PATCH 11/62] Revert the glow intensity of icons in keyboard nav mode due a visual regression in the Switcher icons. (bzr r3283.2.1) --- unity-shared/IconRenderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unity-shared/IconRenderer.cpp b/unity-shared/IconRenderer.cpp index acc6d3a8f..abde15337 100644 --- a/unity-shared/IconRenderer.cpp +++ b/unity-shared/IconRenderer.cpp @@ -485,7 +485,7 @@ void IconRenderer::RenderIcon(nux::GraphicsEngine& GfxContext, RenderArg const& colorify = nux::color::White; background_tile_colorify = nux::color::White; backlight_intensity = 0.95f; - glow_intensity = 1.3f; + glow_intensity = 1.0f; shadow_intensity = 0.0f; background = textures_->icon_selected_background[size]; From 9bfec2ec1e77fb11c22db306d0b21639f50d053d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 8 Apr 2013 18:21:26 +0200 Subject: [PATCH 12/62] PanelView: repeat a 1-px wide texture, instead of building a bigger one (bzr r3279.3.7) --- panel/PanelView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panel/PanelView.cpp b/panel/PanelView.cpp index c7dc9dbd6..f638bbf70 100644 --- a/panel/PanelView.cpp +++ b/panel/PanelView.cpp @@ -513,10 +513,10 @@ PanelView::UpdateBackground() opacity = 1.0f; } - auto tex = panel::Style::Instance().GetBackground(geo.width, geo.height, opacity); + auto tex = panel::Style::Instance().GetBackground(1, geo.height, opacity); nux::TexCoordXForm texxform; texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD); - texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_REPEAT); + texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_CLAMP); bg_layer_.reset(new nux::TextureLayer(tex->GetDeviceTexture(), texxform, nux::color::White, true, rop)); From ed4e841f0e2d4ba9a961e69c599bdd4bbae4f3bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 8 Apr 2013 19:36:51 +0200 Subject: [PATCH 13/62] PanelStyle: build an 1 x panel_height texture in GetBackground It's up to the clients to repeat it for the panel width. (bzr r3279.3.8) --- unity-shared/PanelStyle.cpp | 7 +++++-- unity-shared/PanelStyle.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/unity-shared/PanelStyle.cpp b/unity-shared/PanelStyle.cpp index a2e9aa691..ecc63e911 100644 --- a/unity-shared/PanelStyle.cpp +++ b/unity-shared/PanelStyle.cpp @@ -168,8 +168,11 @@ GtkStyleContext* Style::GetStyleContext() return _style_context; } -BaseTexturePtr Style::GetBackground(int width, int height, float opacity) +BaseTexturePtr Style::GetBackground() { + int width = 1; + int height = panel_height(); + nux::CairoGraphics context(CAIRO_FORMAT_ARGB32, width, height); // Use the internal context as we know it is good and shiny new. @@ -178,7 +181,7 @@ BaseTexturePtr Style::GetBackground(int width, int height, float opacity) gtk_render_background(_style_context, cr, 0, 0, width, height); gtk_render_frame(_style_context, cr, 0, 0, width, height); cairo_pop_group_to_source(cr); - cairo_paint_with_alpha(cr, opacity); + cairo_paint(cr); return texture_ptr_from_cairo_graphics(context); } diff --git a/unity-shared/PanelStyle.h b/unity-shared/PanelStyle.h index 681c54b2b..f14ba2e0a 100644 --- a/unity-shared/PanelStyle.h +++ b/unity-shared/PanelStyle.h @@ -71,7 +71,7 @@ class Style typedef nux::ObjectPtr BaseTexturePtr; GtkStyleContext* GetStyleContext(); - BaseTexturePtr GetBackground(int width, int height, float opacity); + BaseTexturePtr GetBackground(); BaseTexturePtr GetWindowButton(WindowButtonType type, WindowState state); BaseTexturePtr GetFallbackWindowButton(WindowButtonType type, WindowState state); std::vector GetWindowButtonFileNames(WindowButtonType type, WindowState state); From 82ce2f1683a452fdc782fdf91af00893b758f656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 8 Apr 2013 19:38:37 +0200 Subject: [PATCH 14/62] PanelView: some code-cleanup, reduce computation when updating BG Texture (bzr r3279.3.9) --- panel/PanelView.cpp | 34 +++++++++++++++------------------- panel/PanelView.h | 2 +- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/panel/PanelView.cpp b/panel/PanelView.cpp index f638bbf70..85f92ec58 100644 --- a/panel/PanelView.cpp +++ b/panel/PanelView.cpp @@ -189,7 +189,8 @@ void PanelView::OnBackgroundUpdate(GVariant *data) bg_color_.blue = blue; bg_color_.alpha = alpha; - ForceUpdateBackground(); + if (overlay_is_open_) + ForceUpdateBackground(); } void PanelView::OnOverlayHidden(GVariant* data) @@ -268,7 +269,7 @@ PanelView::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) GfxContext.PushClippingRectangle(geo); - if ((overlay_is_open_ || (opacity_ != 1.0f && opacity_ != 0.0f))) + if (IsTransparent()) { nux::Geometry const& geo_absolute = GetAbsoluteGeometry(); nux::Geometry blur_geo(geo_absolute.x, geo_absolute.y, geo.width, geo.height); @@ -282,7 +283,7 @@ PanelView::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) bg_blur_texture_ = bg_effect_helper_.GetRegion(blur_geo); } - if (bg_blur_texture_.IsValid() && (overlay_is_open_ || opacity_ != 1.0f)) + if (bg_blur_texture_.IsValid()) { nux::TexCoordXForm texxform_blur_bg; texxform_blur_bg.flip_v_coord = true; @@ -372,8 +373,7 @@ PanelView::DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw) GfxContext.GetRenderStates().SetBlend(true); GfxContext.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER); - if (bg_blur_texture_.IsValid() && - (overlay_is_open_ || (opacity_ != 1.0f && opacity_ != 0.0f))) + if (bg_blur_texture_.IsValid() && IsTransparent()) { nux::Geometry const& geo_absolute = GetAbsoluteGeometry(); nux::TexCoordXForm texxform_blur_bg; @@ -483,12 +483,9 @@ PanelView::DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw) void PanelView::UpdateBackground() { - nux::Geometry const& geo = GetGeometry(); - - if (!is_dirty_ && geo == last_geo_) + if (!is_dirty_) return; - last_geo_ = geo; is_dirty_ = false; nux::ROPConfig rop; @@ -513,13 +510,13 @@ PanelView::UpdateBackground() opacity = 1.0f; } - auto tex = panel::Style::Instance().GetBackground(1, geo.height, opacity); + auto const& tex = panel::Style::Instance().GetBackground(); nux::TexCoordXForm texxform; texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD); texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_CLAMP); bg_layer_.reset(new nux::TextureLayer(tex->GetDeviceTexture(), texxform, - nux::color::White, true, rop)); + nux::color::White * opacity, true, rop)); } } @@ -528,12 +525,6 @@ void PanelView::ForceUpdateBackground() is_dirty_ = true; UpdateBackground(); - indicators_->QueueDraw(); - tray_->QueueDraw(); - - if (!overlay_is_open_) - menu_view_->QueueDraw(); - QueueDraw(); } @@ -704,12 +695,17 @@ void PanelView::SetOpacity(float opacity) if (opacity_ == opacity) return; - opacity_ = opacity; - bg_effect_helper_.enabled = (opacity_ < 1.0f || overlay_is_open_); + opacity_ = (opacity <= 0.0f ? 0.0001f : opacity); // Not to get a black menu area + bg_effect_helper_.enabled = IsTransparent(); ForceUpdateBackground(); } +bool PanelView::IsTransparent() +{ + return (opacity_ < 1.0f || overlay_is_open_); +} + void PanelView::SetMenuShowTimings(int fadein, int fadeout, int discovery, int discovery_fadein, int discovery_fadeout) { diff --git a/panel/PanelView.h b/panel/PanelView.h index d0f2f3d2c..f6a8d64df 100644 --- a/panel/PanelView.h +++ b/panel/PanelView.h @@ -91,6 +91,7 @@ class PanelView : public unity::debug::Introspectable, public nux::View void OnOverlayShown(GVariant *data); void OnOverlayHidden(GVariant *data); + bool IsTransparent(); void UpdateBackground(); void ForceUpdateBackground(); bool TrackMenuPointer(); @@ -116,7 +117,6 @@ class PanelView : public unity::debug::Introspectable, public nux::View BaseTexturePtr bg_refine_single_column_tex_; std::unique_ptr bg_refine_single_column_layer_; - nux::Geometry last_geo_; nux::Color bg_color_; std::string active_overlay_; nux::Point tracked_pointer_pos_; From 2a7104bbc5b76e18702b018c853f7657e357d7ff Mon Sep 17 00:00:00 2001 From: Brandon Schaefer Date: Mon, 8 Apr 2013 13:27:29 -0700 Subject: [PATCH 15/62] * Fixes this branch that was reverted: lp:~brandontschaefer/unity/ap-panel-test-fix/ * Missed adding WindowButtons to the child of DashView :(, causing them to not be found in the AP test (bzr r3284.1.1) --- dash/DashView.cpp | 2 + tests/autopilot/unity/emulators/dash.py | 20 ++++ tests/autopilot/unity/tests/test_panel.py | 113 +++++++++++----------- unity-shared/OverlayWindowButtons.cpp | 11 +++ unity-shared/OverlayWindowButtons.h | 5 +- 5 files changed, 93 insertions(+), 58 deletions(-) diff --git a/dash/DashView.cpp b/dash/DashView.cpp index 14b8d8241..b37887b58 100644 --- a/dash/DashView.cpp +++ b/dash/DashView.cpp @@ -139,6 +139,8 @@ DashView::DashView(Lenses::Ptr const& lenses, ApplicationStarter::Ptr const& app SetupViews(); SetupUBusConnections(); + AddChild(overlay_window_buttons_.GetPointer()); + lenses_->lens_added.connect(sigc::mem_fun(this, &DashView::OnLensAdded)); mouse_down.connect(sigc::mem_fun(this, &DashView::OnMouseButtonDown)); preview_state_machine_.PreviewActivated.connect(sigc::mem_fun(this, &DashView::BuildPreview)); diff --git a/tests/autopilot/unity/emulators/dash.py b/tests/autopilot/unity/emulators/dash.py index a4796f73d..1514467b4 100644 --- a/tests/autopilot/unity/emulators/dash.py +++ b/tests/autopilot/unity/emulators/dash.py @@ -13,6 +13,8 @@ from autopilot.keybindings import KeybindingsHelper from testtools.matchers import GreaterThan +from unity.emulators.panel import WindowButtons + from unity.emulators import UnityIntrospectionObject import logging import dbus @@ -156,6 +158,12 @@ def geometry(self): class DashView(UnityIntrospectionObject): """The dash view.""" + def __get_window_buttons(self): + """Return the overlay window buttons view.""" + buttons = self.get_children_by_type(OverlayWindowButtons) + assert(len(buttons) == 1) + return buttons[0] + def get_searchbar(self): """Get the search bar attached to this dash view.""" return self.get_children_by_type(SearchBar)[0] @@ -178,6 +186,18 @@ def get_preview_container(self): return preview_container return None + @property + def window_buttons(self): + return self.__get_window_buttons().window_buttons() + + +class OverlayWindowButtons(UnityIntrospectionObject): + """The Overlay window buttons class""" + + def window_buttons(self): + buttons = self.get_children_by_type(WindowButtons) + assert(len(buttons) == 1) + return buttons[0] class SearchBar(UnityIntrospectionObject): """The search bar for the dash view.""" diff --git a/tests/autopilot/unity/tests/test_panel.py b/tests/autopilot/unity/tests/test_panel.py index 94d53011b..6cf1fa374 100644 --- a/tests/autopilot/unity/tests/test_panel.py +++ b/tests/autopilot/unity/tests/test_panel.py @@ -516,72 +516,71 @@ def test_minimize_button_does_nothing_for_dash(self): sleep(5) self.assertThat(self.unity.dash.visible, Eventually(Equals(True))) - def test_window_buttons_maximization_buttons_works_for_dash(self): - """'Maximize' and 'Restore' buttons (when both enabled) must work as expected.""" - # Mega-TODO: - # - # This test is terrible. The docstring is terrible. The test id is terrible. - # Someone needs to split this into several smaller tests. However, I'm - # not doing that in this branch. Consider this an invitation to split - # this test out and make it suck less. - # - # For your sanity I have annotated it with comments. + def test_window_buttons_maximize_or_restore_dash(self): + """Tests that the Maximize/Restore button works for the dash.""" + self.unity.dash.ensure_visible() - self.addCleanup(self.panel.window_buttons.close.mouse_click) - - unmaximize = self.panel.window_buttons.unmaximize - maximize = self.panel.window_buttons.maximize - - # "netbook" means "dash is maximised" - dash_maximised = (self.unity.dash.view.form_factor == "netbook") - - # this if statement will trigger only when we're on very small screens, - # where it doesn't make sense to have the dash anything other than - # maximised. - if dash_maximised and not unmaximize.enabled: - unmaximize.mouse_click() - # nice long sleep to make sure that any changes have time to process. - sleep(5) - self.assertThat(self.unity.dash.view.form_factor, Equals("netbook")) + self.addCleanup(self.unity.dash.ensure_hidden) + + desired_max = not self.unity.dash.view.dash_maximized + if desired_max: + self.panel.window_buttons.maximize.mouse_click() else: - # we are able to resize the dash. - # maximise and unmaximise (restore) buttons are shown in the same place - # but only one is shown at once: - if maximize.visible: - active_button = maximize - inactive_button = unmaximize - else: - active_button = unmaximize - inactive_button = maximize + self.panel.window_buttons.unmaximize.mouse_click() - self.assertThat(active_button.visible, Eventually(Equals(True))) - self.assertThat(active_button.sensitive, Eventually(Equals(True))) - self.assertThat(active_button.enabled, Eventually(Equals(True))) - self.assertThat(inactive_button.visible, Eventually(Equals(False))) + self.assertThat(self.unity.dash.view.dash_maximized, Eventually(Equals(desired_max))) - self.addCleanup(inactive_button.mouse_click) - active_button.mouse_click() + def test_window_buttons_active_inactive_states(self): + """Tests that the maximized/restore buttons are in the correct state when the + dash is open. Asserting states: visible, sensitive, enabled. + """ - self.assertThat(inactive_button.visible, Eventually(Equals(True))) - self.assertThat(inactive_button.sensitive, Eventually(Equals(True))) - self.assertThat(inactive_button.enabled, Eventually(Equals(True))) - self.assertThat(active_button.visible, Eventually(Equals(False))) + self.unity.dash.ensure_visible() + self.addCleanup(self.unity.dash.ensure_hidden) - if dash_maximised: - self.assertThat(self.unity.dash.view.form_factor, Eventually(Equals("desktop"))) - else: - self.assertThat(self.unity.dash.view.form_factor, Eventually(Equals("netbook"))) + unmaximize = self.unity.dash.view.window_buttons.unmaximize + maximize = self.unity.dash.view.window_buttons.maximize - self.addCleanup(active_button.mouse_click) - inactive_button.mouse_click() + desired_max = not self.unity.dash.view.dash_maximized + if desired_max: + active = maximize + inactive = unmaximize + else: + active = unmaximize + inactive = maximize + + self.assertThat(active.visible, Eventually(Equals(True))) + self.assertThat(active.sensitive, Eventually(Equals(True))) + self.assertThat(active.enabled, Eventually(Equals(True))) + self.assertThat(inactive.visible, Eventually(Equals(False))) + + def test_window_buttons_state_switch_on_click(self): + """Tests that when clicking the maximize/restore window button it + switchs its state from either maximize to restore, or restore to + maximize. + """ - self.assertThat(active_button.visible, Eventually(Equals(True))) - self.assertThat(inactive_button.visible, Eventually(Equals(False))) + self.unity.dash.ensure_visible() + self.addCleanup(self.unity.dash.ensure_hidden) - if dash_maximised: - self.assertThat(self.unity.dash.view.form_factor, Eventually(Equals("netbook"))) - else: - self.assertThat(self.unity.dash.view.form_factor, Eventually(Equals("desktop"))) + unmaximize = self.unity.dash.view.window_buttons.unmaximize + maximize = self.unity.dash.view.window_buttons.maximize + + desired_max = not self.unity.dash.view.dash_maximized + if desired_max: + active = maximize + inactive = unmaximize + else: + active = unmaximize + inactive = maximize + + active.mouse_click() + + self.assertThat(inactive.visible, Eventually(Equals(True))) + self.assertThat(inactive.sensitive, Eventually(Equals(True))) + self.assertThat(inactive.enabled, Eventually(Equals(True))) + self.assertThat(active.visible, Eventually(Equals(False))) + self.assertThat(self.unity.dash.view.dash_maximized, Eventually(Equals(desired_max))) def test_minimize_button_disabled_for_non_minimizable_windows(self): """Minimize button must be disabled for windows that don't support minimization.""" diff --git a/unity-shared/OverlayWindowButtons.cpp b/unity-shared/OverlayWindowButtons.cpp index bdf609639..641698e98 100644 --- a/unity-shared/OverlayWindowButtons.cpp +++ b/unity-shared/OverlayWindowButtons.cpp @@ -36,6 +36,7 @@ OverlayWindowButtons::OverlayWindowButtons() : nux::BaseWindow("OverlayWindowButtons") , window_buttons_(new WindowButtons()) { + AddChild(window_buttons_.GetPointer()); UpdateGeometry(); SetBackgroundColor(nux::color::Transparent); } @@ -86,4 +87,14 @@ void OverlayWindowButtons::Draw(nux::GraphicsEngine& gfx_context, bool force_dra window_buttons_->ProcessDraw(gfx_context, true); } + +// Introspection +std::string OverlayWindowButtons::GetName() const +{ + return "OverlayWindowButtons"; +} + +void OverlayWindowButtons::AddProperties(GVariantBuilder* builder) +{} + } // namespace unity diff --git a/unity-shared/OverlayWindowButtons.h b/unity-shared/OverlayWindowButtons.h index ec6a274fd..8bde1b591 100644 --- a/unity-shared/OverlayWindowButtons.h +++ b/unity-shared/OverlayWindowButtons.h @@ -28,7 +28,7 @@ namespace unity { -class OverlayWindowButtons : public nux::BaseWindow +class OverlayWindowButtons : public nux::BaseWindow, public debug::Introspectable { NUX_DECLARE_OBJECT_TYPE(OverlayWindowButtons, nux::BaseWindow); public: @@ -43,6 +43,9 @@ class OverlayWindowButtons : public nux::BaseWindow protected: void Draw(nux::GraphicsEngine& gfx_context, bool force_draw); + std::string GetName() const; + void AddProperties(GVariantBuilder* builder); + private: void UpdateGeometry(); From be423f12e806a1450a16a13e1dc3f11df9f020f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 9 Apr 2013 01:10:55 +0200 Subject: [PATCH 16/62] unityshell: use a repeated texture to paint the panel below dash And draw it only in the display where we actually have the dash. (bzr r3279.3.10) --- plugins/unityshell/src/unityshell.cpp | 28 ++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index e2a8eadea..6e762039e 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -811,22 +811,26 @@ void UnityScreen::paintDisplay() void UnityScreen::DrawTopPanelBackground() { - auto graphics_engine = nux::GetGraphicsDisplay()->GetGraphicsEngine(); if (!graphics_engine->UsingGLSLCodePath() || !launcher_controller_->IsOverlayOpen() || !paint_panel_) - return; + return; + + if (_last_output->id() != screen->currentOutputDev().id()) + return; if (TopPanelBackgroundTextureNeedsUpdate()) UpdateTopPanelBackgroundTexture(); if (panel_texture_.IsValid()) { + auto& graphics_engine = nux::GetGraphicsDisplay()->GetGraphicsEngine(); graphics_engine->ResetModelViewMatrixStack(); graphics_engine->Push2DTranslationModelViewMatrix(0.0f, 0.0f, 0.0f); graphics_engine->ResetProjectionMatrix(); graphics_engine->SetOrthographicProjectionMatrix(screen->width (), screen->height()); nux::TexCoordXForm texxform; + texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_CLAMP); int panel_height = panel_style_.panel_height; graphics_engine->QRP_GLSL_1Tex(0, 0, screen->width (), panel_height, panel_texture_, texxform, nux::color::White); } @@ -842,7 +846,7 @@ void UnityScreen::UpdateTopPanelBackgroundTexture() auto &panel_style = panel::Style::Instance(); panel_texture_.Release(); - auto texture = panel_style.GetBackground(screen->width(), screen->height(), 1.0f); + auto texture = panel_style.GetBackground(); if (texture) panel_texture_ = texture->GetDeviceTexture(); @@ -2599,17 +2603,15 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, { if (uScreen->doShellRepaint && !uScreen->paint_panel_ && window->type() == CompWindowTypeNormalMask) { - guint32 id = window->id(); - bool maximized = WindowManager::Default().IsWindowMaximized(id); - bool on_current = window->onCurrentDesktop(); - bool override_redirect = window->overrideRedirect(); - bool managed = window->managed(); - CompPoint viewport = window->defaultViewport(); - int output = window->outputDevice(); - - if (maximized && on_current && !override_redirect && managed && viewport == uScreen->screen->vp() && output == (int)uScreen->screen->currentOutputDev().id()) + if ((window->state() & MAXIMIZE_STATE) && window->onCurrentDesktop() && !window->overrideRedirect() && window->managed()) { - uScreen->paint_panel_ = true; + CompPoint const& viewport = window->defaultViewport(); + unsigned output = window->outputDevice(); + + if (viewport == uScreen->screen->vp() && output == uScreen->screen->currentOutputDev().id()) + { + uScreen->paint_panel_ = true; + } } } From 32d4407bc2a3910b9285bc23563cd60dfe46f4ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 9 Apr 2013 01:24:29 +0200 Subject: [PATCH 17/62] PanelStyle: cache the panel background texture (bzr r3279.3.11) --- unity-shared/PanelStyle.cpp | 12 ++++++++++-- unity-shared/PanelStyle.h | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/unity-shared/PanelStyle.cpp b/unity-shared/PanelStyle.cpp index ecc63e911..ba0768224 100644 --- a/unity-shared/PanelStyle.cpp +++ b/unity-shared/PanelStyle.cpp @@ -139,7 +139,7 @@ void Style::Refresh() GdkRGBA rgba_text_color; glib::String theme_name; bool updated = false; - + GtkSettings* settings = gtk_settings_get_default(); g_object_get(settings, "gtk-theme-name", &theme_name, nullptr); @@ -160,7 +160,10 @@ void Style::Refresh() } if (updated) + { + _bg_texture.Release(); changed.emit(); + } } GtkStyleContext* Style::GetStyleContext() @@ -170,6 +173,9 @@ GtkStyleContext* Style::GetStyleContext() BaseTexturePtr Style::GetBackground() { + if (_bg_texture) + return _bg_texture; + int width = 1; int height = panel_height(); @@ -183,7 +189,9 @@ BaseTexturePtr Style::GetBackground() cairo_pop_group_to_source(cr); cairo_paint(cr); - return texture_ptr_from_cairo_graphics(context); + _bg_texture = texture_ptr_from_cairo_graphics(context); + + return _bg_texture; } /*! diff --git a/unity-shared/PanelStyle.h b/unity-shared/PanelStyle.h index f14ba2e0a..9118aaf86 100644 --- a/unity-shared/PanelStyle.h +++ b/unity-shared/PanelStyle.h @@ -88,6 +88,7 @@ class Style glib::Object _style_context; glib::Object _gsettings; + BaseTexturePtr _bg_texture; std::string _theme_name; nux::Color _text_color; From 9e410640fd6d57dbcf31fffdc6bd3bf492f2e380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 9 Apr 2013 01:26:54 +0200 Subject: [PATCH 18/62] unityshell: cleanup the code to paint the panel under dash, use style-cached texture. (bzr r3279.3.12) --- plugins/unityshell/src/unityshell.cpp | 61 +++++++++------------------ plugins/unityshell/src/unityshell.h | 8 +--- 2 files changed, 21 insertions(+), 48 deletions(-) diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 6e762039e..b693f3d3e 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -146,8 +146,7 @@ UnityScreen::UnityScreen(CompScreen* screen) , last_scroll_event_(0) , hud_keypress_time_(0) , first_menu_keypress_time_(0) - , panel_texture_has_changed_(true) - , paint_panel_(false) + , paint_panel_under_dash_(false) , scale_just_activated_(false) , big_tick_(0) , screen_introspection_(screen) @@ -705,8 +704,6 @@ UnityWindow::updateIconPos (int &wx, void UnityScreen::OnPanelStyleChanged() { - panel_texture_has_changed_ = true; - // Reload the windows themed textures UnityWindow::CleanupSharedTextures(); @@ -723,7 +720,7 @@ void UnityScreen::paintDisplay() { CompOutput *output = _last_output; - DrawTopPanelBackground(); + DrawPanelUnderDash(); auto gpu_device = nux::GetGraphicsDisplay()->GetGpuDevice(); @@ -809,49 +806,29 @@ void UnityScreen::paintDisplay() didShellRepaint = true; } -void UnityScreen::DrawTopPanelBackground() +void UnityScreen::DrawPanelUnderDash() { - - if (!graphics_engine->UsingGLSLCodePath() || !launcher_controller_->IsOverlayOpen() || !paint_panel_) + if (!paint_panel_under_dash_ || !launcher_controller_->IsOverlayOpen()) return; if (_last_output->id() != screen->currentOutputDev().id()) return; - if (TopPanelBackgroundTextureNeedsUpdate()) - UpdateTopPanelBackgroundTexture(); - - if (panel_texture_.IsValid()) - { - auto& graphics_engine = nux::GetGraphicsDisplay()->GetGraphicsEngine(); - graphics_engine->ResetModelViewMatrixStack(); - graphics_engine->Push2DTranslationModelViewMatrix(0.0f, 0.0f, 0.0f); - graphics_engine->ResetProjectionMatrix(); - graphics_engine->SetOrthographicProjectionMatrix(screen->width (), screen->height()); - - nux::TexCoordXForm texxform; - texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_CLAMP); - int panel_height = panel_style_.panel_height; - graphics_engine->QRP_GLSL_1Tex(0, 0, screen->width (), panel_height, panel_texture_, texxform, nux::color::White); - } -} + auto graphics_engine = nux::GetGraphicsDisplay()->GetGraphicsEngine(); -bool UnityScreen::TopPanelBackgroundTextureNeedsUpdate() const -{ - return panel_texture_has_changed_ || !panel_texture_.IsValid(); -} - -void UnityScreen::UpdateTopPanelBackgroundTexture() -{ - auto &panel_style = panel::Style::Instance(); - - panel_texture_.Release(); - auto texture = panel_style.GetBackground(); + if (!graphics_engine->UsingGLSLCodePath()) + return; - if (texture) - panel_texture_ = texture->GetDeviceTexture(); + graphics_engine->ResetModelViewMatrixStack(); + graphics_engine->Push2DTranslationModelViewMatrix(0.0f, 0.0f, 0.0f); + graphics_engine->ResetProjectionMatrix(); + graphics_engine->SetOrthographicProjectionMatrix(screen->width(), screen->height()); - panel_texture_has_changed_ = false; + nux::TexCoordXForm texxform; + texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_CLAMP); + int panel_height = panel_style_.panel_height; + auto const& texture = panel_style_.GetBackground()->GetDeviceTexture(); + graphics_engine->QRP_GLSL_1Tex(0, 0, screen->width(), panel_height, texture, texxform, nux::color::White); } bool UnityScreen::forcePaintOnTop () @@ -1260,7 +1237,7 @@ bool UnityScreen::glPaintOutput(const GLScreenPaintAttrib& attrib, allowWindowPaint = true; _last_output = output; - paint_panel_ = false; + paint_panel_under_dash_ = false; // CompRegion has no clear() method. So this is the fastest alternative. fullscreenRegion = CompRegion(); @@ -2601,7 +2578,7 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, const CompRegion& region, unsigned int mask) { - if (uScreen->doShellRepaint && !uScreen->paint_panel_ && window->type() == CompWindowTypeNormalMask) + if (uScreen->doShellRepaint && !uScreen->paint_panel_under_dash_ && window->type() == CompWindowTypeNormalMask) { if ((window->state() & MAXIMIZE_STATE) && window->onCurrentDesktop() && !window->overrideRedirect() && window->managed()) { @@ -2610,7 +2587,7 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, if (viewport == uScreen->screen->vp() && output == uScreen->screen->currentOutputDev().id()) { - uScreen->paint_panel_ = true; + uScreen->paint_panel_under_dash_ = true; } } } diff --git a/plugins/unityshell/src/unityshell.h b/plugins/unityshell/src/unityshell.h index 2d01142b0..af5b726d8 100644 --- a/plugins/unityshell/src/unityshell.h +++ b/plugins/unityshell/src/unityshell.h @@ -243,9 +243,7 @@ class UnityScreen : void InitGesturesSupport(); - void DrawTopPanelBackground(); - bool TopPanelBackgroundTextureNeedsUpdate() const; - void UpdateTopPanelBackgroundTexture(); + void DrawPanelUnderDash(); unsigned CompizModifiersToNux(unsigned input) const; unsigned XModifiersToNux(unsigned input) const; @@ -331,9 +329,7 @@ class UnityScreen : GLMatrix panel_shadow_matrix_; - bool panel_texture_has_changed_; - bool paint_panel_; - nux::ObjectPtr panel_texture_; + bool paint_panel_under_dash_; std::set fake_decorated_windows_; bool scale_just_activated_; From 92467d7353d29dc8c3f1f1f507d10736aee91c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 9 Apr 2013 03:03:52 +0200 Subject: [PATCH 19/62] TestTextureCache: enable again the tests, they're not failing anymore here. (bzr r3279.3.13) --- tests/test_texture_cache.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_texture_cache.cpp b/tests/test_texture_cache.cpp index 6910b94a6..c4a028fa3 100644 --- a/tests/test_texture_cache.cpp +++ b/tests/test_texture_cache.cpp @@ -50,7 +50,7 @@ struct TextureCallbackValues } }; -TEST(TestTextureCache, DISABLED_TestCallsCreateTextureCallback) +TEST(TestTextureCache, TestCallsCreateTextureCallback) { // Another lambda issue. If the lambda takes a reference to any other // variables, it seems incapable of assigning the function to the @@ -80,7 +80,7 @@ struct TextureCallbackCounter } }; -TEST(TestTextureCache, DISABLED_TestCallbackOnlyCalledOnce) +TEST(TestTextureCache, TestCallbackOnlyCalledOnce) { TextureCallbackCounter counter; TextureCache::CreateTextureCallback callback(sigc::mem_fun(counter, &TextureCallbackCounter::callback)); @@ -95,7 +95,7 @@ TEST(TestTextureCache, DISABLED_TestCallbackOnlyCalledOnce) EXPECT_TRUE(t1 == t2); } -TEST(TestTextureCache, DISABLED_TestCacheRemovesDeletedObject) +TEST(TestTextureCache, TestCacheRemovesDeletedObject) { // Note for others, if just using the lambda function, the return value is // lost in the type deduction that sigc uses. So we have the typedef From 0581d184bfcb297d4e91baffdb63ae8f9f681235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 9 Apr 2013 03:12:21 +0200 Subject: [PATCH 20/62] Unity: remove unneeded Geometries allocations Found thanks to lp:~3v1n0/nux/rect-c++11 (bzr r3279.2.1) --- dash/CoverflowResultView.cpp | 3 +-- dash/FilterMultiRangeWidget.cpp | 5 ----- dash/ResultViewGrid.cpp | 1 - launcher/Launcher.cpp | 2 -- unity-shared/OverlayRenderer.cpp | 1 - 5 files changed, 1 insertion(+), 11 deletions(-) diff --git a/dash/CoverflowResultView.cpp b/dash/CoverflowResultView.cpp index 84783718e..fc696419e 100755 --- a/dash/CoverflowResultView.cpp +++ b/dash/CoverflowResultView.cpp @@ -269,11 +269,10 @@ void CoverflowResultView::DrawContent(nux::GraphicsEngine& GfxContext, bool forc GfxContext.PushClippingRectangle(base); if (RedirectedAncestor()) - graphics::ClearGeometry(GetGeometry()); + graphics::ClearGeometry(base); if (GetCompositionLayout()) { - nux::Geometry geo = GetCompositionLayout()->GetGeometry(); GetCompositionLayout()->ProcessDraw(GfxContext, force_draw); } diff --git a/dash/FilterMultiRangeWidget.cpp b/dash/FilterMultiRangeWidget.cpp index 653045c81..d42268342 100644 --- a/dash/FilterMultiRangeWidget.cpp +++ b/dash/FilterMultiRangeWidget.cpp @@ -271,11 +271,6 @@ void FilterMultiRangeWidget::RecvMouseDrag(int x, int y, int dx, int dy, unsigne return; dragging_ = true; - nux::Geometry mouse_down_button_geometry = mouse_down_button_->GetAbsoluteGeometry(); - - nux::Geometry left_active_button_geometry = mouse_down_left_active_button_->GetAbsoluteGeometry(); - nux::Geometry right_active_button_geometry = mouse_down_right_active_button_->GetAbsoluteGeometry(); - auto end = buttons_.end(); int found_buttons = 0; for (auto iter = buttons_.begin(); iter != end; ++iter) diff --git a/dash/ResultViewGrid.cpp b/dash/ResultViewGrid.cpp index d81341474..134b8c021 100644 --- a/dash/ResultViewGrid.cpp +++ b/dash/ResultViewGrid.cpp @@ -758,7 +758,6 @@ void ResultViewGrid::DrawContent(nux::GraphicsEngine& GfxContext, bool force_dra if (GetCompositionLayout()) { - nux::Geometry geo = GetCompositionLayout()->GetGeometry(); GetCompositionLayout()->ProcessDraw(GfxContext, force_draw); } diff --git a/launcher/Launcher.cpp b/launcher/Launcher.cpp index dd13a8815..6b75c0b46 100644 --- a/launcher/Launcher.cpp +++ b/launcher/Launcher.cpp @@ -1422,8 +1422,6 @@ void Launcher::UpdateOptions(Options::Ptr options) void Launcher::ConfigureBarrier() { - nux::Geometry geo = GetAbsoluteGeometry(); - float decay_responsiveness_mult = ((options()->edge_responsiveness() - 1) * .3f) + 1; float reveal_responsiveness_mult = ((options()->edge_responsiveness() - 1) * .025f) + 1; diff --git a/unity-shared/OverlayRenderer.cpp b/unity-shared/OverlayRenderer.cpp index ef8120c68..62535ccf8 100644 --- a/unity-shared/OverlayRenderer.cpp +++ b/unity-shared/OverlayRenderer.cpp @@ -811,7 +811,6 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c void OverlayRendererImpl::DrawContent(nux::GraphicsEngine& gfx_context, nux::Geometry const& content_geo, nux::Geometry const& absolute_geo, nux::Geometry const& geometry) { - nux::Geometry geo = geometry; bgs = 0; int excess_border = (Settings::Instance().form_factor() != FormFactor::NETBOOK) ? EXCESS_BORDER : 0; From 3c92debcf13db74c7f4f310cb1e97f446cc3270e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 9 Apr 2013 03:35:49 +0200 Subject: [PATCH 21/62] PanelController: create only one instance of DBusIndicators and share it between Views. We can just have one dbus-model for indicators, and use it for all our panels. This saves some unneeded allocations in multi-monitor environments. (bzr r3279.4.1) --- panel/PanelController.cpp | 7 ++++--- panel/PanelIndicatorsView.cpp | 3 +++ panel/PanelView.cpp | 7 +++++-- panel/PanelView.h | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/panel/PanelController.cpp b/panel/PanelController.cpp index 865743aff..b30e4e659 100644 --- a/panel/PanelController.cpp +++ b/panel/PanelController.cpp @@ -79,6 +79,7 @@ class Controller::Impl int menus_discovery_; int menus_discovery_fadein_; int menus_discovery_fadeout_; + indicator::DBusIndicators::Ptr dbus_indicators_; }; @@ -90,8 +91,8 @@ Controller::Impl::Impl() , menus_discovery_(0) , menus_discovery_fadein_(0) , menus_discovery_fadeout_(0) -{ -} + , dbus_indicators_(std::make_shared()) +{} std::vector Controller::Impl::GetTrayXids() const { @@ -243,7 +244,7 @@ void Controller::Impl::OnScreenChanged(unsigned int primary_monitor, { nux::HLayout* layout = new nux::HLayout(NUX_TRACKER_LOCATION); - PanelView* view = new PanelView(); + PanelView* view = new PanelView(dbus_indicators_); view->SetMaximumHeight(panel::Style::Instance().panel_height); view->SetOpacity(opacity_); view->SetOpacityMaximizedToggle(opacity_maximized_toggle_); diff --git a/panel/PanelIndicatorsView.cpp b/panel/PanelIndicatorsView.cpp index 5081bd866..6cfcc5ca2 100644 --- a/panel/PanelIndicatorsView.cpp +++ b/panel/PanelIndicatorsView.cpp @@ -65,6 +65,9 @@ void PanelIndicatorsView::AddIndicator(Indicator::Ptr const& indicator) std::vector connections; + for (auto const& entry : indicator->GetEntries()) + AddEntry(entry); + auto entry_added_conn = indicator->on_entry_added.connect(sigc::mem_fun(this, &PanelIndicatorsView::OnEntryAdded)); connections.push_back(entry_added_conn); diff --git a/panel/PanelView.cpp b/panel/PanelView.cpp index 25c053807..e8b9975d7 100644 --- a/panel/PanelView.cpp +++ b/panel/PanelView.cpp @@ -55,8 +55,9 @@ namespace unity NUX_IMPLEMENT_OBJECT_TYPE(PanelView); -PanelView::PanelView(NUX_FILE_LINE_DECL) +PanelView::PanelView(indicator::DBusIndicators::Ptr const& remote, NUX_FILE_LINE_DECL) : View(NUX_FILE_LINE_PARAM) + , remote_(remote) , is_dirty_(true) , opacity_maximized_toggle_(false) , needs_geo_sync_(false) @@ -105,7 +106,9 @@ PanelView::PanelView(NUX_FILE_LINE_DECL) indicators_ = new PanelIndicatorsView(); AddPanelView(indicators_, 0); - remote_ = indicator::DBusIndicators::Ptr(new indicator::DBusIndicators()); + for (auto const& object : remote_->GetIndicators()) + OnObjectAdded(object); + remote_->on_object_added.connect(sigc::mem_fun(this, &PanelView::OnObjectAdded)); remote_->on_object_removed.connect(sigc::mem_fun(this, &PanelView::OnObjectRemoved)); remote_->on_entry_activate_request.connect(sigc::mem_fun(this, &PanelView::OnEntryActivateRequest)); diff --git a/panel/PanelView.h b/panel/PanelView.h index d0f2f3d2c..3132b1859 100644 --- a/panel/PanelView.h +++ b/panel/PanelView.h @@ -46,7 +46,7 @@ class PanelView : public unity::debug::Introspectable, public nux::View { NUX_DECLARE_OBJECT_TYPE(PanelView, nux::View); public: - PanelView(NUX_FILE_LINE_PROTO); + PanelView(indicator::DBusIndicators::Ptr const&, NUX_FILE_LINE_PROTO); ~PanelView(); void SetPrimary(bool primary); From 89573300ea4218dd0f1924c1ec16941acd119fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 9 Apr 2013 04:07:28 +0200 Subject: [PATCH 22/62] StandalonePanel: fix compilation, update to new API (bzr r3279.4.2) --- panel/StandalonePanel.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/panel/StandalonePanel.cpp b/panel/StandalonePanel.cpp index ddea5172d..94db9db20 100644 --- a/panel/StandalonePanel.cpp +++ b/panel/StandalonePanel.cpp @@ -47,9 +47,13 @@ struct PanelWindow } private: - class StandalonePanelView : public PanelView + struct StandalonePanelView : public PanelView { // Used to sync menu geometries + StandalonePanelView() + : PanelView(std::make_shared()) + {} + std::string GetName() const { return "StandalonePanel"; } }; From 0d9c24b64812af2b4c536fa24dcda0a321563d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 9 Apr 2013 04:11:34 +0200 Subject: [PATCH 23/62] TestPanelView: update to new API (bzr r3279.4.3) --- tests/test_panel_view.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_panel_view.cpp b/tests/test_panel_view.cpp index 625b72343..095513905 100644 --- a/tests/test_panel_view.cpp +++ b/tests/test_panel_view.cpp @@ -39,7 +39,7 @@ class TestPanelView : public testing::Test nux::ObjectPtr panel_view_; TestPanelView() - : panel_view_(new unity::PanelView()) + : panel_view_(new unity::PanelView(std::make_shared())) {} }; From e89561a97d503e6b03379386b8bb0c5b20c0dc2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 9 Apr 2013 19:02:27 +0200 Subject: [PATCH 24/62] ApplicationLauncherIcon: use GAppLaunchContext to open indicator shortcuts Using the new indicator_desktop_shortcuts_nick_exec_with_context passing to it the context containing the timestamp of the quicklist activation event. Fixes LP: #1164483 (bzr r3290.2.1) --- launcher/ApplicationLauncherIcon.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/launcher/ApplicationLauncherIcon.cpp b/launcher/ApplicationLauncherIcon.cpp index aab0cb717..c01c935bf 100644 --- a/launcher/ApplicationLauncherIcon.cpp +++ b/launcher/ApplicationLauncherIcon.cpp @@ -731,8 +731,12 @@ void ApplicationLauncherIcon::UpdateDesktopQuickList() std::string nick(nicks[index]); _gsignals.Add(item, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - [this, nick] (DbusmenuMenuitem* item, unsigned) { - indicator_desktop_shortcuts_nick_exec(_desktop_shortcuts, nick.c_str()); + [this, nick] (DbusmenuMenuitem* item, unsigned timestamp) { + GdkDisplay* display = gdk_display_get_default(); + glib::Object context(gdk_display_get_app_launch_context(display)); + gdk_app_launch_context_set_timestamp(context, timestamp); + auto gcontext = glib::object_cast(context); + indicator_desktop_shortcuts_nick_exec_with_context(_desktop_shortcuts, nick.c_str(), gcontext); }); dbusmenu_menuitem_child_append(_menu_desktop_shortcuts, item); From f8794b4d6285343d3d44447f5fe7ba448863b952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 9 Apr 2013 20:02:42 +0200 Subject: [PATCH 25/62] autopilot, QuicklistActionTests: fix test_quicklist_actions to work with any locale (bzr r3290.2.2) --- tests/autopilot/unity/tests/test_quicklist.py | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/tests/autopilot/unity/tests/test_quicklist.py b/tests/autopilot/unity/tests/test_quicklist.py index bf6224a76..56dffc135 100644 --- a/tests/autopilot/unity/tests/test_quicklist.py +++ b/tests/autopilot/unity/tests/test_quicklist.py @@ -38,30 +38,34 @@ def open_quicklist_for_icon(self, launcher_icon): self.assertThat(launcher_icon.get_quicklist, Eventually(NotEquals(None))) return launcher_icon.get_quicklist() + def get_desktop_entry(self, application): + # load the desktop file from disk: + desktop_id = self.KNOWN_APPS[application]['desktop-file'] + desktop_file = os.path.join('/usr/share/applications', desktop_id) + return DesktopEntry(desktop_file) + + def get_destktop_actions(self, application): + return self.get_desktop_entry(application).getActions() + def test_quicklist_actions(self): """Test that all actions present in the destop file are shown in the quicklist.""" - self.start_app(self.app_name) + app = self.start_app(self.app_name) - # load the desktop file from disk: - desktop_id = self.KNOWN_APPS[self.app_name]['desktop-file'] - desktop_file = os.path.join('/usr/share/applications', desktop_id) - de = DesktopEntry(desktop_file) # get the launcher icon from the launcher: - launcher_icon = self.unity.launcher.model.get_icon(desktop_id=desktop_id) + launcher_icon = self.unity.launcher.model.get_icon(desktop_id=app.desktop_file) self.assertThat(launcher_icon, NotEquals(None)) # open the icon quicklist, and get all the text labels: + de = self.get_desktop_entry(self.app_name) ql = self.open_quicklist_for_icon(launcher_icon) ql_item_texts = [i.text for i in ql.items if type(i) is QuicklistMenuItemLabel] # iterate over all the actions from the desktop file, make sure they're # present in the quicklist texts. - # FIXME, this doesn't work using a locale other than English. - actions = de.getActions() - for action in actions: + for action in de.getActions(): key = 'Desktop Action ' + action self.assertThat(de.content, Contains(key)) - name = de.content[key]['Name'] + name = de.get('Name', group=key, locale=True) self.assertThat(ql_item_texts, Contains(name)) def test_quicklist_application_item_focus_last_active_window(self): From bef7d7c6d831c55284d41f170bb35834c79c2715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 9 Apr 2013 20:35:24 +0200 Subject: [PATCH 26/62] QuicklistMenuItem: save activation timestamp for autopilot testing (bzr r3290.2.3) --- launcher/QuicklistMenuItem.cpp | 8 +++++--- launcher/QuicklistMenuItem.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/launcher/QuicklistMenuItem.cpp b/launcher/QuicklistMenuItem.cpp index 9d3d9bac0..c003b42f0 100644 --- a/launcher/QuicklistMenuItem.cpp +++ b/launcher/QuicklistMenuItem.cpp @@ -39,6 +39,7 @@ QuicklistMenuItem::QuicklistMenuItem(QuicklistMenuItemType type, glib::ObjectGetCurrentEvent().x11_timestamp; - dbusmenu_menuitem_handle_event(_menu_item, "clicked", nullptr, event_time); + _activate_timestamp = nux::GetGraphicsDisplay()->GetCurrentEvent().x11_timestamp; + dbusmenu_menuitem_handle_event(_menu_item, "clicked", nullptr, _activate_timestamp); if (!IsOverlayQuicklist()) { @@ -434,7 +435,8 @@ void QuicklistMenuItem::AddProperties(GVariantBuilder* builder) .add("active", GetActive()) .add("visible", GetVisible()) .add("selectable", GetSelectable()) - .add("selected", _prelight); + .add("selected", _prelight) + .add("activate_timestamp", _activate_timestamp); } } //NAMESPACE diff --git a/launcher/QuicklistMenuItem.h b/launcher/QuicklistMenuItem.h index 59331b6b1..f0af32f74 100644 --- a/launcher/QuicklistMenuItem.h +++ b/launcher/QuicklistMenuItem.h @@ -123,6 +123,7 @@ class QuicklistMenuItem : public nux::View, public debug::Introspectable nux::ObjectPtr _prelightTexture[2]; QuicklistMenuItemType _item_type; glib::Object _menu_item; + mutable Time _activate_timestamp; bool _prelight; int _pre_layout_width; int _pre_layout_height; From 10611fd26bd9ebea246c125ff6f1a488af5ac0dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 9 Apr 2013 20:37:33 +0200 Subject: [PATCH 27/62] autopilot, UnityTestCase: move here get_startup_notification_timestamp from icon test case (bzr r3290.2.4) --- tests/autopilot/unity/tests/__init__.py | 8 ++++++++ .../autopilot/unity/tests/launcher/test_icon_behavior.py | 6 ------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/autopilot/unity/tests/__init__.py b/tests/autopilot/unity/tests/__init__.py index fd56c78ac..310f5a7a4 100644 --- a/tests/autopilot/unity/tests/__init__.py +++ b/tests/autopilot/unity/tests/__init__.py @@ -40,6 +40,9 @@ Unity ) +from Xlib import display +from Xlib import Xutil + log = getLogger(__name__) @@ -228,3 +231,8 @@ def close_all_windows(self, application_name): def register_nautilus(self): self.addCleanup(self.unregister_known_application, "Nautilus") self.register_known_application("Nautilus", "nautilus.desktop", "nautilus") + + def get_startup_notification_timestamp(self, bamf_window): + atom = display.Display().intern_atom('_NET_WM_USER_TIME') + atom_type = display.Display().intern_atom('CARDINAL') + return bamf_window.x_win.get_property(atom, atom_type, 0, 1024).value[0] diff --git a/tests/autopilot/unity/tests/launcher/test_icon_behavior.py b/tests/autopilot/unity/tests/launcher/test_icon_behavior.py index f52fa8a30..bf827b45a 100644 --- a/tests/autopilot/unity/tests/launcher/test_icon_behavior.py +++ b/tests/autopilot/unity/tests/launcher/test_icon_behavior.py @@ -19,7 +19,6 @@ from unity.emulators.launcher import IconDragType from unity.tests.launcher import LauncherTestCase, _make_scenarios -from Xlib import display from Xlib import Xutil logger = logging.getLogger(__name__) @@ -60,11 +59,6 @@ def ensure_calculator_in_launcher_and_not_running(self): self.assertThat(lambda: self.app_is_running("Calculator"), Eventually(Equals(False))) return calc_icon - def get_startup_notification_timestamp(self, bamf_window): - atom = display.Display().intern_atom('_NET_WM_USER_TIME') - atom_type = display.Display().intern_atom('CARDINAL') - return bamf_window.x_win.get_property(atom, atom_type, 0, 1024).value[0] - def test_bfb_tooltip_disappear_when_dash_is_opened(self): """Tests that the bfb tooltip disappear when the dash is opened.""" bfb = self.unity.launcher.model.get_bfb_icon() From 13cca8ced2963a3945b2d76eeb403dbab5e03e1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 9 Apr 2013 20:39:09 +0200 Subject: [PATCH 28/62] autopilot, QuicklistActionTests: add startup-notification on activation test (bzr r3290.2.5) --- tests/autopilot/unity/tests/test_quicklist.py | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/tests/autopilot/unity/tests/test_quicklist.py b/tests/autopilot/unity/tests/test_quicklist.py index 56dffc135..cf4a6dfc6 100644 --- a/tests/autopilot/unity/tests/test_quicklist.py +++ b/tests/autopilot/unity/tests/test_quicklist.py @@ -44,9 +44,6 @@ def get_desktop_entry(self, application): desktop_file = os.path.join('/usr/share/applications', desktop_id) return DesktopEntry(desktop_file) - def get_destktop_actions(self, application): - return self.get_desktop_entry(application).getActions() - def test_quicklist_actions(self): """Test that all actions present in the destop file are shown in the quicklist.""" app = self.start_app(self.app_name) @@ -68,6 +65,33 @@ def test_quicklist_actions(self): name = de.get('Name', group=key, locale=True) self.assertThat(ql_item_texts, Contains(name)) + def test_quicklist_action_uses_startup_notification(self): + """Tests that quicklist uses startup notification protocol.""" + self.register_nautilus() + self.addCleanup(self.close_all_windows, "Nautilus") + + self.start_app_window("Calculator") + self.start_app(self.app_name) + + nautilus_icon = self.unity.launcher.model.get_icon(desktop_id="nautilus.desktop") + ql = self.open_quicklist_for_icon(nautilus_icon) + de = self.get_desktop_entry("Nautilus") + + new_window_action_name = de.get("Name", group="Desktop Action Window", locale=True) + self.assertThat(new_window_action_name, NotEquals(None)) + new_win_ql_item_fn = lambda : ql.get_quicklist_item_by_text(new_window_action_name) + self.assertThat(new_win_ql_item_fn, Eventually(NotEquals(None))) + new_win_ql_item = new_win_ql_item_fn() + + ql.click_item(new_win_ql_item) + + nautilus_windows_fn = lambda: self.get_open_windows_by_application("Nautilus") + self.assertThat(lambda: len(nautilus_windows_fn()), Eventually(Equals(1))) + [nautilus_window] = nautilus_windows_fn() + + self.assertThat(lambda: self.get_startup_notification_timestamp(nautilus_window), + Eventually(Equals(new_win_ql_item.activate_timestamp))) + def test_quicklist_application_item_focus_last_active_window(self): """This tests shows that when you activate a quicklist application item only the last focused instance of that application is rasied. From 7d0d91bcb329dbe1db94de66b206edf25c82c024 Mon Sep 17 00:00:00 2001 From: Automatic PS uploader Date: Wed, 10 Apr 2013 04:03:19 +0000 Subject: [PATCH 29/62] Releasing 7.0.0daily13.04.10-0ubuntu1, based on r3290 (bzr r3290.1.1) --- debian/changelog | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/debian/changelog b/debian/changelog index f4a48816a..eaba70b4c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,24 @@ +unity (7.0.0daily13.04.10-0ubuntu1) raring; urgency=low + + [ Andrea Azzarone ] + * Launcher icons automatically placed in the launcher by USC (or apps + lens) fail to have running 'pips'. (LP: #1165097) + + [ Marco Trevisan (TreviƱo) ] + * Unity wastes some memory by allocating multiple times the same + texture (LP: #1166532) + * Unity is creating multiple instances of DBusIndicators per each + monitor (LP: #1166550) + + [ Michi Henning ] + * ResultIterator.h defines functions that return const values (LP: + #1163705) + + [ Ubuntu daily release ] + * Automatic snapshot from revision 3290 + + -- Ubuntu daily release Wed, 10 Apr 2013 04:03:19 +0000 + unity (7.0.0daily13.04.08-0ubuntu1) raring; urgency=low [ Tigran Gabrielyan ] From 4cf08ad14eea9e84b3d69611afb668304b866b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 10 Apr 2013 19:31:52 +0200 Subject: [PATCH 30/62] IconTextureSource: add a cache for Centers and Rotation So we can cache here the last values and perform pre-processing only if needed. (bzr r3290.3.1) --- unity-shared/IconTextureSource.cpp | 39 +++++++++++++++++++++++++++--- unity-shared/IconTextureSource.h | 13 ++++++++-- 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/unity-shared/IconTextureSource.cpp b/unity-shared/IconTextureSource.cpp index 8ee725287..cd0394fd5 100644 --- a/unity-shared/IconTextureSource.cpp +++ b/unity-shared/IconTextureSource.cpp @@ -26,22 +26,55 @@ namespace ui { NUX_IMPLEMENT_OBJECT_TYPE(IconTextureSource); -IconTextureSource::IconTextureSource() +namespace { - transform_map.resize(max_num_monitors); + const unsigned RENDERERS_SIZE = max_num_monitors + 1; // +1 for the switcher } +IconTextureSource::IconTextureSource() + : last_render_center_(RENDERERS_SIZE) + , last_logical_center_(RENDERERS_SIZE) + , last_rotation_(RENDERERS_SIZE) + , transform_map(RENDERERS_SIZE) +{} + std::vector & IconTextureSource::GetTransform(TransformIndex index, int monitor) { auto iter = transform_map[monitor].find(index); if (iter == transform_map[monitor].end()) { - auto iter2 = transform_map[monitor].insert(std::map >::value_type(index, std::vector(4))); + auto iter2 = transform_map[monitor].insert(std::make_pair(index, std::vector(4))); return iter2.first->second; } return iter->second; } +void IconTextureSource::RememberCenters(int monitor, nux::Point3 const& render, nux::Point3 const& logical) +{ + last_render_center_[monitor] = render; + last_logical_center_[monitor] = logical; +} + +void IconTextureSource::RememberRotation(int monitor, nux::Point3 const& rotation) +{ + last_rotation_[monitor] = rotation; +} + +nux::Point3 const& IconTextureSource::LastRenderCenter(int monitor) const +{ + return last_render_center_[monitor]; +} + +nux::Point3 const& IconTextureSource::LastLogicalCenter(int monitor) const +{ + return last_logical_center_[monitor]; +} + +nux::Point3 const& IconTextureSource::LastRotation(int monitor) const +{ + return last_rotation_[monitor]; +} + } } \ No newline at end of file diff --git a/unity-shared/IconTextureSource.h b/unity-shared/IconTextureSource.h index bae754658..99bd0455e 100644 --- a/unity-shared/IconTextureSource.h +++ b/unity-shared/IconTextureSource.h @@ -22,7 +22,6 @@ #define ICONTEXTURESOURCE_H #include -#include #include namespace unity @@ -43,12 +42,19 @@ class IconTextureSource : public nux::InitiallyUnownedObject TRANSFORM_HIT_AREA, TRANSFORM_GLOW, TRANSFORM_EMBLEM, + TRANSFORM_LAST }; IconTextureSource(); std::vector & GetTransform(TransformIndex index, int monitor); + nux::Point3 const& LastRenderCenter(int monitor) const; + nux::Point3 const& LastLogicalCenter(int monitor) const; + nux::Point3 const& LastRotation(int monitor) const; + void RememberCenters(int monitor, nux::Point3 const& render, nux::Point3 const& logical); + void RememberRotation(int monitor, nux::Point3 const& rotation); + virtual nux::Color BackgroundColor() const = 0; virtual nux::Color GlowColor() = 0; @@ -58,7 +64,10 @@ class IconTextureSource : public nux::InitiallyUnownedObject virtual nux::BaseTexture* Emblem() = 0; private: - std::vector > > transform_map; + std::vector last_render_center_; + std::vector last_logical_center_; + std::vector last_rotation_; + std::vector>> transform_map; }; } From e2fd5568b5e3460340ee346735edc969ae7f9401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 10 Apr 2013 19:47:05 +0200 Subject: [PATCH 31/62] AbstractIconRenderer: move rotation float's to a single nux::Point3 (bzr r3290.3.2) --- launcher/Launcher.cpp | 13 +++++-------- launcher/SwitcherView.cpp | 18 ++++++++++-------- unity-shared/AbstractIconRenderer.h | 7 +------ unity-shared/IconRenderer.cpp | 20 ++++++++++---------- 4 files changed, 26 insertions(+), 32 deletions(-) diff --git a/launcher/Launcher.cpp b/launcher/Launcher.cpp index 9e60f2150..959186eab 100644 --- a/launcher/Launcher.cpp +++ b/launcher/Launcher.cpp @@ -150,6 +150,7 @@ Launcher::Launcher(MockableBaseWindow* parent, , icon_renderer(std::make_shared()) { m_Layout = new nux::HLayout(NUX_TRACKER_LOCATION); + icon_renderer->monitor = monitor(); bg_effect_helper_.owner = this; bg_effect_helper_.enabled = false; @@ -783,9 +784,6 @@ void Launcher::SetupRenderArg(AbstractLauncherIcon::Ptr const& icon, struct time arg.running_colored = icon->GetQuirk(AbstractLauncherIcon::Quirk::URGENT); arg.draw_edge_only = IconDrawEdgeOnly(icon); arg.active_colored = false; - arg.x_rotation = 0.0f; - arg.y_rotation = 0.0f; - arg.z_rotation = 0.0f; arg.skip = false; arg.stick_thingy = false; arg.keyboard_nav_hl = false; @@ -863,7 +861,7 @@ void Launcher::SetupRenderArg(AbstractLauncherIcon::Ptr const& icon, struct time if (icon->GetQuirk(AbstractLauncherIcon::Quirk::URGENT) && options()->urgent_animation() == URGENT_ANIMATION_WIGGLE) { - arg.z_rotation = IconUrgentWiggleValue(icon, current); + arg.rotation.z = IconUrgentWiggleValue(icon, current); } if (IsInKeyNavMode()) @@ -941,7 +939,7 @@ void Launcher::FillRenderArg(AbstractLauncherIcon::Ptr const& icon, // icon is crossing threshold, start folding center.z += folded_z_distance * folding_progress; - arg.x_rotation = animation_neg_rads * folding_progress; + arg.rotation.x = animation_neg_rads * folding_progress; float spacing_overlap = CLAMP((float)(center.y + (2.0f * half_size * size_modifier) + (_space_between_icons * size_modifier) - folding_threshold) / (float) _icon_size, 0.0f, 1.0f); float spacing = (_space_between_icons * (1.0f - spacing_overlap) + folded_spacing * spacing_overlap) * size_modifier; @@ -1399,6 +1397,7 @@ void Launcher::OnMonitorChanged(int new_monitor) unity::panel::Style &panel_style = panel::Style::Instance(); Resize(nux::Point(monitor_geo.x, monitor_geo.y + panel_style.panel_height), monitor_geo.height - panel_style.panel_height); + icon_renderer->monitor = new_monitor; } void Launcher::UpdateOptions(Options::Ptr options) @@ -1688,8 +1687,6 @@ void Launcher::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) void Launcher::DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw) { - icon_renderer->monitor = monitor(); - nux::Geometry const& base = GetGeometry(); nux::Geometry bkg_box; std::list args; @@ -2458,7 +2455,7 @@ void Launcher::RenderIconToTexture(nux::GraphicsEngine& GfxContext, AbstractLaun SetupRenderArg(icon, current, arg); arg.render_center = nux::Point3(roundf(texture->GetWidth() / 2.0f), roundf(texture->GetHeight() / 2.0f), 0.0f); arg.logical_center = arg.render_center; - arg.x_rotation = 0.0f; + arg.rotation.x = 0.0f; arg.running_arrow = false; arg.active_arrow = false; arg.skip = false; diff --git a/launcher/SwitcherView.cpp b/launcher/SwitcherView.cpp index b75063899..c535db7de 100644 --- a/launcher/SwitcherView.cpp +++ b/launcher/SwitcherView.cpp @@ -17,6 +17,7 @@ */ #include "config.h" +#include "MultiMonitor.h" #include "SwitcherView.h" #include "unity-shared/IconRenderer.h" #include "unity-shared/TimeUtil.h" @@ -57,6 +58,7 @@ SwitcherView::SwitcherView() , target_sizes_set_(false) { icon_renderer_->pip_style = OVER_TILE; + icon_renderer_->monitor = max_num_monitors; text_view_->SetMaximumWidth(tile_size * spread_size); text_view_->SetLines(1); @@ -224,9 +226,9 @@ RenderArg SwitcherView::InterpolateRenderArgs(RenderArg const& start, RenderArg RenderArg result = end; - result.x_rotation = start.x_rotation + (end.x_rotation - start.x_rotation) * progress; - result.y_rotation = start.y_rotation + (end.y_rotation - start.y_rotation) * progress; - result.z_rotation = start.z_rotation + (end.z_rotation - start.z_rotation) * progress; + result.rotation.x = start.rotation.x + (end.rotation.x - start.rotation.x) * progress; + result.rotation.y = start.rotation.y + (end.rotation.y - start.rotation.y) * progress; + result.rotation.z = start.rotation.z + (end.rotation.z - start.rotation.z) * progress; result.render_center.x = start.render_center.x + (end.render_center.x - start.render_center.x) * progress; result.render_center.y = start.render_center.y + (end.render_center.y - start.render_center.y) * progress; @@ -489,7 +491,7 @@ std::list SwitcherView::RenderArgsFlat(nux::Geometry& background_geo, x += (half_size + flat_spacing) * scalar; - arg.y_rotation = (1.0f - MIN (1.0f, scalar)); + arg.rotation.y = (1.0f - MIN (1.0f, scalar)); if (!should_flat && overflow > 0 && i != selection) { @@ -500,11 +502,11 @@ std::list SwitcherView::RenderArgsFlat(nux::Geometry& background_geo, else { arg.render_center.x += 20; - arg.y_rotation = -arg.y_rotation; + arg.rotation.y = -arg.rotation.y; } } - arg.render_center.z = abs(80.0f * arg.y_rotation); + arg.render_center.z = abs(80.0f * arg.rotation.y); arg.logical_center = arg.render_center; if (i == selection && detail_selection) @@ -588,13 +590,13 @@ void SwitcherView::DrawOverlay(nux::GraphicsEngine& GfxContext, bool force_draw, text_view_->SetBaseX(start_x); } - if (arg.y_rotation < 0) + if (arg.rotation.y < 0) icon_renderer_->RenderIcon(GfxContext, arg, base, base); } for (auto rit = last_args_.rbegin(); rit != last_args_.rend(); ++rit) { - if (rit->y_rotation >= 0) + if (rit->rotation.y >= 0) icon_renderer_->RenderIcon(GfxContext, *rit, base, base); } diff --git a/unity-shared/AbstractIconRenderer.h b/unity-shared/AbstractIconRenderer.h index 784345385..9836ae6b3 100644 --- a/unity-shared/AbstractIconRenderer.h +++ b/unity-shared/AbstractIconRenderer.h @@ -41,9 +41,6 @@ class RenderArg RenderArg() : icon(0) , colorify(nux::color::White) - , x_rotation(0) - , y_rotation(0) - , z_rotation(0) , alpha(1.0f) , saturation(1.0f) , backlight_intensity(0.0f) @@ -71,10 +68,8 @@ class RenderArg IconTextureSource* icon; nux::Point3 render_center; nux::Point3 logical_center; + nux::Point3 rotation; nux::Color colorify; - float x_rotation; - float y_rotation; - float z_rotation; float alpha; float saturation; float backlight_intensity; diff --git a/unity-shared/IconRenderer.cpp b/unity-shared/IconRenderer.cpp index abde15337..f7ccb89fe 100644 --- a/unity-shared/IconRenderer.cpp +++ b/unity-shared/IconRenderer.cpp @@ -309,9 +309,9 @@ void IconRenderer::PreprocessIcons(std::list& args, nux::Geometry con } ObjectMatrix = nux::Matrix4::TRANSLATE(geo.width / 2.0f, geo.height / 2.0f, z) * // Translate the icon to the center of the viewport - nux::Matrix4::ROTATEX(it->x_rotation) * // rotate the icon - nux::Matrix4::ROTATEY(it->y_rotation) * - nux::Matrix4::ROTATEZ(it->z_rotation) * + nux::Matrix4::ROTATEX(it->rotation.x) * // rotate the icon + nux::Matrix4::ROTATEY(it->rotation.y) * + nux::Matrix4::ROTATEZ(it->rotation.z) * nux::Matrix4::TRANSLATE(-x - w / 2.0f, -y - h / 2.0f, -z); // Put the center the icon to (0, 0) ViewProjectionMatrix = PremultMatrix * ObjectMatrix; @@ -369,9 +369,9 @@ void IconRenderer::PreprocessIcons(std::list& args, nux::Geometry con z = it->render_center.z; ObjectMatrix = nux::Matrix4::TRANSLATE(geo.width / 2.0f, geo.height / 2.0f, z) * // Translate the icon to the center of the viewport - nux::Matrix4::ROTATEX(it->x_rotation) * // rotate the icon - nux::Matrix4::ROTATEY(it->y_rotation) * - nux::Matrix4::ROTATEZ(it->z_rotation) * + nux::Matrix4::ROTATEX(it->rotation.x) * // rotate the icon + nux::Matrix4::ROTATEY(it->rotation.y) * + nux::Matrix4::ROTATEZ(it->rotation.z) * nux::Matrix4::TRANSLATE(-(it->render_center.x - w / 2.0f) - w / 2.0f, -(it->render_center.y - h / 2.0f) - h / 2.0f, -z); // Put the center the icon to (0, 0) ViewProjectionMatrix = PremultMatrix * ObjectMatrix; @@ -754,9 +754,9 @@ void IconRenderer::RenderElement(nux::GraphicsEngine& GfxContext, if (icon.IsNull()) return; - if (std::abs(arg.x_rotation) < 0.01f && - std::abs(arg.y_rotation) < 0.01f && - std::abs(arg.z_rotation) < 0.01f && + if (std::abs(arg.rotation.x) < 0.01f && + std::abs(arg.rotation.y) < 0.01f && + std::abs(arg.rotation.z) < 0.01f && !force_filter) { icon->SetFiltering(GL_NEAREST, GL_NEAREST); @@ -922,7 +922,7 @@ void IconRenderer::RenderIndicators(nux::GraphicsEngine& GfxContext, nux::Geometry const& geo) { int markerCenter = (int) arg.render_center.y; - markerCenter -= (int)(arg.x_rotation / (2 * M_PI) * icon_size); + markerCenter -= (int)(arg.rotation.x / (2 * M_PI) * icon_size); if (running > 0) From 023c2df5b72088d4ec8c0e1b5037cc0ab924a914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 10 Apr 2013 19:49:12 +0200 Subject: [PATCH 32/62] IconRenderer: don't preprocess an icon if nothing changed on its position If rotation or centers have not been changed since last computation, we can avoid to do all this expensive matrix computation, that according to callgrind it's taking much of unity code. (bzr r3290.3.3) --- unity-shared/IconRenderer.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/unity-shared/IconRenderer.cpp b/unity-shared/IconRenderer.cpp index f7ccb89fe..fef132394 100644 --- a/unity-shared/IconRenderer.cpp +++ b/unity-shared/IconRenderer.cpp @@ -291,9 +291,18 @@ void IconRenderer::PreprocessIcons(std::list& args, nux::Geometry con int i; for (it = args.begin(), i = 0; it != args.end(); ++it, ++i) { - IconTextureSource* launcher_icon = it->icon; + if (it->render_center == launcher_icon->LastRenderCenter(monitor) && + it->logical_center == launcher_icon->LastLogicalCenter(monitor) && + it->rotation == launcher_icon->LastRotation(monitor)) + { + continue; + } + + launcher_icon->RememberCenters(monitor, it->render_center, it->logical_center); + launcher_icon->RememberRotation(monitor, it->rotation); + float w = icon_size; float h = icon_size; float x = it->render_center.x - w / 2.0f; // x: top left corner From 6cedc101c1934a9020b283b88bdd1c8e16e41198 Mon Sep 17 00:00:00 2001 From: Brandon Schaefer Date: Wed, 10 Apr 2013 11:26:42 -0700 Subject: [PATCH 33/62] * If the command lens is open, and we have recived another Alt+F2 key event from compiz, close the dash. Fixes LP: #1167466 (bzr r3292.1.1) --- dash/DashController.cpp | 5 +++++ dash/DashController.h | 1 + dash/DashView.cpp | 5 +++++ dash/DashView.h | 2 ++ dash/LensBar.h | 2 +- plugins/unityshell/src/unityshell.cpp | 15 +++++++++++---- tests/autopilot/unity/tests/test_dash.py | 8 ++++++++ 7 files changed, 33 insertions(+), 5 deletions(-) diff --git a/dash/DashController.cpp b/dash/DashController.cpp index b7c6861fb..77c14a11f 100644 --- a/dash/DashController.cpp +++ b/dash/DashController.cpp @@ -464,6 +464,11 @@ bool Controller::IsVisible() const return visible_; } +bool Controller::IsCommandLensOpen() const +{ + return visible_ && view_->IsCommandLensOpen(); +} + nux::Geometry Controller::GetInputWindowGeometry() { EnsureDash(); diff --git a/dash/DashController.h b/dash/DashController.h index 28fabc5c4..4c8086eda 100644 --- a/dash/DashController.h +++ b/dash/DashController.h @@ -65,6 +65,7 @@ class Controller : public unity::debug::Introspectable void ReFocusKeyInput(); bool IsVisible() const; + bool IsCommandLensOpen() const; nux::Geometry GetInputWindowGeometry(); protected: diff --git a/dash/DashView.cpp b/dash/DashView.cpp index b37887b58..4a24ade25 100644 --- a/dash/DashView.cpp +++ b/dash/DashView.cpp @@ -188,6 +188,11 @@ void DashView::SetMonitorOffset(int x, int y) renderer_.y_offset = y; } +bool DashView::IsCommandLensOpen() const +{ + return (lens_bar_->GetActiveLensId() == "commands.lens"); +} + void DashView::OnUriActivated(ResultView::ActivateType type, std::string const& uri, GVariant* data, std::string const& unique_id) { last_activated_uri_ = uri; diff --git a/dash/DashView.h b/dash/DashView.h index eb929f706..cf1974263 100644 --- a/dash/DashView.h +++ b/dash/DashView.h @@ -69,6 +69,8 @@ class DashView : public nux::View, public unity::debug::Introspectable void OnActivateRequest(GVariant* args); void SetMonitorOffset(int x, int y); + bool IsCommandLensOpen() const; + std::string const GetIdForShortcutActivation(std::string const& shortcut) const; std::vector GetAllShortcuts(); diff --git a/dash/LensBar.h b/dash/LensBar.h index 8609d33af..49869736c 100644 --- a/dash/LensBar.h +++ b/dash/LensBar.h @@ -62,6 +62,7 @@ class LensBar : public nux::View, public unity::debug::Introspectable void ActivateNext(); void ActivatePrevious(); + std::string GetActiveLensId() const; sigc::signal lens_activated; private: @@ -81,7 +82,6 @@ class LensBar : public nux::View, public unity::debug::Introspectable std::string GetName() const; void AddProperties(GVariantBuilder* builder); - std::string GetActiveLensId() const; typedef std::unique_ptr LayerPtr; LensIcons icons_; diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index b693f3d3e..4cd112c75 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -1839,11 +1839,18 @@ void UnityScreen::SendExecuteCommand() adapter.TerminateScale(); } - ubus_manager_.SendMessage(UBUS_DASH_ABOUT_TO_SHOW, NULL, glib::Source::Priority::HIGH); + if (dash_controller_->IsCommandLensOpen()) + { + ubus_manager_.SendMessage(UBUS_OVERLAY_CLOSE_REQUEST); + } + else + { + ubus_manager_.SendMessage(UBUS_DASH_ABOUT_TO_SHOW, NULL, glib::Source::Priority::HIGH); - ubus_manager_.SendMessage(UBUS_PLACE_ENTRY_ACTIVATE_REQUEST, - g_variant_new("(sus)", "commands.lens", dash::GOTO_DASH_URI, ""), - glib::Source::Priority::LOW); + ubus_manager_.SendMessage(UBUS_PLACE_ENTRY_ACTIVATE_REQUEST, + g_variant_new("(sus)", "commands.lens", dash::GOTO_DASH_URI, ""), + glib::Source::Priority::LOW); + } } bool UnityScreen::executeCommand(CompAction* action, diff --git a/tests/autopilot/unity/tests/test_dash.py b/tests/autopilot/unity/tests/test_dash.py index a24e387e8..56d930399 100644 --- a/tests/autopilot/unity/tests/test_dash.py +++ b/tests/autopilot/unity/tests/test_dash.py @@ -78,6 +78,14 @@ def test_can_go_from_dash_to_command_lens(self): self.unity.dash.reveal_command_lens() self.assertThat(self.unity.dash.active_lens, Eventually(Equals('commands.lens'))) + def test_command_lens_can_close_itself(self): + """We must be able to close the Command lens with Alt+F2""" + self.unity.dash.reveal_command_lens() + self.assertThat(self.unity.dash.visible, Eventually(Equals(True))) + + self.keybinding("lens_reveal/command") + self.assertThat(self.unity.dash.visible, Eventually(Equals(False))) + def test_alt_f4_close_dash(self): """Dash must close on alt+F4.""" self.unity.dash.ensure_visible() From 3a5ca6ce6642a86a59fea0ce9860fe297d63f1f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 10 Apr 2013 20:30:52 +0200 Subject: [PATCH 34/62] IconRenderer: cache the shader locations to save computation This operation seems to be quite expensive in callgrind, doing so reduces the RenderElement cost of about 30% (bzr r3290.3.4) --- unity-shared/IconRenderer.cpp | 48 ++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/unity-shared/IconRenderer.cpp b/unity-shared/IconRenderer.cpp index fef132394..cc4217c4a 100644 --- a/unity-shared/IconRenderer.cpp +++ b/unity-shared/IconRenderer.cpp @@ -235,6 +235,13 @@ struct IconRenderer::TexturesPool nux::ObjectPtr asm_shader; #endif + int VertexLocation; + int VPMatrixLocation; + int TextureCoord0Location; + int FragmentColor; + int ColorifyColor; + int DesatFactor; + std::map labels; private: @@ -832,20 +839,15 @@ void IconRenderer::RenderElement(nux::GraphicsEngine& GfxContext, { textures_->shader_program_uv_persp_correction->Begin(); - int TextureObjectLocation = textures_->shader_program_uv_persp_correction->GetUniformLocationARB("TextureObject0"); - VertexLocation = textures_->shader_program_uv_persp_correction->GetAttributeLocation("iVertex"); - TextureCoord0Location = textures_->shader_program_uv_persp_correction->GetAttributeLocation("iTexCoord0"); - FragmentColor = textures_->shader_program_uv_persp_correction->GetUniformLocationARB("color0"); - ColorifyColor = textures_->shader_program_uv_persp_correction->GetUniformLocationARB("colorify_color"); - DesatFactor = textures_->shader_program_uv_persp_correction->GetUniformLocationARB("desat_factor"); - - if (TextureObjectLocation != -1) - CHECKGL(glUniform1iARB(TextureObjectLocation, 0)); + VertexLocation = textures_->VertexLocation; + TextureCoord0Location = textures_->TextureCoord0Location; + FragmentColor = textures_->FragmentColor; + ColorifyColor = textures_->ColorifyColor; + DesatFactor = textures_->DesatFactor; - int VPMatrixLocation = textures_->shader_program_uv_persp_correction->GetUniformLocationARB("ViewProjectionMatrix"); - if (VPMatrixLocation != -1) + if (textures_->VPMatrixLocation != -1) { - textures_->shader_program_uv_persp_correction->SetUniformLocMatrix4fv((GLint)VPMatrixLocation, 1, false, (GLfloat*) & (stored_projection_matrix_.m)); + textures_->shader_program_uv_persp_correction->SetUniformLocMatrix4fv((GLint)textures_->VPMatrixLocation, 1, false, (GLfloat*) & (stored_projection_matrix_.m)); } } #ifndef USE_GLES @@ -1203,6 +1205,12 @@ void IconRenderer::GetInverseScreenPerspectiveMatrix(nux::Matrix4& ViewMatrix, n IconRenderer::TexturesPool::TexturesPool() : offscreen_progress_texture(nux::GetGraphicsDisplay()->GetGpuDevice()->CreateSystemCapableDeviceTexture(2, 2, 1, nux::BITFMT_R8G8B8A8)) + , VertexLocation(-1) + , VPMatrixLocation(0) + , TextureCoord0Location(-1) + , FragmentColor(0) + , ColorifyColor(0) + , DesatFactor(0) { LoadTexture(progress_bar_trough, PKGDATADIR"/progress_bar_trough.png"); LoadTexture(progress_bar_fill, PKGDATADIR"/progress_bar_fill.png"); @@ -1258,6 +1266,22 @@ void IconRenderer::TexturesPool::SetupShaders() shader_program_uv_persp_correction = nux::GetGraphicsDisplay()->GetGpuDevice()->CreateShaderProgram(); shader_program_uv_persp_correction->LoadIShader(gPerspectiveCorrectShader.c_str()); shader_program_uv_persp_correction->Link(); + + shader_program_uv_persp_correction->Begin(); + + int TextureObjectLocation = shader_program_uv_persp_correction->GetUniformLocationARB("TextureObject0"); + VertexLocation = shader_program_uv_persp_correction->GetAttributeLocation("iVertex"); + TextureCoord0Location = shader_program_uv_persp_correction->GetAttributeLocation("iTexCoord0"); + FragmentColor = shader_program_uv_persp_correction->GetUniformLocationARB("color0"); + ColorifyColor = shader_program_uv_persp_correction->GetUniformLocationARB("colorify_color"); + DesatFactor = shader_program_uv_persp_correction->GetUniformLocationARB("desat_factor"); + + if (TextureObjectLocation != -1) + CHECKGL(glUniform1iARB(TextureObjectLocation, 0)); + + VPMatrixLocation = shader_program_uv_persp_correction->GetUniformLocationARB("ViewProjectionMatrix"); + + shader_program_uv_persp_correction->End(); } else { From 7f880e9991e30e9b6c0ec4194d634b47fddecb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 10 Apr 2013 21:00:43 +0200 Subject: [PATCH 35/62] unityshell: remove the slow nuxPrologue/nuxEpilogue calls in paintPanelShadow They're often called, as this happens in glPaint. (bzr r3290.3.5) --- plugins/unityshell/src/unityshell.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index b693f3d3e..a6a08519d 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -623,8 +623,6 @@ void UnityScreen::paintPanelShadow(CompRegion const& clip) panelShadowPainted |= redraw; - nuxPrologue(); - for (auto const& r : redraw.rects()) { for (GLTexture* tex : _shadow_texture) @@ -687,7 +685,6 @@ void UnityScreen::paintPanelShadow(CompRegion const& clip) glDisable(GL_BLEND); } } - nuxEpilogue(); } void @@ -1439,8 +1436,7 @@ void UnityScreen::nuxDamageCompiz() * redraw even though the launcher's geometry is not in DrawList, and * stop it. Then maybe we can revert back to the old code below #else. */ - std::vector const& dirty = wt->GetDrawList(); - if (!dirty.empty() || animation_controller_->HasRunningAnimations()) + if (!wt->GetDrawList().empty() || animation_controller_->HasRunningAnimations()) { cScreen->damageRegionSetEnabled(this, false); cScreen->damageScreen(); From 13c29e4661af8431abcd0f13f974b36f1fca548e Mon Sep 17 00:00:00 2001 From: Brandon Schaefer Date: Wed, 10 Apr 2013 13:59:51 -0700 Subject: [PATCH 36/62] * Remove dead code, this UBUS signal gets removed when the view is setup. (bzr r3294.1.1) --- dash/DashController.cpp | 5 ----- dash/DashController.h | 1 - 2 files changed, 6 deletions(-) diff --git a/dash/DashController.cpp b/dash/DashController.cpp index 77c14a11f..cbd08d8e8 100644 --- a/dash/DashController.cpp +++ b/dash/DashController.cpp @@ -151,8 +151,6 @@ void Controller::SetupDashView() window_->SetLayout(layout); window_->UpdateInputWindowGeometry(); - - ubus_manager_.UnregisterInterest(place_entry_request_id_); } void Controller::RegisterUBusInterests() @@ -161,9 +159,6 @@ void Controller::RegisterUBusInterests() sigc::mem_fun(this, &Controller::OnExternalShowDash)); ubus_manager_.RegisterInterest(UBUS_OVERLAY_CLOSE_REQUEST, sigc::mem_fun(this, &Controller::OnExternalHideDash)); - place_entry_request_id_ = - ubus_manager_.RegisterInterest(UBUS_PLACE_ENTRY_ACTIVATE_REQUEST, - sigc::mem_fun(this, &Controller::OnActivateRequest)); ubus_manager_.RegisterInterest(UBUS_DASH_ABOUT_TO_SHOW, [&] (GVariant*) { EnsureDash(); }); ubus_manager_.RegisterInterest(UBUS_OVERLAY_SHOWN, [&] (GVariant *data) diff --git a/dash/DashController.h b/dash/DashController.h index 4c8086eda..4dd2a709e 100644 --- a/dash/DashController.h +++ b/dash/DashController.h @@ -105,7 +105,6 @@ class Controller : public unity::debug::Introspectable DashView* view_; sigc::connection screen_ungrabbed_slot_; - unsigned place_entry_request_id_; glib::DBusServer dbus_server_; glib::TimeoutSeconds ensure_timeout_; nux::animation::AnimateValue timeline_animator_; From adf4e84bfdf49b7ff531ac45dd153eb6b30deb9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 10 Apr 2013 23:23:07 +0200 Subject: [PATCH 37/62] IconTextureSource: use vectors for transformations handling Use constructor to init values and sizes. (bzr r3290.3.6) --- unity-shared/IconTextureSource.cpp | 11 ++--------- unity-shared/IconTextureSource.h | 6 +++--- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/unity-shared/IconTextureSource.cpp b/unity-shared/IconTextureSource.cpp index cd0394fd5..8aa7684a1 100644 --- a/unity-shared/IconTextureSource.cpp +++ b/unity-shared/IconTextureSource.cpp @@ -35,19 +35,12 @@ IconTextureSource::IconTextureSource() : last_render_center_(RENDERERS_SIZE) , last_logical_center_(RENDERERS_SIZE) , last_rotation_(RENDERERS_SIZE) - , transform_map(RENDERERS_SIZE) + , transformations_(RENDERERS_SIZE, decltype(transformations_)::value_type(TRANSFORM_SIZE, std::vector(4))) {} std::vector & IconTextureSource::GetTransform(TransformIndex index, int monitor) { - auto iter = transform_map[monitor].find(index); - if (iter == transform_map[monitor].end()) - { - auto iter2 = transform_map[monitor].insert(std::make_pair(index, std::vector(4))); - return iter2.first->second; - } - - return iter->second; + return transformations_[monitor][index]; } void IconTextureSource::RememberCenters(int monitor, nux::Point3 const& render, nux::Point3 const& logical) diff --git a/unity-shared/IconTextureSource.h b/unity-shared/IconTextureSource.h index 99bd0455e..4fe3b4552 100644 --- a/unity-shared/IconTextureSource.h +++ b/unity-shared/IconTextureSource.h @@ -37,12 +37,12 @@ class IconTextureSource : public nux::InitiallyUnownedObject enum TransformIndex { - TRANSFORM_TILE, + TRANSFORM_TILE = 0, TRANSFORM_IMAGE, TRANSFORM_HIT_AREA, TRANSFORM_GLOW, TRANSFORM_EMBLEM, - TRANSFORM_LAST + TRANSFORM_SIZE }; IconTextureSource(); @@ -67,7 +67,7 @@ class IconTextureSource : public nux::InitiallyUnownedObject std::vector last_render_center_; std::vector last_logical_center_; std::vector last_rotation_; - std::vector>> transform_map; + std::vector>> transformations_; }; } From f335a404ded0c31eefab4ad05a85453dffa95d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 10 Apr 2013 23:37:02 +0200 Subject: [PATCH 38/62] IconTextureSource: add method to save if the icon was skipping (bzr r3290.3.7) --- unity-shared/IconTextureSource.cpp | 13 ++++++++++++- unity-shared/IconTextureSource.h | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/unity-shared/IconTextureSource.cpp b/unity-shared/IconTextureSource.cpp index 8aa7684a1..19dd30c8d 100644 --- a/unity-shared/IconTextureSource.cpp +++ b/unity-shared/IconTextureSource.cpp @@ -32,7 +32,8 @@ namespace } IconTextureSource::IconTextureSource() - : last_render_center_(RENDERERS_SIZE) + : skip_(RENDERERS_SIZE, false) + , last_render_center_(RENDERERS_SIZE) , last_logical_center_(RENDERERS_SIZE) , last_rotation_(RENDERERS_SIZE) , transformations_(RENDERERS_SIZE, decltype(transformations_)::value_type(TRANSFORM_SIZE, std::vector(4))) @@ -69,5 +70,15 @@ nux::Point3 const& IconTextureSource::LastRotation(int monitor) const return last_rotation_[monitor]; } +void IconTextureSource::RememberSkip(int monitor, bool skip) +{ + skip_[monitor] = skip; +} + +bool IconTextureSource::WasSkipping(int monitor) const +{ + return skip_[monitor]; +} + } } \ No newline at end of file diff --git a/unity-shared/IconTextureSource.h b/unity-shared/IconTextureSource.h index 4fe3b4552..69ad90f25 100644 --- a/unity-shared/IconTextureSource.h +++ b/unity-shared/IconTextureSource.h @@ -55,6 +55,9 @@ class IconTextureSource : public nux::InitiallyUnownedObject void RememberCenters(int monitor, nux::Point3 const& render, nux::Point3 const& logical); void RememberRotation(int monitor, nux::Point3 const& rotation); + void RememberSkip(int monitor, bool skip); + bool WasSkipping(int monitor) const; + virtual nux::Color BackgroundColor() const = 0; virtual nux::Color GlowColor() = 0; @@ -64,6 +67,7 @@ class IconTextureSource : public nux::InitiallyUnownedObject virtual nux::BaseTexture* Emblem() = 0; private: + std::vector skip_; std::vector last_render_center_; std::vector last_logical_center_; std::vector last_rotation_; From 5513b1eed33597c82cabaf3524b555acc37228b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 10 Apr 2013 23:41:57 +0200 Subject: [PATCH 39/62] IconRenderer: Pre-propcess an icon if it changed its skipping state (bzr r3290.3.8) --- unity-shared/IconRenderer.cpp | 7 +++---- unity-shared/IconRenderer.h | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/unity-shared/IconRenderer.cpp b/unity-shared/IconRenderer.cpp index cc4217c4a..40345ef23 100644 --- a/unity-shared/IconRenderer.cpp +++ b/unity-shared/IconRenderer.cpp @@ -271,9 +271,6 @@ IconRenderer::IconRenderer() pip_style = OUTSIDE_TILE; } -IconRenderer::~IconRenderer() -{} - void IconRenderer::SetTargetSize(int tile_size, int image_size_, int spacing_) { icon_size = tile_size; @@ -302,13 +299,15 @@ void IconRenderer::PreprocessIcons(std::list& args, nux::Geometry con if (it->render_center == launcher_icon->LastRenderCenter(monitor) && it->logical_center == launcher_icon->LastLogicalCenter(monitor) && - it->rotation == launcher_icon->LastRotation(monitor)) + it->rotation == launcher_icon->LastRotation(monitor) && + it->skip == launcher_icon->WasSkipping(monitor)) { continue; } launcher_icon->RememberCenters(monitor, it->render_center, it->logical_center); launcher_icon->RememberRotation(monitor, it->rotation); + launcher_icon->RememberSkip(monitor, it->skip); float w = icon_size; float h = icon_size; diff --git a/unity-shared/IconRenderer.h b/unity-shared/IconRenderer.h index 00b5985d8..dce7886d5 100644 --- a/unity-shared/IconRenderer.h +++ b/unity-shared/IconRenderer.h @@ -37,7 +37,6 @@ class IconRenderer : public AbstractIconRenderer { public: IconRenderer(); - virtual ~IconRenderer(); void PreprocessIcons(std::list& args, nux::Geometry const& target_window); From 0492e5d7e1a2f4a601c3e0146174a9de987e3383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 11 Apr 2013 00:10:55 +0200 Subject: [PATCH 40/62] LensView: reduce the map accesses, it moves the callgrind cost down to 0 (bzr r3290.3.9) --- dash/LensView.cpp | 24 +++++++++--------------- dash/LensView.h | 2 +- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/dash/LensView.cpp b/dash/LensView.cpp index 0013ea0cb..e972e3f94 100755 --- a/dash/LensView.cpp +++ b/dash/LensView.cpp @@ -225,11 +225,6 @@ void LensView::SetupViews(nux::Area* show_filters) scroll_view_->EnableHorizontalScrollBar(false); layout_->AddView(scroll_view_); - scroll_view_->geometry_changed.connect([this] (nux::Area *area, nux::Geometry& geo) - { - CheckScrollBarState(); - }); - scroll_layout_ = new nux::VLayout(NUX_TRACKER_LOCATION); scroll_view_->SetLayout(scroll_layout_); scroll_view_->SetRightArea(show_filters); @@ -510,8 +505,7 @@ void LensView::OnResultAdded(Result const& result) std::string uri = result.uri; LOG_TRACE(logger) << "Result added: " << uri; - counts_[group]++; - UpdateCounts(group); + UpdateCounts(group, ++counts_[group]); // make sure we don't display the no-results-hint if we do have results if (G_UNLIKELY (no_results_active_)) { @@ -543,8 +537,7 @@ void LensView::OnResultRemoved(Result const& result) std::string uri = result.uri; LOG_TRACE(logger) << "Result removed: " << uri; - counts_[group]--; - UpdateCounts(group); + UpdateCounts(group, --counts_[group]); } catch (std::out_of_range& oor) { LOG_WARN(logger) << "Result does not have a valid category index: " << boost::lexical_cast(result.category_index) @@ -552,13 +545,13 @@ void LensView::OnResultRemoved(Result const& result) } } -void LensView::UpdateCounts(PlacesGroup* group) +void LensView::UpdateCounts(PlacesGroup* group, unsigned int new_counts) { unsigned int columns = dash::Style::Instance().GetDefaultNColumns(); columns -= filters_expanded ? 2 : 0; - group->SetCounts(columns, counts_[group]); - group->SetVisible(counts_[group]); + group->SetCounts(columns, new_counts); + group->SetVisible(new_counts); } void LensView::CheckNoResults(Lens::Hints const& hints) @@ -663,13 +656,13 @@ void LensView::OnGroupExpanded(PlacesGroup* group) void LensView::CheckScrollBarState() { - if (scroll_layout_->GetGeometry().height > scroll_view_->GetGeometry().height) + if (scroll_layout_->GetHeight() > scroll_view_->GetHeight()) { - scroll_view_->EnableVerticalScrollBar(true); + scroll_view_->EnableVerticalScrollBar(true); } else { - scroll_view_->EnableVerticalScrollBar(false); + scroll_view_->EnableVerticalScrollBar(false); } } @@ -735,6 +728,7 @@ void LensView::DrawContent(nux::GraphicsEngine& graphics_engine, bool force_draw { nux::Geometry const& geo(GetGeometry()); graphics_engine.PushClippingRectangle(geo); + CheckScrollBarState(); if (!IsFullRedraw() && RedirectedAncestor()) { diff --git a/dash/LensView.h b/dash/LensView.h index ada5b2e46..503fd53ce 100644 --- a/dash/LensView.h +++ b/dash/LensView.h @@ -97,7 +97,7 @@ class LensView : public nux::View, public unity::debug::Introspectable void OnCategoryOrderChanged(); void OnResultAdded(Result const& result); void OnResultRemoved(Result const& result); - void UpdateCounts(PlacesGroup* group); + void UpdateCounts(PlacesGroup* group, unsigned int); void OnGroupExpanded(PlacesGroup* group); void CheckScrollBarState(); void OnColumnsChanged(); From 522760b9fc6ea29ada572f20737ea3f59dd76a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 11 Apr 2013 00:12:48 +0200 Subject: [PATCH 41/62] PanelController: use const& to return Xids, removing copies reduces its cost a lot Since this function is called in compiz painting functions, it's better to keep it low. (bzr r3290.3.10) --- panel/PanelController.cpp | 38 ++++++++++++++------------------------ panel/PanelController.h | 2 +- 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/panel/PanelController.cpp b/panel/PanelController.cpp index b30e4e659..631e7509a 100644 --- a/panel/PanelController.cpp +++ b/panel/PanelController.cpp @@ -44,7 +44,6 @@ class Controller::Impl void FirstMenuShow(); void QueueRedraw(); - std::vector GetTrayXids() const; std::vector GetPanelViews() const; std::vector GetGeometries() const; @@ -60,7 +59,6 @@ class Controller::Impl void OnScreenChanged(unsigned int primary_monitor, std::vector& monitors, Introspectable *iobj); -private: typedef nux::ObjectPtr BaseWindowPtr; unity::PanelView* ViewForWindow(BaseWindowPtr const& window) const; @@ -70,8 +68,8 @@ class Controller::Impl nux::Geometry& geo, void* user_data); -private: std::vector windows_; + std::vector tray_xids_; float opacity_; bool opacity_maximized_toggle_; int menus_fadein_; @@ -94,23 +92,11 @@ Controller::Impl::Impl() , dbus_indicators_(std::make_shared()) {} -std::vector Controller::Impl::GetTrayXids() const -{ - std::vector xids; - - for (auto window: windows_) - { - xids.push_back(ViewForWindow(window)->GetTrayXid()); - } - - return xids; -} - std::vector Controller::Impl::GetPanelViews() const { std::vector views; views.reserve(windows_.size()); - for (auto window: windows_) + for (auto const& window: windows_) views.push_back(ViewForWindow(window)); return views; } @@ -119,7 +105,7 @@ std::vector Controller::Impl::GetGeometries() const { std::vector geometries; - for (auto window : windows_) + for (auto const& window : windows_) { geometries.push_back(window->GetAbsoluteGeometry()); } @@ -129,7 +115,7 @@ std::vector Controller::Impl::GetGeometries() const void Controller::Impl::FirstMenuShow() { - for (auto window: windows_) + for (auto const& window: windows_) { if (ViewForWindow(window)->FirstMenuShow()) break; @@ -140,7 +126,7 @@ void Controller::Impl::SetOpacity(float opacity) { opacity_ = opacity; - for (auto window: windows_) + for (auto const& window: windows_) { ViewForWindow(window)->SetOpacity(opacity_); } @@ -158,7 +144,7 @@ void Controller::Impl::SetOpacityMaximizedToggle(bool enabled) { opacity_maximized_toggle_ = enabled; - for (auto window: windows_) + for (auto const& window: windows_) { ViewForWindow(window)->SetOpacityMaximizedToggle(opacity_maximized_toggle_); } @@ -173,7 +159,7 @@ void Controller::Impl::SetMenuShowTimings(int fadein, int fadeout, int discovery menus_discovery_fadein_ = discovery_fadein; menus_discovery_fadeout_ = discovery_fadeout; - for (auto window: windows_) + for (auto const& window: windows_) { ViewForWindow(window)->SetMenuShowTimings(fadein, fadeout, discovery, discovery_fadein, discovery_fadeout); @@ -182,7 +168,7 @@ void Controller::Impl::SetMenuShowTimings(int fadein, int fadeout, int discovery void Controller::Impl::QueueRedraw() { - for (auto window: windows_) + for (auto const& window: windows_) { window->QueueDraw(); } @@ -205,6 +191,8 @@ void Controller::Impl::OnScreenChanged(unsigned int primary_monitor, unsigned n_monitors = monitors.size(); unsigned int i = 0; + tray_xids_.resize(n_monitors); + for (it = windows_.begin(); it != windows_.end(); ++it) { if (i < n_monitors) @@ -222,6 +210,7 @@ void Controller::Impl::OnScreenChanged(unsigned int primary_monitor, view = ViewForWindow(*it); view->SetPrimary(i == primary_monitor); view->SetMonitor(i); + tray_xids_[i] = view->GetTrayXid(); if (nux::GetWindowThread()->IsEmbeddedWindow()) { @@ -252,6 +241,7 @@ void Controller::Impl::OnScreenChanged(unsigned int primary_monitor, menus_discovery_fadein_, menus_discovery_fadeout_); view->SetPrimary(i == primary_monitor); view->SetMonitor(i); + tray_xids_[i] = view->GetTrayXid(); layout->AddView(view, 1); layout->SetContentDistribution(nux::MAJOR_POSITION_START); @@ -362,9 +352,9 @@ void Controller::QueueRedraw() pimpl->QueueRedraw(); } -std::vector Controller::GetTrayXids() const +std::vector const& Controller::GetTrayXids() const { - return pimpl->GetTrayXids(); + return pimpl->tray_xids_; } std::vector Controller::GetPanelViews() const diff --git a/panel/PanelController.h b/panel/PanelController.h index afd84d262..f238c7efb 100644 --- a/panel/PanelController.h +++ b/panel/PanelController.h @@ -40,7 +40,7 @@ class Controller : public sigc::trackable, public unity::debug::Introspectable void FirstMenuShow(); void QueueRedraw(); - std::vector GetTrayXids() const; + std::vector const& GetTrayXids() const; std::vector GetPanelViews() const; std::vector GetGeometries() const; From 89fd28d2f7e158f2f987a35d47f83a5a7cfb3873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 11 Apr 2013 00:13:31 +0200 Subject: [PATCH 42/62] PanelTray: Return 0 as xid if the widget is not realized (it shouldn't ever happen) (bzr r3290.3.11) --- panel/PanelTray.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/PanelTray.cpp b/panel/PanelTray.cpp index 4af85cae5..29bdefe0d 100644 --- a/panel/PanelTray.cpp +++ b/panel/PanelTray.cpp @@ -89,7 +89,7 @@ PanelTray::~PanelTray() Window PanelTray::xid() { - if (!window_) + if (!window_ || !gtk_widget_get_realized(window_)) return 0; return gdk_x11_window_get_xid(gtk_widget_get_window(window_)); From 5331f63966116025933f696efb27258574406b5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 11 Apr 2013 00:13:44 +0200 Subject: [PATCH 43/62] FileManager: add missing include (bzr r3290.3.12) --- unity-shared/FileManager.h | 1 + 1 file changed, 1 insertion(+) diff --git a/unity-shared/FileManager.h b/unity-shared/FileManager.h index ea4aa3278..ae84e6319 100644 --- a/unity-shared/FileManager.h +++ b/unity-shared/FileManager.h @@ -22,6 +22,7 @@ #define UNITYSHELL_FILEMANAGER_H #include +#include #include #include From 30a004a04bdb6d7be916f1509a6d340a52d75573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 11 Apr 2013 00:17:15 +0200 Subject: [PATCH 44/62] debian/control: updating builddep to force a rebuild with new nux (bzr r3290.3.13) --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index da36c4492..550384a1e 100644 --- a/debian/control +++ b/debian/control @@ -28,7 +28,7 @@ Build-Depends: cmake, libunity-misc-dev (>= 4.0.4), libgrail-dev (>= 1.0.20), libxcb-icccm4-dev, - libnux-4.0-dev (>= 4.0.0daily13.01.18bzr752), + libnux-4.0-dev (>= 4.0.1), compiz-dev (>= 1:0.9.9~daily13.01.25bzr3586), libcompizconfig0-dev (>= 1:0.9.9~daily12.12.05-0ubuntu2), xsltproc, From 31f41e2e16250d8492b2a507d8efb1f60dd12b46 Mon Sep 17 00:00:00 2001 From: Andrea Azzarone Date: Thu, 11 Apr 2013 07:15:36 +0200 Subject: [PATCH 45/62] Show XdndCollectionWindow only during dnd operation. (bzr r3294.3.1) --- launcher/XdndCollectionWindowImp.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/launcher/XdndCollectionWindowImp.cpp b/launcher/XdndCollectionWindowImp.cpp index b98075187..a7ca834ad 100644 --- a/launcher/XdndCollectionWindowImp.cpp +++ b/launcher/XdndCollectionWindowImp.cpp @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * -* Authored by: Andrea Azzarone +* Authored by: Andrea Azzarone */ #include "XdndCollectionWindowImp.h" @@ -38,9 +38,6 @@ class PrivateWindow : public nux::BaseWindow auto uscreen = UScreen::GetDefault(); SetGeometry(uscreen->GetScreenGeometry()); - ShowWindow(true); - PushToBack(); - if (nux::GetWindowThread()->IsEmbeddedWindow()) { // Hack to create the X Window as soon as possible. @@ -104,6 +101,7 @@ void XdndCollectionWindowImp::Collect() // Using PushToFront we're sure that the window is shown over the panel window, // the launcher window and the dash window. Don't forget to call PushToBack as // soon as possible. + window_->ShowWindow(true); window_->PushToFront(); if (nux::GetWindowThread()->IsEmbeddedWindow()) @@ -112,6 +110,7 @@ void XdndCollectionWindowImp::Collect() void XdndCollectionWindowImp::Deactivate() { + window_->ShowWindow(false); window_->PushToBack(); if (nux::GetWindowThread()->IsEmbeddedWindow()) From 9d24c422024cbb00cf4541bd49177f81b62ffa72 Mon Sep 17 00:00:00 2001 From: Andrea Azzarone Date: Thu, 11 Apr 2013 07:50:56 +0200 Subject: [PATCH 46/62] Reduce the scope of a variable and avoid the creation/destruction of a geometry on every frame. (bzr r3294.2.1) --- plugins/unityshell/src/unityshell.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 4cd112c75..b7ecb8d85 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -722,11 +722,11 @@ void UnityScreen::paintDisplay() DrawPanelUnderDash(); - auto gpu_device = nux::GetGraphicsDisplay()->GetGpuDevice(); - if (BackgroundEffectHelper::HasDirtyHelpers()) { + auto gpu_device = nux::GetGraphicsDisplay()->GetGpuDevice(); auto graphics_engine = nux::GetGraphicsDisplay()->GetGraphicsEngine(); + nux::ObjectPtr bg_texture = graphics_engine->CreateTextureFromBackBuffer(0, 0, screen->width(), @@ -734,9 +734,8 @@ void UnityScreen::paintDisplay() gpu_device->backup_texture0_ = bg_texture; } - nux::Geometry geo(0, 0, screen->width (), screen->height ()); nux::Geometry outputGeo(output->x (), output->y (), output->width (), output->height ()); - BackgroundEffectHelper::monitor_rect_ = geo; + BackgroundEffectHelper::monitor_rect_.Set(0, 0, screen->width(), screen->height()); GLint fboID; // Nux renders to the referenceFramebuffer when it's embedded. From 34b43b1a2200a32b2a55936332fc662f7b719fee Mon Sep 17 00:00:00 2001 From: Andrea Azzarone Date: Thu, 11 Apr 2013 07:53:30 +0200 Subject: [PATCH 47/62] Remove dead code. (bzr r3294.2.2) --- plugins/unityshell/src/unityshell.cpp | 4 ---- plugins/unityshell/src/unityshell.h | 1 - 2 files changed, 5 deletions(-) diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index b7ecb8d85..fdcccc418 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -133,7 +133,6 @@ UnityScreen::UnityScreen(CompScreen* screen) , gScreen(GLScreen::get(screen)) , debugger_(this) , needsRelayout(false) - , _in_paint(false) , super_keypressed_(false) , newFocusedWindow(nullptr) , doShellRepaint(false) @@ -281,7 +280,6 @@ UnityScreen::UnityScreen(CompScreen* screen) wt->Run(NULL); uScreen = this; - _in_paint = false; optionSetShowHudInitiate(boost::bind(&UnityScreen::ShowHudInitiate, this, _1, _2, _3)); optionSetShowHudTerminate(boost::bind(&UnityScreen::ShowHudTerminate, this, _1, _2, _3)); @@ -743,9 +741,7 @@ void UnityScreen::paintDisplay() wt->GetWindowCompositor().SetReferenceFramebuffer(fboID, outputGeo); nuxPrologue(); - _in_paint = true; wt->RenderInterfaceFromForeignCmd (&outputGeo); - _in_paint = false; nuxEpilogue(); for (Window tray_xid : panel_controller_->GetTrayXids()) diff --git a/plugins/unityshell/src/unityshell.h b/plugins/unityshell/src/unityshell.h index af5b726d8..78d4874f6 100644 --- a/plugins/unityshell/src/unityshell.h +++ b/plugins/unityshell/src/unityshell.h @@ -284,7 +284,6 @@ class UnityScreen : std::unique_ptr gestures_sub_windows_; bool needsRelayout; - bool _in_paint; bool super_keypressed_; typedef std::shared_ptr CompActionPtr; typedef std::vector ShortcutActions; From a31d99e71ee262471aeffec3009424331cd30c75 Mon Sep 17 00:00:00 2001 From: Andrea Azzarone Date: Fri, 12 Apr 2013 18:01:19 +0200 Subject: [PATCH 48/62] Don't force edge drawing in DashView. Fixes bug 1055126 here. (bzr r3297.1.1) --- dash/DashView.cpp | 2 +- unity-shared/OverlayRenderer.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dash/DashView.cpp b/dash/DashView.cpp index 4a24ade25..614aa60ba 100644 --- a/dash/DashView.cpp +++ b/dash/DashView.cpp @@ -692,7 +692,7 @@ void DashView::Draw(nux::GraphicsEngine& graphics_engine, bool force_draw) renderer_geo.y += panel_style.panel_height; renderer_geo.height += panel_style.panel_height; - renderer_.DrawFull(graphics_engine, content_geo_, renderer_geo_abs, renderer_geo, true); + renderer_.DrawFull(graphics_engine, content_geo_, renderer_geo_abs, renderer_geo, false); } void DashView::DrawContent(nux::GraphicsEngine& graphics_engine, bool force_draw) diff --git a/unity-shared/OverlayRenderer.cpp b/unity-shared/OverlayRenderer.cpp index 62535ccf8..114fe97aa 100644 --- a/unity-shared/OverlayRenderer.cpp +++ b/unity-shared/OverlayRenderer.cpp @@ -800,13 +800,15 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c texxform, nux::color::White); } - - gfx_context.GetRenderStates().SetBlend(false); } gfx_context.PopClippingRectangle(); } + gfx_context.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER); + gfx_context.GetRenderStates().SetColorMask(true, true, true, true); + gfx_context.GetRenderStates().SetBlend(false); + } void OverlayRendererImpl::DrawContent(nux::GraphicsEngine& gfx_context, nux::Geometry const& content_geo, nux::Geometry const& absolute_geo, nux::Geometry const& geometry) From 5d540b11df49f7000a8a34d88cb6d9aaa7945ef4 Mon Sep 17 00:00:00 2001 From: Andrea Azzarone Date: Fri, 12 Apr 2013 20:38:55 +0200 Subject: [PATCH 49/62] Pass shared ptr by const reference. (bzr r3297.1.2) --- unity-shared/GraphicsUtils.cpp | 4 ++-- unity-shared/GraphicsUtils.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/unity-shared/GraphicsUtils.cpp b/unity-shared/GraphicsUtils.cpp index ab4c7823c..f9acd7379 100644 --- a/unity-shared/GraphicsUtils.cpp +++ b/unity-shared/GraphicsUtils.cpp @@ -27,7 +27,7 @@ namespace graphics std::stack> rendering_stack; -void PushOffscreenRenderTarget_(nux::ObjectPtr texture) +void PushOffscreenRenderTarget_(nux::ObjectPtr const& texture) { int width = texture->GetWidth(); int height = texture->GetHeight(); @@ -45,7 +45,7 @@ void PushOffscreenRenderTarget_(nux::ObjectPtr texture) graphics_engine->EmptyClippingRegion(); } -void PushOffscreenRenderTarget(nux::ObjectPtr texture) +void PushOffscreenRenderTarget(nux::ObjectPtr const& texture) { PushOffscreenRenderTarget_(texture); rendering_stack.push(texture); diff --git a/unity-shared/GraphicsUtils.h b/unity-shared/GraphicsUtils.h index d4064b021..520828729 100644 --- a/unity-shared/GraphicsUtils.h +++ b/unity-shared/GraphicsUtils.h @@ -27,7 +27,7 @@ namespace unity namespace graphics { -void PushOffscreenRenderTarget(nux::ObjectPtr texture); +void PushOffscreenRenderTarget(nux::ObjectPtr const& texture); void PopOffscreenRenderTarget(); void ClearGeometry(nux::Geometry const& geo, nux::Color const& color = nux::Color(0.0f, 0.0f, 0.0f, 0.0f)); From b1a5767f9a07c879fe5735c294d99ee8caae623d Mon Sep 17 00:00:00 2001 From: Andrea Azzarone Date: Fri, 12 Apr 2013 20:45:24 +0200 Subject: [PATCH 50/62] Minor change. (bzr r3297.1.3) --- unity-shared/GraphicsUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unity-shared/GraphicsUtils.cpp b/unity-shared/GraphicsUtils.cpp index f9acd7379..8a5cfdace 100644 --- a/unity-shared/GraphicsUtils.cpp +++ b/unity-shared/GraphicsUtils.cpp @@ -27,7 +27,7 @@ namespace graphics std::stack> rendering_stack; -void PushOffscreenRenderTarget_(nux::ObjectPtr const& texture) +void PushOffscreenRenderTarget_(nux::ObjectPtr const& texture) { int width = texture->GetWidth(); int height = texture->GetHeight(); From 84c8d29194f78032868afba2c020b2f1a4200210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sat, 13 Apr 2013 00:48:37 +0200 Subject: [PATCH 51/62] SwitcherView: use std::min instead of MIN (bzr r3290.3.16) --- launcher/SwitcherView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/SwitcherView.cpp b/launcher/SwitcherView.cpp index c535db7de..777751f76 100644 --- a/launcher/SwitcherView.cpp +++ b/launcher/SwitcherView.cpp @@ -491,7 +491,7 @@ std::list SwitcherView::RenderArgsFlat(nux::Geometry& background_geo, x += (half_size + flat_spacing) * scalar; - arg.rotation.y = (1.0f - MIN (1.0f, scalar)); + arg.rotation.y = (1.0f - std::min(1.0f, scalar)); if (!should_flat && overflow > 0 && i != selection) { From beab14ac063b9717918a3d6fd6d533cccffa1737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sat, 13 Apr 2013 01:33:52 +0200 Subject: [PATCH 52/62] AbstractIconRenderer: use a nux::Vector3 instead of a nux::Point3 for rotation (bzr r3290.3.17) --- unity-shared/AbstractIconRenderer.h | 2 +- unity-shared/IconTextureSource.cpp | 4 ++-- unity-shared/IconTextureSource.h | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/unity-shared/AbstractIconRenderer.h b/unity-shared/AbstractIconRenderer.h index 9836ae6b3..abb9def0b 100644 --- a/unity-shared/AbstractIconRenderer.h +++ b/unity-shared/AbstractIconRenderer.h @@ -68,7 +68,7 @@ class RenderArg IconTextureSource* icon; nux::Point3 render_center; nux::Point3 logical_center; - nux::Point3 rotation; + nux::Vector3 rotation; nux::Color colorify; float alpha; float saturation; diff --git a/unity-shared/IconTextureSource.cpp b/unity-shared/IconTextureSource.cpp index 19dd30c8d..6feb9d618 100644 --- a/unity-shared/IconTextureSource.cpp +++ b/unity-shared/IconTextureSource.cpp @@ -50,7 +50,7 @@ void IconTextureSource::RememberCenters(int monitor, nux::Point3 const& render, last_logical_center_[monitor] = logical; } -void IconTextureSource::RememberRotation(int monitor, nux::Point3 const& rotation) +void IconTextureSource::RememberRotation(int monitor, nux::Vector3 const& rotation) { last_rotation_[monitor] = rotation; } @@ -65,7 +65,7 @@ nux::Point3 const& IconTextureSource::LastLogicalCenter(int monitor) const return last_logical_center_[monitor]; } -nux::Point3 const& IconTextureSource::LastRotation(int monitor) const +nux::Vector3 const& IconTextureSource::LastRotation(int monitor) const { return last_rotation_[monitor]; } diff --git a/unity-shared/IconTextureSource.h b/unity-shared/IconTextureSource.h index 69ad90f25..8dd36b199 100644 --- a/unity-shared/IconTextureSource.h +++ b/unity-shared/IconTextureSource.h @@ -51,9 +51,9 @@ class IconTextureSource : public nux::InitiallyUnownedObject nux::Point3 const& LastRenderCenter(int monitor) const; nux::Point3 const& LastLogicalCenter(int monitor) const; - nux::Point3 const& LastRotation(int monitor) const; + nux::Vector3 const& LastRotation(int monitor) const; void RememberCenters(int monitor, nux::Point3 const& render, nux::Point3 const& logical); - void RememberRotation(int monitor, nux::Point3 const& rotation); + void RememberRotation(int monitor, nux::Vector3 const& rotation); void RememberSkip(int monitor, bool skip); bool WasSkipping(int monitor) const; @@ -70,7 +70,7 @@ class IconTextureSource : public nux::InitiallyUnownedObject std::vector skip_; std::vector last_render_center_; std::vector last_logical_center_; - std::vector last_rotation_; + std::vector last_rotation_; std::vector>> transformations_; }; From dc142090d97ea96a3ac13a738daa5f5788697cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sat, 13 Apr 2013 03:26:06 +0200 Subject: [PATCH 53/62] BackgroundEffectHelper: use texture cache, unregister clients when unneeded And add HasDamageableHelpers() function (bzr r3290.3.18) --- unity-shared/BackgroundEffectHelper.cpp | 59 ++++++++++++++----------- unity-shared/BackgroundEffectHelper.h | 5 ++- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/unity-shared/BackgroundEffectHelper.cpp b/unity-shared/BackgroundEffectHelper.cpp index 6a1ea94d2..d48aad978 100644 --- a/unity-shared/BackgroundEffectHelper.cpp +++ b/unity-shared/BackgroundEffectHelper.cpp @@ -18,18 +18,8 @@ */ #include "BackgroundEffectHelper.h" -#include "TimeUtil.h" -#include -#ifdef TRUE -#undef TRUE -#endif - -#ifdef FALSE -#undef FALSE -#endif - -#include +#include "TextureCache.h" #include "UnitySettings.h" @@ -47,51 +37,68 @@ nux::Property BackgroundEffectHelper::updates_enabled (true); nux::Property BackgroundEffectHelper::detecting_occlusions (false); BackgroundEffectHelper::BackgroundEffectHelper() + : enabled(false) + , cache_dirty(true) { - enabled = false; - cache_dirty = true; - enabled.changed.connect (sigc::mem_fun(this, &BackgroundEffectHelper::OnEnabledChanged)); - noise_texture_ = nux::CreateTextureFromFile(PKGDATADIR"/dash_noise.png"); - + enabled.changed.connect(sigc::mem_fun(this, &BackgroundEffectHelper::OnEnabledChanged)); + noise_texture_ = TextureCache::GetDefault().FindTexture("dash_noise.png"); + if (Settings::Instance().GetLowGfxMode()) { blur_type(BLUR_NONE); } - - Register(this); } BackgroundEffectHelper::~BackgroundEffectHelper() { - noise_texture_->UnReference(); Unregister(this); } -void BackgroundEffectHelper::OnEnabledChanged(bool value) +void BackgroundEffectHelper::OnEnabledChanged(bool enabled) { - if (value) + if (enabled) + { + Register(this); DirtyCache(); + } + else + { + Unregister(this); + } } -void BackgroundEffectHelper::ProcessDamage(nux::Geometry geo) +void BackgroundEffectHelper::ProcessDamage(nux::Geometry const& geo) { for (BackgroundEffectHelper * bg_effect_helper : registered_list_) { if (bg_effect_helper->cache_dirty || !bg_effect_helper->owner || !bg_effect_helper->enabled) continue; - if (!geo.Intersect (bg_effect_helper->blur_geometry_).IsNull()) + if (!geo.Intersect(bg_effect_helper->blur_geometry_).IsNull()) { bg_effect_helper->DirtyCache(); } } } +bool BackgroundEffectHelper::HasDamageableHelpers() +{ + for (BackgroundEffectHelper * bg_effect_helper : registered_list_) + { + if (bg_effect_helper->owner && bg_effect_helper->enabled && !bg_effect_helper->cache_dirty) + { + return true; + } + } + + return false; +} + bool BackgroundEffectHelper::HasEnabledHelpers() { for (BackgroundEffectHelper * bg_effect_helper : registered_list_) { - if (bg_effect_helper->enabled) + if (bg_effect_helper->owner && bg_effect_helper->enabled) { return true; } @@ -205,7 +212,7 @@ nux::ObjectPtr BackgroundEffectHelper::GetBlurRegion(nu float gaussian_sigma = opengl_version >= 3 ? sigma_high : sigma_med; nux::ObjectPtr device_texture = gpu_device->backup_texture0_; - nux::ObjectPtr noise_device_texture = graphics_engine->CacheResource(noise_texture_); + nux::ObjectPtr noise_device_texture = graphics_engine->CacheResource(noise_texture_.GetPointer()); unsigned int buffer_width = larger_blur_geometry.width; unsigned int buffer_height = larger_blur_geometry.height; @@ -249,7 +256,7 @@ nux::ObjectPtr BackgroundEffectHelper::GetBlurRegion(nu int blur_passes = 1; nux::ObjectPtr device_texture = gpu_device->backup_texture0_; - nux::ObjectPtr noise_device_texture = graphics_engine->CacheResource(noise_texture_); + nux::ObjectPtr noise_device_texture = graphics_engine->CacheResource(noise_texture_.GetPointer()); unsigned int offset = 0; int quad_width = larger_blur_geometry.width; diff --git a/unity-shared/BackgroundEffectHelper.h b/unity-shared/BackgroundEffectHelper.h index 996928f26..ccabe40cd 100644 --- a/unity-shared/BackgroundEffectHelper.h +++ b/unity-shared/BackgroundEffectHelper.h @@ -54,9 +54,10 @@ class BackgroundEffectHelper void DirtyCache(); - static void ProcessDamage(nux::Geometry geo); + static void ProcessDamage(nux::Geometry const& geo); static bool HasDirtyHelpers(); static bool HasEnabledHelpers(); + static bool HasDamageableHelpers(); static nux::Property blur_type; static nux::Property sigma_high; @@ -77,7 +78,7 @@ class BackgroundEffectHelper private: void OnEnabledChanged (bool value); - nux::BaseTexture* noise_texture_; + nux::ObjectPtr noise_texture_; nux::ObjectPtr blur_texture_; nux::ObjectPtr resize_tmp_; nux::ObjectPtr noisy_tmp_; From 37fca9326944268b5865e90b65b99de2663d4458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sat, 13 Apr 2013 03:27:05 +0200 Subject: [PATCH 54/62] UnityScreen: don't try to damage the blur regions if we don't have any (bzr r3290.3.19) --- plugins/unityshell/src/unityshell.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 4e161d64c..e6fed5d7b 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -1330,7 +1330,7 @@ void UnityScreen::compizDamageNux(CompRegion const& damage) * current one?) to get some damage. This GetDrawList().empty() check avoids * that feedback loop and allows us to idle correctly. */ - if (wt->GetDrawList().empty()) + if (wt->GetDrawList().empty() && BackgroundEffectHelper::HasDamageableHelpers()) { CompRect::vector const& rects(damage.rects()); for (CompRect const& r : rects) From f5c4f4d090f30d9a99463558c48e84cf1db5fb85 Mon Sep 17 00:00:00 2001 From: Automatic PS uploader Date: Mon, 15 Apr 2013 04:17:44 +0000 Subject: [PATCH 55/62] Releasing 7.0.0daily13.04.15-0ubuntu1, based on r3300 (bzr r3300.1.1) --- debian/changelog | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/debian/changelog b/debian/changelog index eaba70b4c..cae506b57 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,27 @@ +unity (7.0.0daily13.04.15-0ubuntu1) raring; urgency=low + + [ Brandon Schaefer ] + * Command lens does not close when pressing Alt+F2 (LP: #1167466) + + [ Andrea Azzarone ] + * dash preview animation is slow on high resolution screens (also + fullscreen mode) (LP: #1055126) + + [ Marco Trevisan (TreviƱo) ] + * Unity makes unneeded copies of Nux DrawList (LP: #1167605) + * Unityshell uses much of his CPU time only to get tray XIDs from + PanelController (LP: #1167894) + * Adding Lens results is more expensive than needed (LP: #1168569) + * Opening new-window from quicklist static action does not focus the + newly opened window (LP: #1164483) + * Launcher pre-processes icons also when the icons have not been + changed since last draw cycle (LP: #1168556) + + [ Ubuntu daily release ] + * Automatic snapshot from revision 3300 + + -- Ubuntu daily release Mon, 15 Apr 2013 04:17:42 +0000 + unity (7.0.0daily13.04.10-0ubuntu1) raring; urgency=low [ Andrea Azzarone ] From ab244d4c81b208a9ec4717e5f3359955af9049ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 15 Apr 2013 17:38:41 +0200 Subject: [PATCH 56/62] UnityWindow: paint the panel shadow over a window if it's under the panel. Fixes LP: #871758 (bzr r3300.2.1) --- plugins/unityshell/src/unityshell.cpp | 56 ++++++++++++++++++++------- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 4e161d64c..f6ca0768d 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -2598,28 +2598,56 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, uScreen->paintDisplay(); } - bool screen_transformed = (mask & PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK); - - if (window->type() == CompWindowTypeDesktopMask && !screen_transformed) - uScreen->setPanelShadowMatrix(matrix); + enum class DrawPanelShadow + { + NO, + BELOW_WINDOW, + OVER_WINDOW, + }; - Window active_window = screen->activeWindow(); + auto draw_panel_shadow = DrawPanelShadow::NO; - if (!screen_transformed && - window->id() == active_window && - window->type() != CompWindowTypeDesktopMask) + if (!(mask & PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK)) { - uScreen->paintPanelShadow(region); + Window active_window = screen->activeWindow(); + + if (G_UNLIKELY(window->type() == CompWindowTypeDesktopMask)) + { + uScreen->setPanelShadowMatrix(matrix); + + if (active_window == 0 || active_window == window->id()) + draw_panel_shadow = DrawPanelShadow::OVER_WINDOW; + } + else + { + if (window->id() == active_window) + { + if (window->state() & MAXIMIZE_STATE) + { + draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW; + } + else + { + draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW; + + auto const& output = uScreen->screen->currentOutputDev(); + + if (window->y() - window->border().top < output.y() + uScreen->panel_style_.panel_height) + { + draw_panel_shadow = DrawPanelShadow::OVER_WINDOW; + } + } + } + } } + if (draw_panel_shadow == DrawPanelShadow::BELOW_WINDOW) + uScreen->paintPanelShadow(region); + bool ret = gWindow->glDraw(matrix, attrib, region, mask); - if (!screen_transformed && - (active_window == 0 || active_window == window->id()) && - (window->type() == CompWindowTypeDesktopMask)) - { + if (draw_panel_shadow == DrawPanelShadow::OVER_WINDOW) uScreen->paintPanelShadow(region); - } return ret; } From f52817c4ea5b4474b73f0729af546aeeade55c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 15 Apr 2013 17:44:21 +0200 Subject: [PATCH 57/62] UnityWindow: factorize the logic for maximized and non-maximized windows (bzr r3300.2.2) --- plugins/unityshell/src/unityshell.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index f6ca0768d..00e74327a 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -2622,14 +2622,10 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, { if (window->id() == active_window) { - if (window->state() & MAXIMIZE_STATE) - { - draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW; - } - else - { - draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW; + draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW; + if (!(window->state() & MAXIMIZE_STATE)) + { auto const& output = uScreen->screen->currentOutputDev(); if (window->y() - window->border().top < output.y() + uScreen->panel_style_.panel_height) From 79b18aa0fa7200bcee9e7943c625784beca5ea1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Mon, 15 Apr 2013 20:00:12 +0200 Subject: [PATCH 58/62] Disable screen locking during the autopilot test runs (bzr r3300.3.1) --- tests/autopilot/unity/tests/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/autopilot/unity/tests/__init__.py b/tests/autopilot/unity/tests/__init__.py index 310f5a7a4..b355a7241 100644 --- a/tests/autopilot/unity/tests/__init__.py +++ b/tests/autopilot/unity/tests/__init__.py @@ -43,6 +43,7 @@ from Xlib import display from Xlib import Xutil +from gi.repository import Gio log = getLogger(__name__) @@ -66,6 +67,11 @@ def setUp(self): # ropey. Once it's been proven to work reliably we can remove this line: self.set_unity_log_level("unity.wm.compiz", "DEBUG") + # For the length of the test, disable screen locking + self._desktop_settings = Gio.Settings.new("org.gnome.desktop.lockdown") + self._desktop_settings.set_boolean("disable-lock-screen", True) + self.addCleanup(self._desktop_settings.set_boolean, "disable-lock-screen", False) + def check_test_behavior(self): """Fail the test if it did something naughty. From 0364503dffecb4d61df1a24e60f0dfee87462b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Tue, 16 Apr 2013 00:18:13 +0200 Subject: [PATCH 59/62] Where did I have my head? As mentioned by Michael, we should remember the previous value of the lock gsettings variable and restore it in the end (bzr r3300.3.2) --- tests/autopilot/unity/tests/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/autopilot/unity/tests/__init__.py b/tests/autopilot/unity/tests/__init__.py index b355a7241..4dd571197 100644 --- a/tests/autopilot/unity/tests/__init__.py +++ b/tests/autopilot/unity/tests/__init__.py @@ -69,8 +69,9 @@ def setUp(self): # For the length of the test, disable screen locking self._desktop_settings = Gio.Settings.new("org.gnome.desktop.lockdown") + lock_state = self._desktop_settings.get_boolean("disable-lock-screen") self._desktop_settings.set_boolean("disable-lock-screen", True) - self.addCleanup(self._desktop_settings.set_boolean, "disable-lock-screen", False) + self.addCleanup(self._desktop_settings.set_boolean, "disable-lock-screen", lock_state) def check_test_behavior(self): """Fail the test if it did something naughty. From 83106bd60ce40cc921065075353050748c7b73be Mon Sep 17 00:00:00 2001 From: Matthieu James Date: Tue, 16 Apr 2013 08:17:22 +0100 Subject: [PATCH 60/62] Changed the swirl's direction of rotation in the BFB icon Fixes LP: #1169238 (bzr r3301.1.1) --- resources/launcher_bfb.png | Bin 14894 -> 13582 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/resources/launcher_bfb.png b/resources/launcher_bfb.png index df442fde73ce7dac544d5df496577e2c5286d348..28768e3f2bcd35299d99dda6544f406ed9897a9d 100644 GIT binary patch literal 13582 zcmX9_1yEF97k>*2EWLC}x3nNgcY~yKmy~oj(jX-*t$=`%k`hZJjfjBM5)!VIbbs$Z z->@;WGrRA;bI&=yIF|%%EoFQhY8(In@Kse5biwzC|DG^R@U>scdJKHSv{6@90Pg?$ zLs9;S0zbj_P%-ufzcK&c6C%g)E&%)x%STmH5o-ks$HIFiKpc|_01SYtf~-# zOml<0!`2I_lSeMKY6iMlRB|xNu{#qLw{uakO29Hc|-pqIS3E|D1POxEN$FiyaN7JmA7sjYh!BfvJ ziuNuh)>?bsAPHSdGnoJx*QN!>=HcqA(Dnx_U>cBt?Y{@oFo4uhz7|aT7ES;PV>CIu zNVtbZ)UgZvzzJCwNFYL6s{qo_ff{mT|I!&7+9?)rU4=YVi{SH@LIZTz$SxbWfvv}B z0Bgc#4+bO?2xAoO%9wIau?FJ#6A%}_Ay!Nu=(MUx;rH(#(rXbE;tutPf=ek+`Y0b? z67uwAei?8_rX~W_z`f7!Q?FqSOpEA!b$&7dGuET{F20XBq;M@}B!$Tu-p<%p>`@N+%n4oR|Jl?^R0okuMLOe4+-i@1Cvv>->7zv84H=_ilIM;y}FJ(V3? zmFY^BT_;5k7rQ>fEwyoVpjBEtXJUIK*yJIxW@zXeu}yUv!(YGMA7{xyMq>ZilAu0f zCQ23JLk)zBnVy4R+2D2_VePj7JRZLxVu+5KjRNjfLN8-<1@M8A=(3pL8f=0IMI0C| z?3TWoum{e?Hio7M1u}r?7xKwg)~pD$o1+5t`~_-sAU($D_w?9iPdWFcjiBwA73NQV z?|v=izPAfajKC2DY2deZ!i6y{0Z7kNC;%nsKnEqekf7u@y-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?X=cPXbN$X*vC`d)GEc*2y*s7u;;hg1(7l+I5`K19f{>)6YiW{CI%-A2&YWW| zgrZD4b8C4%GV@BkGWQX^8x5 z(!4WHgG=fP3Cwuu6dA;NLM&khs_Q3i0Y{JJpRPcn%CLKM(TMxBRJtVUDM)0Bod$aF&WfiK@*l~n##tUns_4e2c!YE=bn=)(5o+^t6osMr3p z(_`8vaY^zp3=S6B?(+lQiJw1-P(%~oBeAKOm5kg%7=t#L-yhySASvRp(EF`^s7uFY zf5d!9n1QM2fo`eoX|G~DO^-MMCip2RZkX2zWG-gus3OYN+4W*if(Ll3ldWxc6t!Fd_jf?Vu!hI_cYW8$JS!#%Hyl z=T$&*u;dQGBwrMl2fvYNEA7!d#viPhi0+7R{Q4Tl7q4biJMfESOz!7QZw&F2S(@G_eLR`IHx0QK@Bpn+Qp%#FEr7QP3@w>&mGOEvI zPd5xalJ(2|l6#!csW{zmt^k@Q$%2CSo6VSMk&8Y!~se)DD5pv4)&j z9{8{dT%yf(NAZ&kyq`%9^W~OoUio_43j^8dR#x!t;Jl6`3+ARN(&r Date: Tue, 16 Apr 2013 12:36:58 +0200 Subject: [PATCH 61/62] A leftover from the self.emulator -> self.unity.emulator migration. This was causing problems with HUD cleanups (bzr r3301.2.1) --- tests/autopilot/unity/tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/autopilot/unity/tests/__init__.py b/tests/autopilot/unity/tests/__init__.py index 310f5a7a4..fec7a7d92 100644 --- a/tests/autopilot/unity/tests/__init__.py +++ b/tests/autopilot/unity/tests/__init__.py @@ -95,7 +95,7 @@ def check_test_behavior(self): well_behaved = False reasons.append("The test left the hud open.") log.warning("Test left the hud open, closing it...") - self.hud.ensure_hidden() + self.unity.hud.ensure_hidden() # Are we in show desktop mode? if not self.well_behaved(self.unity.window_manager, showdesktop_active=False): well_behaved = False From 2c28c84b1afe721e7dc38727c415f29ee359f214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Tue, 16 Apr 2013 15:21:50 +0200 Subject: [PATCH 62/62] During the test_window_buttons_show_when_holding_show_menu_key, wait for a menu settle period before continuing. The reason for this is that when by any chance the gedit application is already maximized on start, there is a timing condition that causes things to happen 'too fast' - and in the end, instead of a Alt press we get an Alt tap. (bzr r3301.3.1) --- tests/autopilot/unity/tests/test_panel.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/autopilot/unity/tests/test_panel.py b/tests/autopilot/unity/tests/test_panel.py index 6cf1fa374..063b7bdf6 100644 --- a/tests/autopilot/unity/tests/test_panel.py +++ b/tests/autopilot/unity/tests/test_panel.py @@ -626,6 +626,7 @@ def test_window_buttons_show_when_holding_show_menu_key(self): maximized=True, move_to_monitor=True) + self.sleep_menu_settle_period() self.assertThat(self.panel.window_buttons_shown, Eventually(Equals(False))) self.keybinding_hold("panel/show_menus")