summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Window.cc19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/Window.cc b/src/Window.cc
index d84a06d..3bf7731 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.cc,v 1.215 2003/07/28 16:29:25 rathnor Exp $ 25// $Id: Window.cc,v 1.216 2003/08/11 17:04:32 fluxgen Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -251,12 +251,12 @@ FluxboxWindow::FluxboxWindow(WinClient &client, BScreen &scr, FbWinFrameTheme &t
251 m_layersig(*this), 251 m_layersig(*this),
252 m_workspacesig(*this), 252 m_workspacesig(*this),
253 m_diesig(*this), 253 m_diesig(*this),
254 m_focussig(*this),
254 moving(false), resizing(false), shaded(false), 255 moving(false), resizing(false), shaded(false),
255 iconic(false), focused(false), 256 iconic(false), focused(false),
256 stuck(false), m_managed(false), 257 stuck(false), m_managed(false),
257 maximized(MAX_NONE), 258 maximized(MAX_NONE),
258 m_screen(scr), 259 m_screen(scr),
259 m_timer(this),
260 display(0), 260 display(0),
261 m_windowmenu(*scr.menuTheme(), scr.screenNumber(), scr.imageControl()), 261 m_windowmenu(*scr.menuTheme(), scr.screenNumber(), scr.imageControl()),
262 m_old_decoration(DECOR_NORMAL), 262 m_old_decoration(DECOR_NORMAL),
@@ -439,6 +439,8 @@ void FluxboxWindow::init() {
439 m_client->x = wattrib.x; m_client->y = wattrib.y; 439 m_client->x = wattrib.x; m_client->y = wattrib.y;
440 440
441 m_timer.setTimeout(fluxbox.getAutoRaiseDelay()); 441 m_timer.setTimeout(fluxbox.getAutoRaiseDelay());
442 FbTk::RefCount<FbTk::Command> raise_cmd(new FbTk::SimpleCommand<FluxboxWindow>(*this, &FluxboxWindow::raise));
443 m_timer.setCommand(raise_cmd);
442 m_timer.fireOnce(true); 444 m_timer.fireOnce(true);
443 445
444 if (m_client->initial_state == WithdrawnState) { 446 if (m_client->initial_state == WithdrawnState) {
@@ -1643,6 +1645,7 @@ void FluxboxWindow::moveToLayer(int layernum) {
1643// window has actually RECEIVED focus (got a FocusIn event) 1645// window has actually RECEIVED focus (got a FocusIn event)
1644// so now we make it a focused frame etc 1646// so now we make it a focused frame etc
1645void FluxboxWindow::setFocusFlag(bool focus) { 1647void FluxboxWindow::setFocusFlag(bool focus) {
1648 bool was_focused = isFocused();
1646 focused = focus; 1649 focused = focus;
1647 1650
1648 // Record focus timestamp for window cycling enhancements 1651 // Record focus timestamp for window cycling enhancements
@@ -1655,11 +1658,16 @@ void FluxboxWindow::setFocusFlag(bool focus) {
1655 frame().setFocus(focus); 1658 frame().setFocus(focus);
1656 1659
1657 if ((screen().isSloppyFocus() || screen().isSemiSloppyFocus()) 1660 if ((screen().isSloppyFocus() || screen().isSemiSloppyFocus())
1658 && screen().doAutoRaise()) 1661 && screen().doAutoRaise()) {
1659 if (focused) 1662 if (focused)
1660 m_timer.start(); 1663 m_timer.start();
1661 else 1664 else
1662 m_timer.stop(); 1665 m_timer.stop();
1666 }
1667
1668 // did focus change? notify listeners
1669 if (was_focused != focus)
1670 m_focussig.notify();
1663} 1671}
1664 1672
1665 1673
@@ -2203,6 +2211,7 @@ void FluxboxWindow::propertyNotifyEvent(Atom atom) {
2203 2211
2204 case XA_WM_HINTS: 2212 case XA_WM_HINTS:
2205 m_client->updateWMHints(); 2213 m_client->updateWMHints();
2214 hintSig().notify(); // notify listeners
2206 break; 2215 break;
2207 2216
2208 case XA_WM_ICON_NAME: 2217 case XA_WM_ICON_NAME:
@@ -3111,10 +3120,6 @@ void FluxboxWindow::restore(bool remap) {
3111 } 3120 }
3112} 3121}
3113 3122
3114void FluxboxWindow::timeout() {
3115 raise();
3116}
3117
3118bool FluxboxWindow::isVisible() const { 3123bool FluxboxWindow::isVisible() const {
3119 return frame().isVisible(); 3124 return frame().isVisible();
3120} 3125}