all repos — fluxbox @ f9ed11a351108662e3ca761169eeb51b86a35076

custom fork of the fluxbox windowmanager

resize fullscreen windows when resolution changes
Mark Tiefenbruck mark@fluxbox.org
commit

f9ed11a351108662e3ca761169eeb51b86a35076

parent

f01e0c9c5a82439bd5158454e8ee7f9bc4032570

2 files changed, 13 insertions(+), 5 deletions(-)

jump to
M src/Window.ccsrc/Window.cc

@@ -1460,6 +1460,8 @@

moveToLayer(m_old_layernum); stateSig().notify(); } + + attachWorkAreaSig(); } void FluxboxWindow::setFullscreenLayer() {

@@ -1478,6 +1480,15 @@ stateSig().notify();

} +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 @@

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();
M src/Window.hhsrc/Window.hh

@@ -501,6 +501,7 @@

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);