resize fullscreen windows when resolution changes
This commit is contained in:
parent
f01e0c9c5a
commit
f9ed11a351
2 changed files with 13 additions and 5 deletions
|
@ -1460,6 +1460,8 @@ void FluxboxWindow::setFullscreen(bool flag) {
|
|||
moveToLayer(m_old_layernum);
|
||||
stateSig().notify();
|
||||
}
|
||||
|
||||
attachWorkAreaSig();
|
||||
}
|
||||
|
||||
void FluxboxWindow::setFullscreenLayer() {
|
||||
|
@ -1478,6 +1480,15 @@ void FluxboxWindow::setFullscreenLayer() {
|
|||
|
||||
}
|
||||
|
||||
void FluxboxWindow::attachWorkAreaSig() {
|
||||
// notify when struts change, so we can resize accordingly
|
||||
// Subject checks for duplicates for us
|
||||
if (m_state.maximized || m_state.fullscreen)
|
||||
screen().workspaceAreaSig().attach(this);
|
||||
else
|
||||
screen().workspaceAreaSig().detach(this);
|
||||
}
|
||||
|
||||
/**
|
||||
Maximize window both horizontal and vertical
|
||||
*/
|
||||
|
@ -1500,11 +1511,7 @@ void FluxboxWindow::setMaximizedState(int type) {
|
|||
m_state.maximized = type;
|
||||
frame().applyState();
|
||||
|
||||
// notify when struts change, so we can resize accordingly
|
||||
if (m_state.maximized)
|
||||
screen().workspaceAreaSig().attach(this);
|
||||
else
|
||||
screen().workspaceAreaSig().detach(this);
|
||||
attachWorkAreaSig();
|
||||
|
||||
// notify listeners that we changed state
|
||||
stateSig().notify();
|
||||
|
|
|
@ -501,6 +501,7 @@ private:
|
|||
void setState(unsigned long stateval, bool setting_up);
|
||||
/// set the layer of a fullscreen window
|
||||
void setFullscreenLayer();
|
||||
void attachWorkAreaSig();
|
||||
|
||||
// modifies left and top if snap is necessary
|
||||
void doSnapping(int &left, int &top);
|
||||
|
|
Loading…
Reference in a new issue