aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 5d50fcf..7e5a273 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -49,6 +49,7 @@
49#include "FbTk/KeyUtil.hh" 49#include "FbTk/KeyUtil.hh"
50#include "FbTk/SimpleCommand.hh" 50#include "FbTk/SimpleCommand.hh"
51#include "FbTk/Select2nd.hh" 51#include "FbTk/Select2nd.hh"
52#include "FbTk/MemFun.hh"
52 53
53#ifdef HAVE_CONFIG_H 54#ifdef HAVE_CONFIG_H
54#include "config.h" 55#include "config.h"
@@ -1450,8 +1451,10 @@ void FluxboxWindow::setFullscreen(bool flag) {
1450 frame().applyState(); 1451 frame().applyState();
1451 1452
1452 setFullscreenLayer(); // calls stateSig().notify() 1453 setFullscreenLayer(); // calls stateSig().notify()
1453 if (!isFocused()) 1454 if (!isFocused()) {
1454 screen().focusedWindowSig().attach(this); 1455 join(screen().focusedWindowSig(),
1456 FbTk::MemFun(*this, &FluxboxWindow::focusedWindowChanged));
1457 }
1455 1458
1456 } else if (!flag && isFullscreen()) { 1459 } else if (!flag && isFullscreen()) {
1457 1460
@@ -1769,12 +1772,14 @@ void FluxboxWindow::setFocusFlag(bool focus) {
1769 1772
1770 // if we're fullscreen and another window gains focus on the same head, 1773 // if we're fullscreen and another window gains focus on the same head,
1771 // then we need to let the user see it 1774 // then we need to let the user see it
1772 if (m_state.fullscreen && !focus) 1775 if (m_state.fullscreen && !focus) {
1773 screen().focusedWindowSig().attach(this); 1776 join(screen().focusedWindowSig(),
1777 FbTk::MemFun(*this, &FluxboxWindow::focusedWindowChanged));
1778 }
1774 1779
1775 if (m_state.fullscreen && focus) { 1780 if (m_state.fullscreen && focus) {
1776 moveToLayer(::Layer::ABOVE_DOCK); 1781 moveToLayer(::Layer::ABOVE_DOCK);
1777 screen().focusedWindowSig().detach(this); 1782 leave(screen().focusedWindowSig());
1778 } 1783 }
1779 1784
1780 if (focus != frame().focused()) 1785 if (focus != frame().focused())
@@ -2721,9 +2726,6 @@ void FluxboxWindow::update(FbTk::Subject *subj) {
2721 titleSig().notify(); 2726 titleSig().notify();
2722 } 2727 }
2723 2728
2724 } else if (subj == &screen().focusedWindowSig()) {
2725 if (FocusControl::focusedFbWindow())
2726 setFullscreenLayer();
2727 } else if (subj == &m_theme.reconfigSig()) { 2729 } else if (subj == &m_theme.reconfigSig()) {
2728 frame().applyDecorations(); 2730 frame().applyDecorations();
2729 sendConfigureNotify(); 2731 sendConfigureNotify();
@@ -3867,3 +3869,10 @@ void FluxboxWindow::setWindowType(WindowState::WindowType type) {
3867 * _NET_WM_WINDOW_TYPE_UTILITY 3869 * _NET_WM_WINDOW_TYPE_UTILITY
3868 */ 3870 */
3869} 3871}
3872
3873void FluxboxWindow::focusedWindowChanged(BScreen &screen,
3874 FluxboxWindow *focused_win, WinClient* client) {
3875 if (focused_win) {
3876 setFullscreenLayer();
3877 }
3878}