aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormarkt <markt>2006-07-25 21:54:58 (GMT)
committermarkt <markt>2006-07-25 21:54:58 (GMT)
commit9229f8bc9ceae2505d7715cdea6e75aeb1b2c78b (patch)
treeee9b35fae0e6d557244899fd674fa1ac37d85719 /src
parent887fea4510e5834197bb70101393fb640a66899a (diff)
downloadfluxbox-9229f8bc9ceae2505d7715cdea6e75aeb1b2c78b.zip
fluxbox-9229f8bc9ceae2505d7715cdea6e75aeb1b2c78b.tar.bz2
don't revert focus away from command dialogs
Diffstat (limited to 'src')
-rw-r--r--src/CommandDialog.cc3
-rw-r--r--src/fluxbox.cc3
-rw-r--r--src/fluxbox.hh2
3 files changed, 7 insertions, 1 deletions
diff --git a/src/CommandDialog.cc b/src/CommandDialog.cc
index f28d789..3fab06b 100644
--- a/src/CommandDialog.cc
+++ b/src/CommandDialog.cc
@@ -29,6 +29,7 @@
29#include "WinClient.hh" 29#include "WinClient.hh"
30#include "CommandParser.hh" 30#include "CommandParser.hh"
31#include "FocusControl.hh" 31#include "FocusControl.hh"
32#include "fluxbox.hh"
32 33
33#include "FbTk/ImageControl.hh" 34#include "FbTk/ImageControl.hh"
34#include "FbTk/EventManager.hh" 35#include "FbTk/EventManager.hh"
@@ -74,6 +75,7 @@ void CommandDialog::show() {
74 FbTk::FbWindow::show(); 75 FbTk::FbWindow::show();
75 m_textbox.setInputFocus(); 76 m_textbox.setInputFocus();
76 m_label.clear(); 77 m_label.clear();
78 Fluxbox::instance()->setShowingDialog(true);
77 // resize to correct width, which should be the width of label text 79 // resize to correct width, which should be the width of label text
78 // no need to truncate label text in this dialog 80 // no need to truncate label text in this dialog
79 // but if label text size < 200 we set 200 81 // but if label text size < 200 we set 200
@@ -88,6 +90,7 @@ void CommandDialog::show() {
88 90
89void CommandDialog::hide() { 91void CommandDialog::hide() {
90 FbTk::FbWindow::hide(); 92 FbTk::FbWindow::hide();
93 Fluxbox::instance()->setShowingDialog(false);
91 94
92 // return focus to fluxbox window 95 // return focus to fluxbox window
93 if (FocusControl::focusedFbWindow()) 96 if (FocusControl::focusedFbWindow())
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 2cb599b..59859ad 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -222,6 +222,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
222 m_rc_file(rcfilename ? rcfilename : ""), 222 m_rc_file(rcfilename ? rcfilename : ""),
223 m_argv(argv), m_argc(argc), 223 m_argv(argv), m_argc(argc),
224 m_revert_screen(0), 224 m_revert_screen(0),
225 m_showing_dialog(false),
225 m_starting(true), 226 m_starting(true),
226 m_restarting(false), 227 m_restarting(false),
227 m_shutdown(false), 228 m_shutdown(false),
@@ -1786,7 +1787,7 @@ void Fluxbox::timed_reconfigure() {
1786 1787
1787void Fluxbox::revert_focus() { 1788void Fluxbox::revert_focus() {
1788 if (m_revert_screen && !FocusControl::focusedWindow() && 1789 if (m_revert_screen && !FocusControl::focusedWindow() &&
1789 !FbTk::Menu::focused()) 1790 !FbTk::Menu::focused() && !m_showing_dialog)
1790 FocusControl::revertFocus(*m_revert_screen); 1791 FocusControl::revertFocus(*m_revert_screen);
1791} 1792}
1792 1793
diff --git a/src/fluxbox.hh b/src/fluxbox.hh
index e7bc18d..9855637 100644
--- a/src/fluxbox.hh
+++ b/src/fluxbox.hh
@@ -186,6 +186,7 @@ public:
186 186
187 void timed_reconfigure(); 187 void timed_reconfigure();
188 void revert_focus(); 188 void revert_focus();
189 void setShowingDialog(bool value) { m_showing_dialog = value; }
189 190
190 bool isStartup() const { return m_starting; } 191 bool isStartup() const { return m_starting; }
191 bool isRestarting() const { return m_restarting; } 192 bool isRestarting() const { return m_restarting; }
@@ -293,6 +294,7 @@ private:
293 ///< when we execute reconfig command we must wait until next event round 294 ///< when we execute reconfig command we must wait until next event round
294 FbTk::Timer m_reconfig_timer, m_revert_timer; 295 FbTk::Timer m_reconfig_timer, m_revert_timer;
295 BScreen *m_revert_screen; 296 BScreen *m_revert_screen;
297 bool m_showing_dialog;
296 298
297 std::auto_ptr<Keys> m_key; 299 std::auto_ptr<Keys> m_key;
298 300