diff options
| author | Chris Townsend <christopher.townsend@canonical.com> | 2014-02-10 10:31:44 -0500 |
|---|---|---|
| committer | Chris Townsend <christopher.townsend@canonical.com> | 2014-02-10 10:31:44 -0500 |
| commit | b7f408be4fa970f32d3b46eaf8ca9ef844da5663 (patch) | |
| tree | b05e876d531176e5fd996f05cac5f7cf31dc8ce4 /unity-shared | |
| parent | 9882562f89986eef765eaffc3e8df273eec0ce83 (diff) | |
Fix a couple of test_panel AP tests:
* The overlay window buttons did not take multi-monitor into account, so now account for that. * Fix the AP test themselves to actually use the correct introspection object. (bzr r3648.1.1)
Diffstat (limited to 'unity-shared')
| -rw-r--r-- | unity-shared/OverlayWindowButtons.cpp | 8 | ||||
| -rw-r--r-- | unity-shared/OverlayWindowButtons.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/unity-shared/OverlayWindowButtons.cpp b/unity-shared/OverlayWindowButtons.cpp index 97616548e..8363a77b9 100644 --- a/unity-shared/OverlayWindowButtons.cpp +++ b/unity-shared/OverlayWindowButtons.cpp @@ -45,6 +45,14 @@ OverlayWindowButtons::OverlayWindowButtons() SetBackgroundColor(nux::color::Transparent); } +bool OverlayWindowButtons::IsVisibleOnMonitor(unsigned int monitor) const +{ + if (window_buttons_->monitor == monitor) + return true; + + return false; +} + void OverlayWindowButtons::UpdateGeometry() { int monitor = unity::UScreen::GetDefault()->GetMonitorWithMouse(); diff --git a/unity-shared/OverlayWindowButtons.h b/unity-shared/OverlayWindowButtons.h index 6035283fb..5c0666bc2 100644 --- a/unity-shared/OverlayWindowButtons.h +++ b/unity-shared/OverlayWindowButtons.h @@ -40,6 +40,8 @@ public: nux::Area* FindAreaUnderMouse(nux::Point const& mouse_position, nux::NuxEventType event_type); + bool IsVisibleOnMonitor(unsigned int monitor) const; + protected: void Draw(nux::GraphicsEngine& gfx_context, bool force_draw); |
