diff --git a/src/Window.cc b/src/Window.cc index 37fb6c42..a053f1af 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -2381,6 +2381,14 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) { return; } + WinClient *client = 0; + if (!screen().focusControl().isMouseTabFocus()) { + // determine if we're in a label button (tab) + client = winClientOfLabelButtonWindow(be.window); + } + + + // if nothing was bound via keys-file then // - raise() if clickRaise is enabled // - hide open menues @@ -2399,6 +2407,14 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) { if (!m_focused && acceptsFocus() && m_click_focus) focus(); + if (!screen().focusControl().isMouseTabFocus() && + client && client != m_client && + !screen().focusControl().isIgnored(be.x_root, be.y_root) ) { + setCurrentClient(*client, isFocused()); + } + + + } void FluxboxWindow::buttonReleaseEvent(XButtonEvent &re) {