summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--src/fluxbox.cc16
2 files changed, 17 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7903cfc..fd1c184 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0rc3: 2Changes for 1.0rc3:
3*07/03/10:
4 * Fixed stealing focus from unmanaged windows (Mark)
5 fluxbox.cc
3*07/03/07: 6*07/03/07:
4 * Fixed a little bug with reverting focus after closing menu (Mark) 7 * Fixed a little bug with reverting focus after closing menu (Mark)
5 FbTk/Menu.cc 8 FbTk/Menu.cc
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index e4c68bf..2393837 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -1719,8 +1719,20 @@ void Fluxbox::timed_reconfigure() {
1719} 1719}
1720 1720
1721void Fluxbox::revert_focus() { 1721void Fluxbox::revert_focus() {
1722 if (m_revert_screen && !FocusControl::focusedWindow() && 1722 if (!m_revert_screen || FocusControl::focusedWindow() ||
1723 !FbTk::Menu::focused() && !m_showing_dialog) 1723 FbTk::Menu::focused() || m_showing_dialog)
1724 return;
1725
1726 Window win;
1727 int revert;
1728 Display *disp = display();
1729
1730 XGetInputFocus(disp, &win, &revert);
1731
1732 // we only want to revert focus if it's left dangling, as some other
1733 // application may have set the focus to an unmanaged window
1734 if (win == None || win == PointerRoot ||
1735 win == m_revert_screen->rootWindow().window())
1724 FocusControl::revertFocus(*m_revert_screen); 1736 FocusControl::revertFocus(*m_revert_screen);
1725} 1737}
1726 1738