aboutsummaryrefslogtreecommitdiff
path: root/src/FbWinFrame.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r--src/FbWinFrame.cc20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index eb8510e..9136d20 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -1668,6 +1668,20 @@ int FbWinFrame::yOffset() const {
1668 return 0; 1668 return 0;
1669} 1669}
1670 1670
1671void FbWinFrame::applySizeHints(unsigned int &width, unsigned int &height,
1672 bool maximizing) const {
1673 height -= titlebarHeight() + handleHeight();
1674 sizeHints().apply(width, height, maximizing);
1675 height += titlebarHeight() + handleHeight();
1676}
1677
1678void FbWinFrame::displaySize(unsigned int width, unsigned int height) const {
1679 unsigned int i, j;
1680 sizeHints().displaySize(i, j,
1681 width, height - titlebarHeight() - handleHeight());
1682 m_screen.showGeometry(i, j);
1683}
1684
1671/* For aspect ratios 1685/* For aspect ratios
1672 Note that its slightly simplified in that only the 1686 Note that its slightly simplified in that only the
1673 line gradient is given - this is because for aspect 1687 line gradient is given - this is because for aspect
@@ -1804,8 +1818,8 @@ bool FbWinFrame::SizeHints::valid(unsigned int w, unsigned int h) const {
1804 return true; 1818 return true;
1805} 1819}
1806 1820
1807void FbWinFrame::SizeHints::displaySize(int &i, int &j, 1821void FbWinFrame::SizeHints::displaySize(unsigned int &i, unsigned int &j,
1808 unsigned int width, unsigned int height) const { 1822 unsigned int width, unsigned int height) const {
1809 i = static_cast<signed>(width - base_width) / width_inc; 1823 i = (width - base_width) / width_inc;
1810 j = static_cast<signed>(height - base_height) / height_inc; 1824 j = (height - base_height) / height_inc;
1811} 1825}