aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 71f597e..88690ce 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1070,7 +1070,7 @@ bool FluxboxWindow::setCurrentClient(WinClient &client, bool setinput) {
1070 if (setinput && setInputFocus()) { 1070 if (setinput && setInputFocus()) {
1071 return true; 1071 return true;
1072 } 1072 }
1073 1073
1074 return false; 1074 return false;
1075} 1075}
1076 1076
@@ -2033,7 +2033,7 @@ void FluxboxWindow::setFocusFlag(bool focus) {
2033 if (focus != frame().focused()) 2033 if (focus != frame().focused())
2034 frame().setFocus(focus); 2034 frame().setFocus(focus);
2035 2035
2036 if ((screen().isSloppyFocus() || screen().isSemiSloppyFocus()) 2036 if ((screen().isMouseFocus())
2037 && screen().doAutoRaise()) { 2037 && screen().doAutoRaise()) {
2038 if (focused) 2038 if (focused)
2039 m_timer.start(); 2039 m_timer.start();
@@ -2637,7 +2637,7 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) {
2637 frame().buttonPressEvent(be); 2637 frame().buttonPressEvent(be);
2638 2638
2639 if (be.button == 1 || (be.button == 3 && be.state == Mod1Mask)) { 2639 if (be.button == 1 || (be.button == 3 && be.state == Mod1Mask)) {
2640 if ((! focused) && (! screen().isSloppyFocus())) { //check focus 2640 if ((! focused) && (! screen().isMouseFocus())) { //check focus
2641 setInputFocus(); 2641 setInputFocus();
2642 } 2642 }
2643 2643
@@ -2916,8 +2916,7 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) {
2916 } 2916 }
2917 2917
2918 WinClient *client = 0; 2918 WinClient *client = 0;
2919 // don't waste our time scanning if we aren't real sloppy focus 2919 if (screen().isMouseTabFocus()) {
2920 if (screen().isSloppyFocus()) {
2921 // determine if we're in a label button (tab) 2920 // determine if we're in a label button (tab)
2922 Client2ButtonMap::iterator it = 2921 Client2ButtonMap::iterator it =
2923 find_if(m_labelbuttons.begin(), 2922 find_if(m_labelbuttons.begin(),
@@ -2929,13 +2928,12 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) {
2929 client = (*it).first; 2928 client = (*it).first;
2930 2929
2931 } 2930 }
2931
2932 if (ev.window == frame().window() || 2932 if (ev.window == frame().window() ||
2933 ev.window == m_client->window() || 2933 ev.window == m_client->window() ||
2934 client) { 2934 client) {
2935 if ((screen().isSloppyFocus() || screen().isSemiSloppyFocus()) 2935
2936 && !isFocused() || 2936 if (screen().isMouseFocus() && !isFocused()) {
2937 // or, we are focused, but it isn't the one we want
2938 client && screen().isSloppyFocus() && (m_client != client)) {
2939 2937
2940 // check that there aren't any subsequent leave notify events in the 2938 // check that there aren't any subsequent leave notify events in the
2941 // X event queue 2939 // X event queue
@@ -2945,16 +2943,16 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) {
2945 sa.enter = sa.leave = False; 2943 sa.enter = sa.leave = False;
2946 XCheckIfEvent(display, &dummy, queueScanner, (char *) &sa); 2944 XCheckIfEvent(display, &dummy, queueScanner, (char *) &sa);
2947 2945
2948 // if client is set, use setCurrent client, otherwise just setInputFocus
2949 if ((!sa.leave || sa.inferior)) { 2946 if ((!sa.leave || sa.inferior)) {
2950 if (client) 2947 setInputFocus();
2951 setCurrentClient(*client, true);
2952 else
2953 setInputFocus();
2954 } 2948 }
2955
2956 } 2949 }
2957 } 2950 }
2951
2952 if (screen().isMouseTabFocus() && client && client != m_client) {
2953 setCurrentClient(*client, isFocused());
2954 }
2955
2958} 2956}
2959 2957
2960void FluxboxWindow::leaveNotifyEvent(XCrossingEvent &ev) { 2958void FluxboxWindow::leaveNotifyEvent(XCrossingEvent &ev) {