diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-08-15 11:09:15 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-08-15 11:09:15 (GMT) |
commit | 6053ecc1b573e437dd0d1752670748c5c3679669 (patch) | |
tree | ccbc036526b17ec536775614e6514d83665d2781 /src/WinClient.cc | |
parent | 4fa3773267362f8ca9f653bb8ee7c98baa09d5fd (diff) | |
download | fluxbox-6053ecc1b573e437dd0d1752670748c5c3679669.zip fluxbox-6053ecc1b573e437dd0d1752670748c5c3679669.tar.bz2 |
move size hint code to methods in size hint struct, restructure them a little
Diffstat (limited to 'src/WinClient.cc')
-rw-r--r-- | src/WinClient.cc | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/WinClient.cc b/src/WinClient.cc index b9602ec..f421013 100644 --- a/src/WinClient.cc +++ b/src/WinClient.cc | |||
@@ -690,31 +690,6 @@ void WinClient::updateWMProtocols() { | |||
690 | 690 | ||
691 | } | 691 | } |
692 | 692 | ||
693 | // check if the given width and height satisfy the size hints | ||
694 | bool WinClient::checkSizeHints(unsigned int width, unsigned int height) { | ||
695 | if (width < m_size_hints.min_width || height < m_size_hints.min_height) | ||
696 | return false; | ||
697 | |||
698 | if (width > m_size_hints.max_width || height > m_size_hints.max_height) | ||
699 | return false; | ||
700 | |||
701 | if ((width - m_size_hints.base_width) % m_size_hints.width_inc != 0) | ||
702 | return false; | ||
703 | |||
704 | if ((height - m_size_hints.base_height) % m_size_hints.height_inc != 0) | ||
705 | return false; | ||
706 | |||
707 | double ratio = (double)width / (double)height; | ||
708 | |||
709 | if (m_size_hints.min_aspect_y > 0 && (double)m_size_hints.min_aspect_x / (double)m_size_hints.min_aspect_y > ratio) | ||
710 | return false; | ||
711 | |||
712 | if (m_size_hints.max_aspect_y > 0 && (double)m_size_hints.max_aspect_x / (double)m_size_hints.max_aspect_y < ratio) | ||
713 | return false; | ||
714 | |||
715 | return true; | ||
716 | } | ||
717 | |||
718 | void WinClient::removeTransientFromWaitingList() { | 693 | void WinClient::removeTransientFromWaitingList() { |
719 | 694 | ||
720 | // holds the windows that dont have empty | 695 | // holds the windows that dont have empty |