summaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 3b9534b..16334c6 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1460,6 +1460,8 @@ void FluxboxWindow::setFullscreen(bool flag) {
1460 moveToLayer(m_old_layernum); 1460 moveToLayer(m_old_layernum);
1461 stateSig().notify(); 1461 stateSig().notify();
1462 } 1462 }
1463
1464 attachWorkAreaSig();
1463} 1465}
1464 1466
1465void FluxboxWindow::setFullscreenLayer() { 1467void FluxboxWindow::setFullscreenLayer() {
@@ -1478,6 +1480,15 @@ void FluxboxWindow::setFullscreenLayer() {
1478 1480
1479} 1481}
1480 1482
1483void FluxboxWindow::attachWorkAreaSig() {
1484 // notify when struts change, so we can resize accordingly
1485 // Subject checks for duplicates for us
1486 if (m_state.maximized || m_state.fullscreen)
1487 screen().workspaceAreaSig().attach(this);
1488 else
1489 screen().workspaceAreaSig().detach(this);
1490}
1491
1481/** 1492/**
1482 Maximize window both horizontal and vertical 1493 Maximize window both horizontal and vertical
1483*/ 1494*/
@@ -1500,11 +1511,7 @@ void FluxboxWindow::setMaximizedState(int type) {
1500 m_state.maximized = type; 1511 m_state.maximized = type;
1501 frame().applyState(); 1512 frame().applyState();
1502 1513
1503 // notify when struts change, so we can resize accordingly 1514 attachWorkAreaSig();
1504 if (m_state.maximized)
1505 screen().workspaceAreaSig().attach(this);
1506 else
1507 screen().workspaceAreaSig().detach(this);
1508 1515
1509 // notify listeners that we changed state 1516 // notify listeners that we changed state
1510 stateSig().notify(); 1517 stateSig().notify();