diff options
| author | Brandon Schaefer <brandontschaefer@gmail.com> | 2014-03-05 14:18:31 +0000 |
|---|---|---|
| committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-03-05 14:18:31 +0000 |
| commit | a1db8e2ca1f5e4e32371c2e9ef3ea5c347098f91 (patch) | |
| tree | 9fa3eb6ba8e44da791c3fa17be6268138a18501b | |
| parent | af0128bd7a47fff0af7aba0713a26bc5bfb38f92 (diff) | |
| parent | 052027c6cc1a58b9ecca744efe55a3b6f604f01f (diff) | |
When we update the OverlayWindowButtons geometry, make sure we ask the WindowButtons to update their geo as well. (This means poking it as if the DPI has changed). This way the overlay window buttons will be the correct sides per monitor. Fixes: 1285366
(bzr r3701)
| -rw-r--r-- | unity-shared/OverlayWindowButtons.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/unity-shared/OverlayWindowButtons.cpp b/unity-shared/OverlayWindowButtons.cpp index b013b9631..857bde245 100644 --- a/unity-shared/OverlayWindowButtons.cpp +++ b/unity-shared/OverlayWindowButtons.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Canonical Ltd + * Copyright (C) 2013-2014 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -56,13 +56,18 @@ bool OverlayWindowButtons::IsVisibleOnMonitor(unsigned int monitor) const void OverlayWindowButtons::UpdateGeometry() { int monitor = unity::UScreen::GetDefault()->GetMonitorWithMouse(); + int height = panel::Style::Instance().PanelHeight(monitor); nux::Geometry const& geo = unity::UScreen::GetDefault()->GetMonitorGeometry(monitor); SetX(geo.x + MAIN_LEFT_PADDING); - SetY(geo.y + MENUBAR_PADDING); - SetHeight(panel::Style::Instance().PanelHeight(monitor)); + SetY(geo.y); + SetHeight(height); window_buttons_->monitor = monitor; + + window_buttons_->SetMinimumHeight(height); + window_buttons_->SetMaximumHeight(height); + window_buttons_->UpdateDPIChanged(); } void OverlayWindowButtons::Show() |
