diff options
author | Thomas Lübking <thomas.luebking@gmail.com> | 2016-06-26 19:57:49 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2016-07-01 17:40:34 (GMT) |
commit | 475e966f192be938c84e8b3492c392671b276985 (patch) | |
tree | e74b4cef91ec1f48ac8b1c633f09ab041f114d95 /src | |
parent | 6907dc2c23c4baea051061264a2954042cd187d9 (diff) | |
download | fluxbox-475e966f192be938c84e8b3492c392671b276985.zip fluxbox-475e966f192be938c84e8b3492c392671b276985.tar.bz2 |
fix tab selection by mousepress
Tabs outside the titlebar are not selectable by mouseclicks (ie. the
feature does not work)
The patch clones the enterNotifyEvent code and ignores (for now) the
actual button (no idea whether it makes any sense to restrict it the
left button?)
BUG: 1103
Diffstat (limited to 'src')
-rw-r--r-- | src/Window.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Window.cc b/src/Window.cc index 37fb6c4..a053f1a 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -2381,6 +2381,14 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) { | |||
2381 | return; | 2381 | return; |
2382 | } | 2382 | } |
2383 | 2383 | ||
2384 | WinClient *client = 0; | ||
2385 | if (!screen().focusControl().isMouseTabFocus()) { | ||
2386 | // determine if we're in a label button (tab) | ||
2387 | client = winClientOfLabelButtonWindow(be.window); | ||
2388 | } | ||
2389 | |||
2390 | |||
2391 | |||
2384 | // if nothing was bound via keys-file then | 2392 | // if nothing was bound via keys-file then |
2385 | // - raise() if clickRaise is enabled | 2393 | // - raise() if clickRaise is enabled |
2386 | // - hide open menues | 2394 | // - hide open menues |
@@ -2399,6 +2407,14 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) { | |||
2399 | if (!m_focused && acceptsFocus() && m_click_focus) | 2407 | if (!m_focused && acceptsFocus() && m_click_focus) |
2400 | focus(); | 2408 | focus(); |
2401 | 2409 | ||
2410 | if (!screen().focusControl().isMouseTabFocus() && | ||
2411 | client && client != m_client && | ||
2412 | !screen().focusControl().isIgnored(be.x_root, be.y_root) ) { | ||
2413 | setCurrentClient(*client, isFocused()); | ||
2414 | } | ||
2415 | |||
2416 | |||
2417 | |||
2402 | } | 2418 | } |
2403 | 2419 | ||
2404 | void FluxboxWindow::buttonReleaseEvent(XButtonEvent &re) { | 2420 | void FluxboxWindow::buttonReleaseEvent(XButtonEvent &re) { |