diff options
author | markt <markt> | 2007-01-21 18:43:22 (GMT) |
---|---|---|
committer | markt <markt> | 2007-01-21 18:43:22 (GMT) |
commit | feb56381d704d61255ca5b0f0ae60e3f4f5f9986 (patch) | |
tree | a0f7e1279e1c29b58af5a9eb9368c3e1c4f63202 /src/FocusControl.cc | |
parent | 5503545d8f3228dee6db0c7a1d9de18c77a92ca4 (diff) | |
download | fluxbox-feb56381d704d61255ca5b0f0ae60e3f4f5f9986.zip fluxbox-feb56381d704d61255ca5b0f0ae60e3f4f5f9986.tar.bz2 |
various changes to menu behavior
Diffstat (limited to 'src/FocusControl.cc')
-rw-r--r-- | src/FocusControl.cc | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/FocusControl.cc b/src/FocusControl.cc index 9c82e3e..61d6e87 100644 --- a/src/FocusControl.cc +++ b/src/FocusControl.cc | |||
@@ -405,14 +405,20 @@ void FocusControl::revertFocus(BScreen &screen) { | |||
405 | // if setting focus fails, or isn't possible, fallback correctly | 405 | // if setting focus fails, or isn't possible, fallback correctly |
406 | if (!(next_focus && next_focus->focus())) { | 406 | if (!(next_focus && next_focus->focus())) { |
407 | setFocusedWindow(0); // so we don't get dangling m_focused_window pointer | 407 | setFocusedWindow(0); // so we don't get dangling m_focused_window pointer |
408 | switch (screen.focusControl().focusModel()) { | 408 | // if there's a menu open, focus it |
409 | case FocusControl::MOUSEFOCUS: | 409 | if (FbTk::Menu::shownMenu()) |
410 | XSetInputFocus(screen.rootWindow().display(), | 410 | FbTk::Menu::shownMenu()->grabInputFocus(); |
411 | PointerRoot, None, CurrentTime); | 411 | else { |
412 | break; | 412 | switch (screen.focusControl().focusModel()) { |
413 | case FocusControl::CLICKFOCUS: | 413 | case FocusControl::MOUSEFOCUS: |
414 | screen.rootWindow().setInputFocus(RevertToPointerRoot, CurrentTime); | 414 | XSetInputFocus(screen.rootWindow().display(), |
415 | break; | 415 | PointerRoot, None, CurrentTime); |
416 | break; | ||
417 | case FocusControl::CLICKFOCUS: | ||
418 | screen.rootWindow().setInputFocus(RevertToPointerRoot, | ||
419 | CurrentTime); | ||
420 | break; | ||
421 | } | ||
416 | } | 422 | } |
417 | } | 423 | } |
418 | 424 | ||