diff options
-rw-r--r-- | src/Window.cc | 17 | ||||
-rw-r--r-- | src/Window.hh | 1 |
2 files changed, 13 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 | ||
1465 | void FluxboxWindow::setFullscreenLayer() { | 1467 | void FluxboxWindow::setFullscreenLayer() { |
@@ -1478,6 +1480,15 @@ void FluxboxWindow::setFullscreenLayer() { | |||
1478 | 1480 | ||
1479 | } | 1481 | } |
1480 | 1482 | ||
1483 | void 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(); |
diff --git a/src/Window.hh b/src/Window.hh index 220cedb..8ee2b5c 100644 --- a/src/Window.hh +++ b/src/Window.hh | |||
@@ -501,6 +501,7 @@ private: | |||
501 | void setState(unsigned long stateval, bool setting_up); | 501 | void setState(unsigned long stateval, bool setting_up); |
502 | /// set the layer of a fullscreen window | 502 | /// set the layer of a fullscreen window |
503 | void setFullscreenLayer(); | 503 | void setFullscreenLayer(); |
504 | void attachWorkAreaSig(); | ||
504 | 505 | ||
505 | // modifies left and top if snap is necessary | 506 | // modifies left and top if snap is necessary |
506 | void doSnapping(int &left, int &top); | 507 | void doSnapping(int &left, int &top); |