make sure we don't steal focus from unmanaged windows
This commit is contained in:
parent
61cf82771a
commit
8bda89394b
2 changed files with 17 additions and 2 deletions
|
@ -1,5 +1,8 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 1.0rc3:
|
||||
*07/03/10:
|
||||
* Fixed stealing focus from unmanaged windows (Mark)
|
||||
fluxbox.cc
|
||||
*07/03/07:
|
||||
* Fixed a little bug with reverting focus after closing menu (Mark)
|
||||
FbTk/Menu.cc
|
||||
|
|
|
@ -1719,8 +1719,20 @@ void Fluxbox::timed_reconfigure() {
|
|||
}
|
||||
|
||||
void Fluxbox::revert_focus() {
|
||||
if (m_revert_screen && !FocusControl::focusedWindow() &&
|
||||
!FbTk::Menu::focused() && !m_showing_dialog)
|
||||
if (!m_revert_screen || FocusControl::focusedWindow() ||
|
||||
FbTk::Menu::focused() || m_showing_dialog)
|
||||
return;
|
||||
|
||||
Window win;
|
||||
int revert;
|
||||
Display *disp = display();
|
||||
|
||||
XGetInputFocus(disp, &win, &revert);
|
||||
|
||||
// we only want to revert focus if it's left dangling, as some other
|
||||
// application may have set the focus to an unmanaged window
|
||||
if (win == None || win == PointerRoot ||
|
||||
win == m_revert_screen->rootWindow().window())
|
||||
FocusControl::revertFocus(*m_revert_screen);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue