diff options
Diffstat (limited to 'src/CurrentWindowCmd.cc')
-rw-r--r-- | src/CurrentWindowCmd.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc index 94fc85b..e68ec8f 100644 --- a/src/CurrentWindowCmd.cc +++ b/src/CurrentWindowCmd.cc | |||
@@ -88,17 +88,12 @@ void MoveCmd::real_execute() { | |||
88 | ResizeCmd::ResizeCmd(const int step_size_x, const int step_size_y) : | 88 | ResizeCmd::ResizeCmd(const int step_size_x, const int step_size_y) : |
89 | m_step_size_x(step_size_x), m_step_size_y(step_size_y) { } | 89 | m_step_size_x(step_size_x), m_step_size_y(step_size_y) { } |
90 | 90 | ||
91 | template<typename T> | ||
92 | T max(const T& a, const T& b) { | ||
93 | return a >= b ? a : b; | ||
94 | } | ||
95 | |||
96 | void ResizeCmd::real_execute() { | 91 | void ResizeCmd::real_execute() { |
97 | 92 | ||
98 | int w = max<int>(static_cast<int>(fbwindow().width() + | 93 | int w = std::max<int>(static_cast<int>(fbwindow().width() + |
99 | m_step_size_x * fbwindow().winClient().width_inc), | 94 | m_step_size_x * fbwindow().winClient().width_inc), |
100 | fbwindow().frame().titlebarHeight() * 2 + 10); | 95 | fbwindow().frame().titlebarHeight() * 2 + 10); |
101 | int h = max<int>(static_cast<int>(fbwindow().height() + | 96 | int h = std::max<int>(static_cast<int>(fbwindow().height() + |
102 | m_step_size_y * fbwindow().winClient().height_inc), | 97 | m_step_size_y * fbwindow().winClient().height_inc), |
103 | fbwindow().frame().titlebarHeight() + 10); | 98 | fbwindow().frame().titlebarHeight() + 10); |
104 | fbwindow().resize(w, h); | 99 | fbwindow().resize(w, h); |