added little helper function to disable the maximization state of a window while keeping its current position / size
This commit is contained in:
parent
d2a7cc60a2
commit
a2f809f8f2
2 changed files with 17 additions and 5 deletions
|
@ -1509,6 +1509,18 @@ void FluxboxWindow::setMaximizedState(int type) {
|
||||||
stateSig().notify();
|
stateSig().notify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FluxboxWindow::disableMaximization() {
|
||||||
|
|
||||||
|
m_state.maximized = WindowState::MAX_NONE;
|
||||||
|
// TODO: could be optional, if the window gets back to original size /
|
||||||
|
// position after maximization is disabled
|
||||||
|
m_state.saveGeometry(frame().x(), frame().y(),
|
||||||
|
frame().width(), frame().height());
|
||||||
|
frame().applyState();
|
||||||
|
stateSig().notify();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maximize window horizontal
|
* Maximize window horizontal
|
||||||
*/
|
*/
|
||||||
|
@ -3079,12 +3091,8 @@ void FluxboxWindow::startResizing(int x, int y, ReferenceCorner dir) {
|
||||||
m_resize_corner = dir;
|
m_resize_corner = dir;
|
||||||
|
|
||||||
resizing = true;
|
resizing = true;
|
||||||
m_state.maximized = WindowState::MAX_NONE;
|
|
||||||
m_state.saveGeometry(frame().x(), frame().y(),
|
|
||||||
frame().width(), frame().height());
|
|
||||||
|
|
||||||
frame().applyState();
|
disableMaximization();
|
||||||
stateSig().notify();
|
|
||||||
|
|
||||||
const Cursor& cursor = (m_resize_corner == LEFTTOP) ? frame().theme()->upperLeftAngleCursor() :
|
const Cursor& cursor = (m_resize_corner == LEFTTOP) ? frame().theme()->upperLeftAngleCursor() :
|
||||||
(m_resize_corner == RIGHTTOP) ? frame().theme()->upperRightAngleCursor() :
|
(m_resize_corner == RIGHTTOP) ? frame().theme()->upperRightAngleCursor() :
|
||||||
|
|
|
@ -224,6 +224,10 @@ public:
|
||||||
void maximizeVertical();
|
void maximizeVertical();
|
||||||
/// maximizes the window fully
|
/// maximizes the window fully
|
||||||
void maximizeFull();
|
void maximizeFull();
|
||||||
|
|
||||||
|
/// disables maximization, without restoring the old size
|
||||||
|
void disableMaximization();
|
||||||
|
|
||||||
/// toggles shade
|
/// toggles shade
|
||||||
void shade();
|
void shade();
|
||||||
/// shades window
|
/// shades window
|
||||||
|
|
Loading…
Reference in a new issue