diff options
Diffstat (limited to 'src/FocusControl.cc')
-rw-r--r-- | src/FocusControl.cc | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/src/FocusControl.cc b/src/FocusControl.cc index 317b73a..27d8ce9 100644 --- a/src/FocusControl.cc +++ b/src/FocusControl.cc | |||
@@ -511,12 +511,12 @@ void FocusControl::revertFocus(BScreen &screen) { | |||
511 | FbTk::Menu::shownMenu()->grabInputFocus(); | 511 | FbTk::Menu::shownMenu()->grabInputFocus(); |
512 | else { | 512 | else { |
513 | switch (screen.focusControl().focusModel()) { | 513 | switch (screen.focusControl().focusModel()) { |
514 | case FocusControl::MOUSEFOCUS: | 514 | case MOUSEFOCUS: |
515 | case FocusControl::STRICTMOUSEFOCUS: | 515 | case STRICTMOUSEFOCUS: |
516 | XSetInputFocus(screen.rootWindow().display(), | 516 | XSetInputFocus(screen.rootWindow().display(), |
517 | PointerRoot, None, CurrentTime); | 517 | PointerRoot, None, CurrentTime); |
518 | break; | 518 | break; |
519 | case FocusControl::CLICKFOCUS: | 519 | case CLICKFOCUS: |
520 | screen.rootWindow().setInputFocus(RevertToPointerRoot, | 520 | screen.rootWindow().setInputFocus(RevertToPointerRoot, |
521 | CurrentTime); | 521 | CurrentTime); |
522 | break; | 522 | break; |
@@ -608,24 +608,3 @@ void FocusControl::setFocusedWindow(WinClient *client) { | |||
608 | if (old_screen && screen != old_screen) | 608 | if (old_screen && screen != old_screen) |
609 | old_screen->focusedWindowSig().emit(*old_screen, s_focused_fbwindow, s_focused_window); | 609 | old_screen->focusedWindowSig().emit(*old_screen, s_focused_fbwindow, s_focused_window); |
610 | } | 610 | } |
611 | |||
612 | ////////////////////// FocusControl RESOURCES | ||
613 | namespace FbTk { | ||
614 | |||
615 | template<> | ||
616 | const EnumTraits<FocusControl::FocusModel>::Pair EnumTraits<FocusControl::FocusModel>::s_map[] = { | ||
617 | { "MouseFocus", FocusControl::MOUSEFOCUS }, | ||
618 | { "StrictMouseFocus", FocusControl::STRICTMOUSEFOCUS }, | ||
619 | { "ClickFocus", FocusControl::CLICKFOCUS }, | ||
620 | { NULL, FocusControl::CLICKFOCUS } | ||
621 | }; | ||
622 | |||
623 | template<> | ||
624 | const EnumTraits<FocusControl::TabFocusModel>::Pair EnumTraits<FocusControl::TabFocusModel>::s_map[] = { | ||
625 | { "SloppyTabFocus", FocusControl::MOUSETABFOCUS }, | ||
626 | { "ClickToTabFocus", FocusControl::CLICKTABFOCUS }, | ||
627 | { NULL, FocusControl::CLICKTABFOCUS } | ||
628 | }; | ||
629 | |||
630 | } // end namespace FbTk | ||
631 | |||