don't revert focus away from command dialogs
markt markt
4 files changed,
9 insertions(+),
1 deletions(-)
M
ChangeLog
→
ChangeLog
@@ -1,6 +1,8 @@
(Format: Year/Month/Day) Changes for 1.0rc3: *06/07/25: + * Fix so that focus doesn't revert away from command dialogs (Mark) + fluxbox.cc/hh CommandDialog.cc * Fix background style item so that it works when the previous style didn't have one set (Mark) Screen.cc RootTheme.hh
M
src/CommandDialog.cc
→
src/CommandDialog.cc
@@ -29,6 +29,7 @@ #include "FbWinFrameTheme.hh"
#include "WinClient.hh" #include "CommandParser.hh" #include "FocusControl.hh" +#include "fluxbox.hh" #include "FbTk/ImageControl.hh" #include "FbTk/EventManager.hh"@@ -74,6 +75,7 @@ void CommandDialog::show() {
FbTk::FbWindow::show(); m_textbox.setInputFocus(); m_label.clear(); + Fluxbox::instance()->setShowingDialog(true); // resize to correct width, which should be the width of label text // no need to truncate label text in this dialog // but if label text size < 200 we set 200@@ -88,6 +90,7 @@ }
void CommandDialog::hide() { FbTk::FbWindow::hide(); + Fluxbox::instance()->setShowingDialog(false); // return focus to fluxbox window if (FocusControl::focusedFbWindow())
M
src/fluxbox.cc
→
src/fluxbox.cc
@@ -222,6 +222,7 @@ m_masked(0),
m_rc_file(rcfilename ? rcfilename : ""), m_argv(argv), m_argc(argc), m_revert_screen(0), + m_showing_dialog(false), m_starting(true), m_restarting(false), m_shutdown(false),@@ -1786,7 +1787,7 @@ }
void Fluxbox::revert_focus() { if (m_revert_screen && !FocusControl::focusedWindow() && - !FbTk::Menu::focused()) + !FbTk::Menu::focused() && !m_showing_dialog) FocusControl::revertFocus(*m_revert_screen); }
M
src/fluxbox.hh
→
src/fluxbox.hh
@@ -186,6 +186,7 @@ void attachSignals(WinClient &winclient);
void timed_reconfigure(); void revert_focus(); + void setShowingDialog(bool value) { m_showing_dialog = value; } bool isStartup() const { return m_starting; } bool isRestarting() const { return m_restarting; }@@ -293,6 +294,7 @@
///< when we execute reconfig command we must wait until next event round FbTk::Timer m_reconfig_timer, m_revert_timer; BScreen *m_revert_screen; + bool m_showing_dialog; std::auto_ptr<Keys> m_key;