diff options
author | Bertram <bertram@cegetel.net> | 2009-07-30 23:28:18 +0200 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2009-07-30 23:28:18 +0200 |
commit | 3ff2538f8dda2f16e2a536ffc1d994374260d6f2 (patch) | |
tree | e4399e3206a76d8c2c4dc1af1fb5dddeafca14be /src/gui/setup_video.cpp | |
parent | ab6b8095d0bfe87c548776e640043b9b2bc46639 (diff) | |
download | mana-3ff2538f8dda2f16e2a536ffc1d994374260d6f2.tar.gz mana-3ff2538f8dda2f16e2a536ffc1d994374260d6f2.tar.bz2 mana-3ff2538f8dda2f16e2a536ffc1d994374260d6f2.tar.xz mana-3ff2538f8dda2f16e2a536ffc1d994374260d6f2.zip |
Fixed windows loss when changing to a lowered resolution. (Mantis 776)
Diffstat (limited to 'src/gui/setup_video.cpp')
-rw-r--r-- | src/gui/setup_video.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index ce815001..903196c6 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -444,11 +444,17 @@ void Setup_Video::action(const gcn::ActionEvent &event) const int width = atoi(mode.substr(0, mode.find("x")).c_str()); const int height = atoi(mode.substr(mode.find("x") + 1).c_str()); + // TODO: Find out why the drawing area doesn't resize without a restart. if (width != graphics->getWidth() || height != graphics->getHeight()) { - // TODO: Find out why the drawing area doesn't resize without a restart. - new OkDialog(_("Screen resolution changed"), - _("Restart your client for the change to take effect.")); + if (width < graphics->getWidth() || height < graphics->getHeight()) + new OkDialog(_("Screen resolution changed"), + _("Restart your client for the change to take effect.") + + std::string("\n") + + _("Some windows may be moved to fit the lowered resolution.")); + else + new OkDialog(_("Screen resolution changed"), + _("Restart your client for the change to take effect.")); } config.setValue("screenwidth", width); |