summaryrefslogtreecommitdiff
path: root/launcher
diff options
authorBrandon Schaefer <brandontschaefer@gmail.com>2014-03-13 23:16:47 +0000
committerCI bot <ps-jenkins@lists.canonical.com>2014-03-13 23:16:47 +0000
commita1cc7c27f90a19e6ca16cfbd950d37bd1e503627 (patch)
treec167eaa12a88b32ddcf05033c0569423776a6146 /launcher
parent88021364e4f18be6087fd9838bc93dfa0dccf0a7 (diff)
parent69367ad44cf7aecf58afa978d78e10d38523551c (diff)
Clear the tooltips when going into the lockscreen. Fixes: 1291503
(bzr r3722)
Diffstat (limited to 'launcher')
-rw-r--r--launcher/Launcher.cpp6
-rw-r--r--launcher/Launcher.h2
-rw-r--r--launcher/LauncherController.cpp6
-rw-r--r--launcher/LauncherController.h2
4 files changed, 16 insertions, 0 deletions
diff --git a/launcher/Launcher.cpp b/launcher/Launcher.cpp
index 1eafa63a0..4bf6e7ff7 100644
--- a/launcher/Launcher.cpp
+++ b/launcher/Launcher.cpp
@@ -1074,6 +1074,12 @@ bool Launcher::IsOverlayOpen() const
return dash_is_open_ || hud_is_open_ || wm.IsScaleActive() || wm.IsExpoActive();
}
+void Launcher::ClearTooltip()
+{
+ if (icon_under_mouse_)
+ icon_under_mouse_->HideTooltip();
+}
+
void Launcher::SetHidden(bool hide_launcher)
{
if (hide_launcher == hidden_)
diff --git a/launcher/Launcher.h b/launcher/Launcher.h
index fd3be6c41..4e1a9cb61 100644
--- a/launcher/Launcher.h
+++ b/launcher/Launcher.h
@@ -153,6 +153,8 @@ public:
bool IsInKeyNavMode() const;
bool IsOverlayOpen() const;
+ void ClearTooltip();
+
void RenderIconToTexture(nux::GraphicsEngine&, nux::ObjectPtr<nux::IOpenGLBaseTexture> const&, AbstractLauncherIcon::Ptr const&);
#ifdef NUX_GESTURES_SUPPORT
diff --git a/launcher/LauncherController.cpp b/launcher/LauncherController.cpp
index ff0409b0b..9997ff2b2 100644
--- a/launcher/LauncherController.cpp
+++ b/launcher/LauncherController.cpp
@@ -1413,6 +1413,12 @@ bool Controller::IsOverlayOpen() const
return false;
}
+void Controller::ClearTooltips()
+{
+ for (auto launcher_ptr : pimpl->launchers)
+ launcher_ptr->ClearTooltip();
+}
+
std::string
Controller::GetName() const
{
diff --git a/launcher/LauncherController.h b/launcher/LauncherController.h
index a3b8b4ea0..305caa0c3 100644
--- a/launcher/LauncherController.h
+++ b/launcher/LauncherController.h
@@ -78,6 +78,8 @@ public:
bool IsOverlayOpen() const;
+ void ClearTooltips();
+
protected:
// Introspectable methods
std::string GetName() const;