diff options
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r-- | src/FbWinFrame.cc | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 68adc0f..adef30c 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -90,7 +90,6 @@ FbWinFrame::FbWinFrame(BScreen &screen, FbWinFrameTheme &theme, FbTk::ImageContr | |||
90 | m_active_orig_client_bw(0), | 90 | m_active_orig_client_bw(0), |
91 | m_need_render(true), | 91 | m_need_render(true), |
92 | m_button_size(1), | 92 | m_button_size(1), |
93 | m_width_before_shade(1), | ||
94 | m_height_before_shade(1), | 93 | m_height_before_shade(1), |
95 | m_shaded(false), | 94 | m_shaded(false), |
96 | m_focused_alpha(0), | 95 | m_focused_alpha(0), |
@@ -232,7 +231,6 @@ void FbWinFrame::shade() { | |||
232 | // toggle shade | 231 | // toggle shade |
233 | m_shaded = !m_shaded; | 232 | m_shaded = !m_shaded; |
234 | if (m_shaded) { // i.e. should be shaded now | 233 | if (m_shaded) { // i.e. should be shaded now |
235 | m_width_before_shade = m_window.width(); | ||
236 | m_height_before_shade = m_window.height(); | 234 | m_height_before_shade = m_window.height(); |
237 | m_window.resize(m_window.width(), m_titlebar.height()); | 235 | m_window.resize(m_window.width(), m_titlebar.height()); |
238 | alignTabs(); | 236 | alignTabs(); |
@@ -240,7 +238,7 @@ void FbWinFrame::shade() { | |||
240 | if ( m_shape.get() ) | 238 | if ( m_shape.get() ) |
241 | m_shape->update(); | 239 | m_shape->update(); |
242 | } else { // should be unshaded | 240 | } else { // should be unshaded |
243 | m_window.resize(m_width_before_shade, m_height_before_shade); | 241 | m_window.resize(m_window.width(), m_height_before_shade); |
244 | reconfigure(); | 242 | reconfigure(); |
245 | } | 243 | } |
246 | } | 244 | } |
@@ -279,19 +277,13 @@ void FbWinFrame::moveResize(int x, int y, unsigned int width, unsigned int heigh | |||
279 | if (move && x == window().x() && y == window().y()) | 277 | if (move && x == window().x() && y == window().y()) |
280 | move = false; | 278 | move = false; |
281 | 279 | ||
282 | if (resize && width == FbWinFrame::width() && height == FbWinFrame::height()) | 280 | if (resize && (m_shaded || width == FbWinFrame::width() && |
281 | height == FbWinFrame::height())) | ||
283 | resize = false; | 282 | resize = false; |
284 | 283 | ||
285 | if (!move && !resize) | 284 | if (!move && !resize) |
286 | return; | 285 | return; |
287 | 286 | ||
288 | if (resize && m_shaded) { | ||
289 | // update unshaded size if we're in shaded state and just resize width | ||
290 | m_width_before_shade = width; | ||
291 | m_height_before_shade = height; | ||
292 | height = m_window.height(); | ||
293 | } | ||
294 | |||
295 | if (move && resize) { | 287 | if (move && resize) { |
296 | m_window.moveResize(x, y, width, height); | 288 | m_window.moveResize(x, y, width, height); |
297 | notifyMoved(false); // will reconfigure | 289 | notifyMoved(false); // will reconfigure |