diff options
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/Window.cc b/src/Window.cc index f64db65..9df48a2 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -1509,6 +1509,18 @@ void FluxboxWindow::setMaximizedState(int type) { | |||
1509 | stateSig().notify(); | 1509 | stateSig().notify(); |
1510 | } | 1510 | } |
1511 | 1511 | ||
1512 | void FluxboxWindow::disableMaximization() { | ||
1513 | |||
1514 | m_state.maximized = WindowState::MAX_NONE; | ||
1515 | // TODO: could be optional, if the window gets back to original size / | ||
1516 | // position after maximization is disabled | ||
1517 | m_state.saveGeometry(frame().x(), frame().y(), | ||
1518 | frame().width(), frame().height()); | ||
1519 | frame().applyState(); | ||
1520 | stateSig().notify(); | ||
1521 | } | ||
1522 | |||
1523 | |||
1512 | /** | 1524 | /** |
1513 | * Maximize window horizontal | 1525 | * Maximize window horizontal |
1514 | */ | 1526 | */ |
@@ -3079,12 +3091,8 @@ void FluxboxWindow::startResizing(int x, int y, ReferenceCorner dir) { | |||
3079 | m_resize_corner = dir; | 3091 | m_resize_corner = dir; |
3080 | 3092 | ||
3081 | resizing = true; | 3093 | resizing = true; |
3082 | m_state.maximized = WindowState::MAX_NONE; | ||
3083 | m_state.saveGeometry(frame().x(), frame().y(), | ||
3084 | frame().width(), frame().height()); | ||
3085 | 3094 | ||
3086 | frame().applyState(); | 3095 | disableMaximization(); |
3087 | stateSig().notify(); | ||
3088 | 3096 | ||
3089 | const Cursor& cursor = (m_resize_corner == LEFTTOP) ? frame().theme()->upperLeftAngleCursor() : | 3097 | const Cursor& cursor = (m_resize_corner == LEFTTOP) ? frame().theme()->upperLeftAngleCursor() : |
3090 | (m_resize_corner == RIGHTTOP) ? frame().theme()->upperRightAngleCursor() : | 3098 | (m_resize_corner == RIGHTTOP) ? frame().theme()->upperRightAngleCursor() : |