diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2014-05-08 05:28:38 +0200 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2014-05-08 05:28:38 +0200 |
| commit | b1fb46fae60be9f38177299e464de00f73ed8428 (patch) | |
| tree | e3e5828eec135a50f0d660a5a548c097fe78bca5 /shortcuts | |
| parent | 13e0740e158b892aa9a999bbb04bb95eb27966fa (diff) | |
ShortcutController: set the monitor property
(bzr r3794.5.7)
Diffstat (limited to 'shortcuts')
| -rw-r--r-- | shortcuts/ShortcutController.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/shortcuts/ShortcutController.cpp b/shortcuts/ShortcutController.cpp index cdf6d69f8..ba7be8830 100644 --- a/shortcuts/ShortcutController.cpp +++ b/shortcuts/ShortcutController.cpp @@ -75,9 +75,7 @@ void Controller::OnModelUpdated(Model::Ptr const& model) if (Visible()) { model->Fill(); - auto uscreen = UScreen::GetDefault(); - int monitor = uscreen->GetMonitorAtPosition(view_window_->GetX(), view_window_->GetX()); - auto const& offset = GetOffsetPerMonitor(monitor); + auto const& offset = GetOffsetPerMonitor(view_->monitor()); if (offset.x < 0 || offset.y < 0) { @@ -110,8 +108,8 @@ bool Controller::OnShowTimer() modeller_->GetCurrentModel()->Fill(); EnsureView(); - int monitor = UScreen::GetDefault()->GetMonitorWithMouse(); - auto const& offset = GetOffsetPerMonitor(monitor); + view_->monitor = UScreen::GetDefault()->GetMonitorWithMouse(); + auto const& offset = GetOffsetPerMonitor(view_->monitor()); if (offset.x < 0 || offset.y < 0) return false; |
