diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-08-15 11:24:03 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-08-15 11:24:03 (GMT) |
commit | e5c61a72799485d6751000a127163bd6390d44ba (patch) | |
tree | 06846dffe135e57f958dc69e9731e1f68fb56615 /src/FbWinFrame.cc | |
parent | 1dab657708cd8246c2ce5a6aaa05cc5733e09c54 (diff) | |
download | fluxbox-e5c61a72799485d6751000a127163bd6390d44ba.zip fluxbox-e5c61a72799485d6751000a127163bd6390d44ba.tar.bz2 |
move some frame size calculations to FbWinFrame
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r-- | src/FbWinFrame.cc | 20 |
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 | ||
1671 | void 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 | |||
1678 | void 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 | ||
1807 | void FbWinFrame::SizeHints::displaySize(int &i, int &j, | 1821 | void 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 | } |