revert focus when closing dialogs
This commit is contained in:
parent
38654bae45
commit
72fd5e03a4
4 changed files with 10 additions and 9 deletions
|
@ -130,7 +130,6 @@ void CommandDialog::keyPressEvent(XKeyEvent &event) {
|
|||
XLookupString(&event, &keychar, 1, &ks, 0);
|
||||
|
||||
if (ks == XK_Return) {
|
||||
hide(); // hide and return focus to a FluxboxWindow
|
||||
// create Command<void> from line
|
||||
auto_ptr<FbTk::Command<void> > cmd(FbTk::CommandParser<void>::instance().parse(m_precommand + m_textbox.text()));
|
||||
if (cmd.get())
|
||||
|
|
|
@ -67,10 +67,10 @@ bool TextButton::setOrientation(FbTk::Orientation orient) {
|
|||
return false;
|
||||
invalidateBackground();
|
||||
|
||||
if ((m_orientation == FbTk::ROT0 || m_orientation == FbTk::ROT180) &&
|
||||
(orient == FbTk::ROT90 || orient == FbTk::ROT270) ||
|
||||
(m_orientation == FbTk::ROT90 || m_orientation == FbTk::ROT270) &&
|
||||
(orient == FbTk::ROT0 || orient == FbTk::ROT180)) {
|
||||
if (((m_orientation == FbTk::ROT0 || m_orientation == FbTk::ROT180) &&
|
||||
(orient == FbTk::ROT90 || orient == FbTk::ROT270)) ||
|
||||
((m_orientation == FbTk::ROT90 || m_orientation == FbTk::ROT270) &&
|
||||
(orient == FbTk::ROT0 || orient == FbTk::ROT180))) {
|
||||
// flip width and height
|
||||
m_orientation = orient;
|
||||
resize(height(), width());
|
||||
|
|
|
@ -403,9 +403,9 @@ bool Keys::addBinding(const string &linebuffer) {
|
|||
// +[1-9] - number between +1 and +9
|
||||
// numbers 10 and above
|
||||
//
|
||||
} else if (!val[argc].empty() && (isdigit(val[argc][0]) &&
|
||||
(isdigit(val[argc][1]) || val[argc][1] == 'x') ||
|
||||
val[argc][0] == '+' && isdigit(val[argc][1])) ) {
|
||||
} else if (!val[argc].empty() && ((isdigit(val[argc][0]) &&
|
||||
(isdigit(val[argc][1]) || val[argc][1] == 'x')) ||
|
||||
(val[argc][0] == '+' && isdigit(val[argc][1])))) {
|
||||
|
||||
key = strtoul(val[argc].c_str(), NULL, 0);
|
||||
type = KeyPress;
|
||||
|
|
|
@ -160,7 +160,9 @@ public:
|
|||
|
||||
void timed_reconfigure();
|
||||
void revertFocus();
|
||||
void setShowingDialog(bool value) { m_showing_dialog = value; }
|
||||
void setShowingDialog(bool value) {
|
||||
m_showing_dialog = value; if (!value) revertFocus();
|
||||
}
|
||||
|
||||
bool isStartup() const { return m_starting; }
|
||||
bool isRestarting() const { return m_restarting; }
|
||||
|
|
Loading…
Reference in a new issue