fix unexpected window size

unexpected window size when the size is equal to display area size or
display workarea size
This commit is contained in:
Jinhao
2015-03-22 22:18:26 +08:00
parent 277f44c509
commit 0f4786898a
2 changed files with 39 additions and 25 deletions

View File

@@ -113,6 +113,7 @@ namespace nana
#else
void load_monitors()
{
displays.clear();
displays.emplace_back(0, primary_monitor_size());
}
#endif
@@ -125,10 +126,12 @@ namespace nana
impl_->load_monitors();
}
void screen::reload()
{
impl_.reset(std::make_shared<implement>());
//It is only when the screen is a moved-from object that impl_ is empty
if (!impl_)
impl_.swap(std::make_shared<implement>());
impl_->load_monitors();
}