don't revert focus away from command dialogs
This commit is contained in:
parent
887fea4510
commit
9229f8bc9c
4 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#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::show() {
|
|||
|
||||
void CommandDialog::hide() {
|
||||
FbTk::FbWindow::hide();
|
||||
Fluxbox::instance()->setShowingDialog(false);
|
||||
|
||||
// return focus to fluxbox window
|
||||
if (FocusControl::focusedFbWindow())
|
||||
|
|
|
@ -222,6 +222,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
|
|||
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::timed_reconfigure() {
|
|||
|
||||
void Fluxbox::revert_focus() {
|
||||
if (m_revert_screen && !FocusControl::focusedWindow() &&
|
||||
!FbTk::Menu::focused())
|
||||
!FbTk::Menu::focused() && !m_showing_dialog)
|
||||
FocusControl::revertFocus(*m_revert_screen);
|
||||
}
|
||||
|
||||
|
|
|
@ -186,6 +186,7 @@ public:
|
|||
|
||||
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 @@ private:
|
|||
///< 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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue