summaryrefslogtreecommitdiff
path: root/launcher
diff options
authorChris Townsend <christopher.townsend@canonical.com>2013-11-26 16:47:07 -0500
committerChris Townsend <christopher.townsend@canonical.com>2013-11-26 16:47:07 -0500
commitc33e5045b6110b920f0b39b997e530ccfa17e5d7 (patch)
tree8e6db68af4850ad59fbf6e476d310924cac5cbcd /launcher
parent529f0660e6578490701918103b86ff841070a153 (diff)
Use IsVisibleOnMonitor() instead of IsVisible() for checking to close the Hud when clicking the Hud icon. This is due to the icon's quirk only being set for the current monitor.
Fixes LP: #1255241 (bzr r3602.3.1)
Diffstat (limited to 'launcher')
-rw-r--r--launcher/HudLauncherIcon.cpp3
-rw-r--r--launcher/HudLauncherIcon.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/launcher/HudLauncherIcon.cpp b/launcher/HudLauncherIcon.cpp
index db9f2a297..9d90838c3 100644
--- a/launcher/HudLauncherIcon.cpp
+++ b/launcher/HudLauncherIcon.cpp
@@ -35,6 +35,7 @@ DECLARE_LOGGER(logger, "unity.launcher.icon.hud");
HudLauncherIcon::HudLauncherIcon(LauncherHideMode hide_mode)
: SingleMonitorLauncherIcon(IconType::HUD)
, launcher_hide_mode_(hide_mode)
+ , overlay_monitor_(0)
{
tooltip_text = _("HUD");
tooltip_enabled = false;
@@ -110,7 +111,7 @@ nux::Color HudLauncherIcon::GlowColor()
void HudLauncherIcon::ActivateLauncherIcon(ActionArg arg)
{
- if (IsVisible())
+ if (IsVisibleOnMonitor(overlay_monitor_))
{
ubus_manager_.SendMessage(UBUS_HUD_CLOSE_REQUEST);
}
diff --git a/launcher/HudLauncherIcon.h b/launcher/HudLauncherIcon.h
index 0e4250053..a1527bedf 100644
--- a/launcher/HudLauncherIcon.h
+++ b/launcher/HudLauncherIcon.h
@@ -52,6 +52,7 @@ private:
nux::Color background_color_;
LauncherHideMode launcher_hide_mode_;
UBusManager ubus_manager_;
+ gint32 overlay_monitor_;
};
}