[wayland] Activate AbstractClient from InputRedirection on mouse button press
This only handles button presses without modifiers so far.
This commit is contained in:
parent
c3b7ed907b
commit
0c0ad87caf
1 changed files with 13 additions and 1 deletions
14
input.cpp
14
input.cpp
|
@ -727,7 +727,19 @@ void InputRedirection::processPointerButton(uint32_t button, InputRedirection::P
|
|||
#if HAVE_WAYLAND
|
||||
if (auto seat = findSeat()) {
|
||||
seat->setTimestamp(time);
|
||||
state == PointerButtonPressed ? seat->pointerButtonPressed(button) : seat->pointerButtonReleased(button);
|
||||
bool passThrough = true;
|
||||
if (state == PointerButtonPressed) {
|
||||
if (AbstractClient *c = dynamic_cast<AbstractClient*>(m_pointerWindow.data())) {
|
||||
bool wasAction = false;
|
||||
const Options::MouseCommand command = c->getMouseCommand(buttonToQtMouseButton(button), &wasAction);
|
||||
if (wasAction) {
|
||||
passThrough = c->performMouseCommand(command, m_globalPointer.toPoint());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (passThrough) {
|
||||
state == PointerButtonPressed ? seat->pointerButtonPressed(button) : seat->pointerButtonReleased(button);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (state == PointerButtonReleased && !areButtonsPressed()) {
|
||||
|
|
Loading…
Reference in a new issue