diff options
author | Thomas Lübking <thomas.luebking@gmail.com> | 2016-07-15 14:19:42 (GMT) |
---|---|---|
committer | Thomas Lübking <thomas.luebking@gmail.com> | 2016-08-27 07:34:01 (GMT) |
commit | 08ea27de38a28cc2e9f5eab3bed094fc53d48952 (patch) | |
tree | cc27127edf8dd5867fc864825edae870130f34d1 /src/Window.cc | |
parent | a1d3065994daba4bb0d1b437981afff358377bd4 (diff) | |
download | fluxbox-08ea27de38a28cc2e9f5eab3bed094fc53d48952.zip fluxbox-08ea27de38a28cc2e9f5eab3bed094fc53d48952.tar.bz2 |
Control OnTitlebar ./. OnWindow
On concurrent shortcuts OnTitlebar implies OnWindow and was so
far resolved to OnWindow while OnTitlebar is the more precise
condition.
This also requires to exclude buttons from the titlebar context,
ie. pass the position to the getContext function on press events
BUG: 1035
The patch depends on the patch to correctly resolve the tab under the
mouse since we're now passing the actual subwindows around
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/Window.cc b/src/Window.cc index f1bf1e9..a4f6341 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -2402,9 +2402,13 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) { | |||
2402 | m_last_pressed_button = be.button; | 2402 | m_last_pressed_button = be.button; |
2403 | 2403 | ||
2404 | Keys *k = Fluxbox::instance()->keys(); | 2404 | Keys *k = Fluxbox::instance()->keys(); |
2405 | int context = frame().getContext(be.window); | 2405 | int context = 0; |
2406 | if (k->doAction(be.type, be.state, be.button, | 2406 | context = frame().getContext(be.subwindow ? be.subwindow : be.window, be.x_root, be.y_root); |
2407 | context, &winClient(), be.time)) { | 2407 | if (!context && be.subwindow) |
2408 | context = frame().getContext(be.window); | ||
2409 | |||
2410 | if (k->doAction(be.type, be.state, be.button, context, &winClient(), be.time)) { | ||
2411 | XAllowEvents(display, SyncPointer, CurrentTime); | ||
2408 | return; | 2412 | return; |
2409 | } | 2413 | } |
2410 | 2414 | ||
@@ -2415,18 +2419,18 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) { | |||
2415 | } | 2419 | } |
2416 | 2420 | ||
2417 | 2421 | ||
2422 | // - refeed the event into the queue so the app or titlebar subwindow gets it | ||
2423 | if (be.subwindow) | ||
2424 | XAllowEvents(display, ReplayPointer, CurrentTime); | ||
2418 | 2425 | ||
2419 | // if nothing was bound via keys-file then | 2426 | // if nothing was bound via keys-file then |
2420 | // - raise() if clickRaise is enabled | 2427 | // - raise() if clickRaise is enabled |
2421 | // - hide open menues | 2428 | // - hide open menues |
2422 | // - focus on clickFocus | 2429 | // - focus on clickFocus |
2423 | // - refeed the event into the queue so the app gets it | ||
2424 | if (frame().window().window() == be.window) { | 2430 | if (frame().window().window() == be.window) { |
2425 | if (screen().clickRaises()) | 2431 | if (screen().clickRaises()) |
2426 | raise(); | 2432 | raise(); |
2427 | 2433 | ||
2428 | XAllowEvents(display, ReplayPointer, CurrentTime); | ||
2429 | |||
2430 | m_button_grab_x = be.x_root - frame().x() - frame().window().borderWidth(); | 2434 | m_button_grab_x = be.x_root - frame().x() - frame().window().borderWidth(); |
2431 | m_button_grab_y = be.y_root - frame().y() - frame().window().borderWidth(); | 2435 | m_button_grab_y = be.y_root - frame().y() - frame().window().borderWidth(); |
2432 | } | 2436 | } |