diff options
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 | } |