summaryrefslogtreecommitdiff
path: root/hud
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2015-12-22 18:59:55 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2015-12-22 18:59:55 +0100
commit4d21393645a1b7fe8720fc69e46471fe780ad6d0 (patch)
tree6bb12cb26c818a894c8f0fb8afffe329c6ef4bed /hud
parent753b8c49910e1b7c565398be6dc055ba35ba011a (diff)
HudController: set as not locked to launcher when launcher is on the bottom
(bzr r3999.8.4)
Diffstat (limited to 'hud')
-rw-r--r--hud/HudController.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/hud/HudController.cpp b/hud/HudController.cpp
index d87ef9ed5..93ac38e0f 100644
--- a/hud/HudController.cpp
+++ b/hud/HudController.cpp
@@ -174,7 +174,7 @@ int Controller::GetIdealMonitor()
bool Controller::IsLockedToLauncher(int monitor)
{
- if (launcher_locked_out)
+ if (launcher_locked_out && Settings::Instance().launcher_position() == LauncherPosition::LEFT)
{
int primary_monitor = UScreen::GetDefault()->GetPrimaryMonitor();
@@ -253,17 +253,9 @@ nux::Geometry Controller::GetIdealWindowGeometry()
if (IsLockedToLauncher(ideal_monitor))
{
- if (Settings::Instance().launcher_position() == LauncherPosition::LEFT)
- {
- int launcher_width = unity::Settings::Instance().LauncherSize(ideal_monitor);
- geo.x += launcher_width;
- geo.width -= launcher_width;
- }
- else
- {
- int launcher_height = unity::Settings::Instance().LauncherSize(ideal_monitor);
- geo.height -= launcher_height;
- }
+ int launcher_width = unity::Settings::Instance().LauncherSize(ideal_monitor);
+ geo.x += launcher_width;
+ geo.width -= launcher_width;
}
return geo;