diff options
author | Jim Ramsay <jim.ramsay@motorola.com> | 2010-05-28 17:22:13 (GMT) |
---|---|---|
committer | Jim Ramsay <jim.ramsay@motorola.com> | 2010-05-28 19:10:28 (GMT) |
commit | cdbaf5c04d07e8310c661e12e354724a619e5911 (patch) | |
tree | 5e39e64b2caa4ff79cce2749ba1331574b06673b /src/FocusControl.cc | |
parent | 769130f51a8f670ba46dac50d7602f6b936c9dc1 (diff) | |
download | fluxbox_pavel-cdbaf5c04d07e8310c661e12e354724a619e5911.zip fluxbox_pavel-cdbaf5c04d07e8310c661e12e354724a619e5911.tar.bz2 |
Add new focus model: StrictMouseFocus
This is not actually implemented yet, but from now on, "MouseFocus" means:
Focus follows mouse only when you are moving the mouse, any EnterNotify events
caused by non-mouse operations (window closing, keycommands, changing
desktops) will *not* shift focus
And once fully-implemented, "StrictMouseFocus" will mean:
Focus follows mouse on every EnterNotify event (except when the "ClientMenu"
closes or during alt+tab window cycling)
Diffstat (limited to 'src/FocusControl.cc')
-rw-r--r-- | src/FocusControl.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/FocusControl.cc b/src/FocusControl.cc index 3ba9dc6..eeacc3b 100644 --- a/src/FocusControl.cc +++ b/src/FocusControl.cc | |||
@@ -489,6 +489,7 @@ void FocusControl::revertFocus(BScreen &screen) { | |||
489 | else { | 489 | else { |
490 | switch (screen.focusControl().focusModel()) { | 490 | switch (screen.focusControl().focusModel()) { |
491 | case FocusControl::MOUSEFOCUS: | 491 | case FocusControl::MOUSEFOCUS: |
492 | case FocusControl::STRICTMOUSEFOCUS: | ||
492 | XSetInputFocus(screen.rootWindow().display(), | 493 | XSetInputFocus(screen.rootWindow().display(), |
493 | PointerRoot, None, CurrentTime); | 494 | PointerRoot, None, CurrentTime); |
494 | break; | 495 | break; |
@@ -593,6 +594,8 @@ std::string FbTk::Resource<FocusControl::FocusModel>::getString() const { | |||
593 | switch (m_value) { | 594 | switch (m_value) { |
594 | case FocusControl::MOUSEFOCUS: | 595 | case FocusControl::MOUSEFOCUS: |
595 | return string("MouseFocus"); | 596 | return string("MouseFocus"); |
597 | case FocusControl::STRICTMOUSEFOCUS: | ||
598 | return string("StrictMouseFocus"); | ||
596 | case FocusControl::CLICKFOCUS: | 599 | case FocusControl::CLICKFOCUS: |
597 | return string("ClickFocus"); | 600 | return string("ClickFocus"); |
598 | } | 601 | } |
@@ -605,6 +608,8 @@ void FbTk::Resource<FocusControl::FocusModel>:: | |||
605 | setFromString(char const *strval) { | 608 | setFromString(char const *strval) { |
606 | if (strcasecmp(strval, "MouseFocus") == 0) | 609 | if (strcasecmp(strval, "MouseFocus") == 0) |
607 | m_value = FocusControl::MOUSEFOCUS; | 610 | m_value = FocusControl::MOUSEFOCUS; |
611 | else if (strcasecmp(strval, "StrictMouseFocus") == 0) | ||
612 | m_value = FocusControl::STRICTMOUSEFOCUS; | ||
608 | else if (strcasecmp(strval, "ClickToFocus") == 0) | 613 | else if (strcasecmp(strval, "ClickToFocus") == 0) |
609 | m_value = FocusControl::CLICKFOCUS; | 614 | m_value = FocusControl::CLICKFOCUS; |
610 | else | 615 | else |